Single-core and multi-core

Source: Internet
Author: User


Synchronization: it is a waste of time to execute one thing in sequence and not to do other things while waiting. Also not necessarily. For example, sometimes synchronization is required when resources need to be exclusively occupied, for example, problems frequently encountered by multithreading.

Asynchronous: (asynchronous switching), one thing is waiting to do another thing to spend the wasted time.



Synchronization: meaningless.



Parallel: the same task can be executed with two cores at the same time.

Non-parallel: a single task must have a single core.


Multithreading implements or does the following:Single-core; non-exclusive CPU business; asynchronous Switching

Let thread 1 wait for two things:

Let thread 1 sleep;

Let thread 2 do another thing;

Blocking: The thread is suspended for absolute synchronization;

Non-blocking: returns immediately without blocking the thread before the result is obtained immediately.


Multi-threaded applications:

Network applications: inherent concurrency, uncertainty, non-reliability, waiting for Interaction

Embedded applications: lightweight thread switching, fast response.

Process: contains a set of program commands and related resources, and participates in scheduling and competition for resources.

Context switch: each process switch has a process resource protection and recovery action.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.