Redirected from Multi-processing
Multiprocessing for general tasks is often fairly difficult to achieve due to various programs holding internal data, known as state (or context). Essentially the programs are typically written in such a fashion that they assume their data is incorruptible. However if another copy of the program is running on another processor, the two copies can interfere with each other by both attempting to read and write their state at the same time. A variety of programming techniques are used to avoid this problem, including semaphores and other checks and blocks which allow only one copy of the program to change such values at a time.
Another problem is that processors often use a speed-increasing technique known as caching in which small pools of very fast memory are associated with each processor in order to allow them to work with temporary values very quickly. This can lead to a situation in which each processor is working in a separate cache, rather than in the shared memory; changes to a processor's local cache will not be communicated to other processors until the contents of the cache are written to shared memory. This cannot be helped via programming techniques because it is invisible to the programs themselves. In this case the problem requires additional hardware in order to make sure that all caches on the various processors are up to date, and synchronized with one another.
There are a number of ways to solve this latter problem, of varying complexity. The most common for smaller systems is symmetric multiprocessing (SMP) while larger systems use non-uniform memory access (NUMA) multiprocessing.
See also:
Search Encyclopedia
|
Featured Article
|