Difference between parallel and concurrent processes and threads

Source: Internet
Author: User

Difference between parallel and concurrent processes and threads

Parallel: Multiple commands are executed simultaneously on multiple processors at the same time.

Concurrency: At the same time, only one command can be executed, but multiple process commands can be quickly rotated to achieve simultaneous execution of multiple processes at a macro level.

Processes generally have the following four elements:

1. There is a program for execution (the program can be shared by multiple processes ).

2. Dedicated system stack space is available.

3. There is a corresponding process control block in the kernel.

4. Independent storage space means dedicated user space.

Compared with the process, the thread only has the first three items, but lacks the fourth.

Special:

If there is no user space, it is called the kernel thread.

If the user space is shared, it is called a user thread.

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: info-contact@alibabacloud.com 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.