That depends on the multiprocessing architecture. In Symetrical Multiprocessing, which is what is being discussed here (and is the most common approach for multiprocessing in a single motherboard system) the processors share memory and have equal access to the entire memory space and peripherals.Pete wrote: Also. When you have more than one CPU, do they have their own virtual address spaces and just share the physical one or what?
Other designs work differently, and there are many different variations. For example, in centralized multiprocessing or co-processing, there is a single primary processor which uses the other processors to perform tasks on it's behalf; co-processing can be homogenous, in which the CPUs are of the same type, or heterogeneous, with specialized co-processors performing as single focused task. Technically speaking, most single-CPU PCs these days fall into the category of heterogeneous co-processing, as they use specialized GPU and DSP processors for video and audio, but since the co-processors are rarely programmed directly, they are usually treated a single-processor systems.
Non-Uniform Memory Access (NUMA) is similar to SMP, except that each processor has it's own 'local' memory as well as the shared memory; for each processor, accessing it's own local memory is faster than accessing the shared memory. Some NUMA designs allow processors to access other processors' local memory directly, but at an even higher overhead than for shared memory, while other require that the data be transferred to shared memory in order to be accessed by more than one processor.
In parallel processing or multithread processing, CPUs not only share memory, they can share a single program, each processor performing a single thread of execution for the whole. In most systems today, this would be managed in the OS software rather than in hardware, though there are some special-purpose parallel systems in existence such as the infamous 'DES Killer', a computer designed in 1998 to decrypt DES-encrypted messages in a matter of hours (this was done to demonstrate the weakness of the algorithm; not surprisingly, the National Bureau of Standards introduced the AES encryption algorithm shortly afterwards).
All of these designs are what are called 'tightly-coupled' multiprocessing; 'loosely-coupled' designs, such as clustering or distributed processing, do not share memory, and in fact can be completely separate systems. Distributed processing is a general term for networked systems running under a shared operating system, though it is also applied to distributed projects such as SETI@home. Clustering is distributed processing (in the first sense) among a group of physically proximate, closely networked (and usually homogenous) systems.
Comments and corrections welcome.