Nepedia
Back to Discover
Advanced Reader
💻

Multiprocessing

technology Maturity 7-9 Next article →

Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system. A CPU is the primary component that executes instructions in a computer. Multiprocessing allows a system to support multiple processors or to distribute tasks between them. This capability enables true parallel execution. This means several processes actually run at the same time. This is different from multitasking. Multitasking uses a single processor that switches between tasks in time slices. In multiprocessing, the hardware itself allows for simultaneous work.

There are different ways to organize how these processors interact. In symmetric multiprocessing (SMP) systems, all CPUs are treated as equals. They share the same main memory and peripheral devices. Some systems are not equal, which is called asymmetric multiprocessing (ASMP). In these systems, certain CPUs might be reserved for special tasks. For example, one CPU might handle all hardware interrupts. Other CPUs might handle user-mode code. This can make a system easier to design, but it is often less efficient than SMP. Other types include non-uniform memory access (NUMA) and clustered multiprocessing.

One specific method is the master/slave multiprocessor system. In this setup, one CPU acts as the master to control the computer. The other CPU, or CPUs, act as slaves to perform assigned tasks. The master and slave can have different speeds or architectures. They might share a common bus or have private buses for specific resources. They can also share common RAM or use private RAM that others cannot access. Interestingly, the roles of master and slave can change between CPUs during operation.

History shows us how these systems evolved. Two early examples of master/slave mainframes were the Bull Gamma 60 and the Burroughs B5000. In February 1982, the Tandy/Radio Shack TRS-80 Model 16 desktop was released. It ran the Xenix operating system, which was Microsoft's version of UNIX. This machine used two different microprocessors. It had an 8-bit Zilog Z80 running at 4 MHz. It also had a 16-bit Motorola 68000 running at 6 MHz. During boot, the Z80 was the master. Once the 68000 was initialized, the roles switched. The Z80 became a slave responsible for I/O operations like the disk and keyboard. Meanwhile, the 68000 ran the operating system and applications.

We can also classify these systems by how the processors are connected. Tightly coupled systems contain multiple CPUs connected at the bus level. These CPUs often share a central memory. An example of a high-end SMP system is the IBM p690 Regatta. Chip multiprocessors, also called multi-core computing, are an extreme form of tight coupling. They place more than one processor on a single chip. Intel Xeon processors dominated the business PC market for a long time. In 2004, AMD released the Opteron range, which became a major competitor. Both used onboard cache but provided access to shared memory.

Loosely coupled multiprocessor systems are often called clusters. These are groups of standalone computers connected by a high-speed communication system. Gigabit Ethernet is a common connection method. A Linux Beowulf cluster is a well-known example. Tightly coupled systems are generally smaller and more energy-efficient. They are designed from the start to work together. Loosely coupled clusters use inexpensive commodity computers. These nodes can be recycled as independent machines when they are no longer part of the cluster. Clusters also allow different computers to run different operating systems.

Despite the power of multiprocessing, there are technical challenges. Merging data from multiple threads or processes can cause significant overhead. This happens because the system must manage conflict resolution. It must also handle data consistency and synchronization. These tasks ensure that all processors see the correct information at the right time. Understanding these different architectures helps us see how computers manage complex workloads efficiently.

637 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.