Differences in concurrency and parallelism

Source: Internet
Author: User

In simple terms, not too much nonsense.
I need to watch this TV show now, chat QQ, and Rob train tickets;

If this thing is done on the computer:
I can open the video window to small, open the QQ Chat window, and then open the browser;
by hand typing chat, my eyes can see this TV play, ears listen to have no information to rob the ticket.
That's what I'm going to do with these three missions.
  

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/1F/wKiom1X1pFPRGtpUAABGTUNebJ4821.jpg "style=" float: none; "title=" concurrent. png "alt=" wkiom1x1pfprgtpuaabgtunebj4821.jpg "/>


If you're doing this on an ipad (Don't say a window pad)
I have only one window;
to chat I opened QQ application, TV drama backstage suspended, Rob I can not go to confirm the ticket;
to watch TV, QQ can not chat in the background .....
I need to work so alternately.
       
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/1C/wKioL1X1poaR54HeAABOXKlJCyU739.jpg "title=" parallel. png "Style=" Float:none; "alt=" wkiol1x1poar54heaaboxkljcyu739.jpg "/>
I'm on the computer. This is called parallelism;
on the pad is concurrency.

younger brother's opinion ignorant understanding, please everybody to advise.
PS: Better than the mother feeding the children a little bit better?


The following principles of online search:

concurrency : When there are multiple threads in action, if the system has only one CPU, it is impossible to actually do more than one thread at the same time, it can only divide the CPU run time into a number of time periods, and then assign the time period to each thread execution, While the thread code of a time period is running, the other threads are in the Hang form: This is what we call concurrency (Concurrent).

parallelism: When the system has more than one CPU, the operation of the thread may be non-concurrent. When one CPU executes a thread, another CPU can execute another thread, and two threads do not preempt CPU resources, which can be done simultaneously, which we call parallel (Parallel).

The difference: concurrency and parallelism are two concepts that are similar and differentiated, parallel means that two or more events occur at the same time, while concurrency refers to two or more events occurring within the same interval. In A multi- Channel program Environment, concurrency refers to the macro over a period of time a number of programs at the same time, but in a single processor system, each moment can only have a program to execute, Therefore, these programs can only be alternately executed on a micro-tick. If there are multiple processors in a computer system, these programs can be executed concurrently to be allocated to multiple processors, implementing parallel execution, that is, using each processor to process a concurrent execution of a program, so that multiple programs can be executed concurrently.



Differences in concurrency and parallelism

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.