Difference between concurrency and concurrency

Source: Internet
Author: User

Difference between concurrency and concurrency

Parallel refers to the simultaneous execution of multiple commands on multiple processors at the same time. It is like two people each dig a pitfall with an iron shovel. An hour later, each person has a big pitfall. Therefore, both of them are executed together in both the micro and macro aspects.


Concurrency indicates that only one command can be executed at a time, but multiple process commands are quickly rotated, so that multiple processes can be executed simultaneously at a macro level, however, at the micro level, it is not executed at the same time. It only divides the time into several segments so that multiple processes can be executed quickly and cyclically. It seems that two people use the same tie and dig holes in turn. One hour later, each of them dug a small pitfall. It will take two hours to dig two big pitfall.


According to the above understanding, real parallelism can only exist in a multi-processor system, while concurrency can exist in a single-processor and multi-processor system, concurrency can exist in a single processor system because concurrency is the illusion of parallelism. parallelism requires the program to be able to execute multiple operations at the same time, concurrency only requires the program to pretend to execute multiple operations at the same time (one operation is executed for each slice, and multiple operations are executed in turn ).

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.