True parallel multitasking can only be done on multi-core CPUs

Source: Internet
Author: User

True parallel multitasking can only be done on multi-core CPUs

A task is a process, such as open a browser is to start a browser process, open a notepad started a Notepad process, open two Notepad started the two Notepad process, open a word started a word process.

Some processes do more than one thing at the same time, such as word, which can be typed, spell-checked, and printed at the same time. Within a process, to do multiple tasks at the same time, you need to run multiple "subtasks" at the same time, and we refer to these "subtasks" in the process as threads (thread)

To summarize, there are 3 ways to implement a multitasking:

·  multi-process mode;

·  multithreaded mode;

·  Multi-process + multithreaded mode.

If you want to watch a movie on a computer, you must play the video by one thread, another thread plays the audio, otherwise, the single-threaded implementation can only play the video before playing the audio, or play the audio before playing the video, which is obviously not possible.

A thread is the smallest execution unit, and a process consists of at least one thread. A thread is the smallest execution unit, and a process consists of at least one thread.


This article is from the "Make a few" blog, be sure to keep this source http://9399369.blog.51cto.com/9389369/1735799

True parallel multitasking can only be done on multi-core CPUs

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.