Tasks, Processors, and Context Switching

In the heart of concurrent processing lie tasks, processors, and context switching. Any machine has a certain number of hardware processors, each of which is always processing instructions ( multiprocessing). However, with software, we can construct any number of tasks, or virtual processors (multitasking). Usually the higher the number of processors and tasks, the simpler they tend to become, the distinguishing factor of fine- and course-grain concurrent processing. As there are a limited number of processors but possibly an unlimited number of tasks, a scheduler must switch a processor from one task to another, known as context switching.

Figure: Elements of Concurrent Processing
\begin{figure}
\begin{verbatim}
-T
CONCURRENT PROCESSING
-T involves -...
...ULTIPROCESSING P
P P
^ ^
/ \ / \
_/ \_ _/ \_\end{verbatim}
\end{figure}