multiprocessing multiprocessing is the use of two or more central processing units cpus within a single computer system the term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them there are many variations on this basic theme and the definition of multiprocessing can vary with context mostly as a function of how cpus are defined multiple cores on one die multiple dies in one package multiple packages in one system unit etc according to some online dictionaries a multiprocessor is a computer system having two or more processing units multiple processors each sharing main memory and peripherals in order to simultaneously process programs at the operating system level multiprocessing is sometimes used to refer to the execution of multiple concurrent processes in a system with each process running on a separate cpu or core as opposed to a single process at any one instant the remainder of this article discusses multiprocessing only in this hardware sense in flynns taxonomy multiprocessors as defined above are mimd machines prehistory possibly the first expression of the idea of multiprocessing was written by luigi federico menabrea in 1842 about charles babbages analytical engine as translated by ada lovelace the machine can be brought into play so as to give several results at the same time which will greatly abridge the whole amount of the processes key topics processor symmetry in a multiprocessing system all cpus may be equal or some may be reserved for special purposes a combination of hardware and operating system software design considerations determine the symmetry or lack thereof in a given system for example hardware or software considerations may require that only one particular cpu respond to all hardware interrupts whereas all other work in the system may be distributed equally among cpus or execution of kernelmode code may be restricted to only one particular cpu whereas usermode code may be executed in any combination of processors multiprocessing systems are often easier to design if such restrictions are imposed but they tend to be less efficient than systems in which all cpus are utilized systems that treat all cpus equally are called symmetric multiprocessing smp systems in systems where all cpus are not equal system resources may be divided in a number of ways including asymmetric multiprocessing asmp nonuniform memory access numa multiprocessing and clustered multiprocessing masterslave multiprocessor system in a masterslave multiprocessor system the master cpu is in control of the computer and the slave cpus performs assigned tasks the cpus can be completely different in terms of speed and architecture some or all of the cpus can have share common bus each can also have a private bus for private resources or they may be isolated except for a common communications pathway likewise the cpus can share common ram andor have private ram that the other processors cannot access the roles of master and slave can change from one cpu to another an early example of a masterslave multiprocessor system is the tandyradio shack trs80 model 16 desktop computer which came out in february of 1982 and ran the multiusermultitasking xenix operating system microsofts version of unix called trsxenix the model 16 has 3 microprocessors an 8bit zilog z80 cpu running at 4mhz a 16bit motorola 68000 cpu running at 6mhz and an intel 8021 in the keyboard when the system was booted the z80 was the master and the xenix boot process initialized the slave 68000 and then transferred control to the 68000 whereupon the cpus changed roles and the z80 became a slave processor that was responsible for all io operations including disk communications printer and network as well as the keyboard and integrated monitor while the operating system and applications ran on the 68000 cpu the z80 could be used to do other tasks the earlier trs80 model ii which was released in 1979 could also be considered a multiprocessor system as it had both a z80 cpu and an intel 8021 microprocessor in the keyboard the 8021 made the model ii the first desktop computer system with a separate detachable lightweight keyboard connected with by a single thin flexible wire and likely the first keyboard to use a dedicated microprocessor both attributes that would later be copied years later by apple and ibm instruction and data streams in multiprocessing the processors can be used to execute a single sequence of instructions in multiple contexts singleinstruction multipledata or simd often used in vector processing multiple sequences of instructions in a single context multipleinstruction singledata or misd used for redundancy in failsafe systems and sometimes applied to describe pipelined processors or hyperthreading or multiple sequences of instructions in multiple contexts multipleinstruction multipledata or mimd processor coupling tightly coupled multiprocessor system tightly coupled multiprocessor systems contain multiple cpus that are connected at the bus level these cpus may have access to a central shared memory smp or uma or may participate in a memory hierarchy with both local and shared memory smnuma the ibm p690 regatta is an example of a high end smp system intel xeon processors dominated the multiprocessor market for business pcs and were the only major x86 option until the release of amds opteron range of processors in 2004 both ranges of processors had their own onboard cache but provided access to shared memory the xeon processors via a common pipe and the opteron processors via independent pathways to the system ram chip multiprocessors also known as multicore computing involves more than one processor placed on a single chip and can be thought of the most extreme form of tightly coupled multiprocessing mainframe systems with multiple processors are often tightly coupled loosely coupled multiprocessor system shared nothing architecture loosely coupled multiprocessor systems often referred to as clusters are based on multiple standalone single or dual processor commodity computers interconnected via a high speed communication system gigabit ethernet is common a linux beowulf cluster is an example of a loosely coupled system tightly coupled systems perform better and are physically smaller than loosely coupled systems but have historically required greater initial investments and may depreciate rapidly nodes in a loosely coupled system are usually inexpensive commodity computers and can be recycled as independent machines upon retirement from the cluster power consumption is also a consideration tightly coupled systems tend to be much more energy efficient than clusters this is because considerable economy can be realized by designing components to work together from the beginning in tightly coupled systems whereas loosely coupled systems use components that were not necessarily intended specifically for use in such systems loosely coupled systems have the ability to run different operating systems or os versions on different systems symmetric multiprocessing asymmetric multiprocessing multicore processor bmdfm binary modular dataflow machine a smp mimd runtime environment software lockout openhmpp vteparallel computinggeneral distributed computing parallel computing massively parallel cloud computing highperformance computing multiprocessing manycore processor gpgpu computer network systolic array levels bit instruction thread task data memory loop pipeline multithreading temporal simultaneous smt speculative spmt preemptive cooperative clustered multithread cmt hardware scout theory pram model analysis of parallel algorithms amdahls law gustafsons law cost efficiency karpflatt metric slowdown speedup elements process thread fiber instruction window array data structure coordination multiprocessing memory coherency cache coherency cache invalidation barrier synchronization application checkpointing programming stream processing dataflow programming models implicit parallelism explicit parallelism concurrency nonblocking algorithm hardware flynns taxonomy sisd simd simt misd mimd dataflow architecture pipelined processor superscalar processor vector processor multiprocessor symmetric asymmetric memory shared distributed distributed shared uma numa coma massively parallel computer computer cluster grid computer hardware acceleration apis ateji px boostthread chapel charm cilk coarray fortran cuda dryad c amp global arrays mpi openmp opencl openhmpp openacc tpl plinq pvm posix threads raftlib upc tbb zpl problems deadlock livelock deterministic algorithm embarrassingly parallel parallel slowdown race condition software lockout scalability starvation category parallel computing media related to parallel computing at wikimedia commons 