In this tutorial, we'll introduce you to multiprocessing, starting with memory sharing. Actually implementing a multiprocessing architecture, though, is a complex process. To begin to see how multiprocessing works, we need to start with an understanding of how memory is used.
True multiprocessing requires that each CPU in the system has access to the same physical memory.
If all of the CPUs that share system memory also share a single image of that memory, it is said to be coherent. For example, if all of the CPUs in a computer read a byte from the same memory address, they all receive the same value for that byte. Memory coherence and shared memory represent the greatest challenges to designers of multiprocessing architectures, one that is further complicated by the existence of high-speed cache memory directly onboard today's microprocessors. A CPU frequently will need to read from those same system-memory locations. This is important because reading from cache is significantly faster than reading from the system bus.