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