Facebook Pixel

Multiprocessing Operating Systems

In the previous lessons, we discussed how a single CPU can manage multiple jobs (Multiprogramming) or provide interactive slices of time (Multitasking).

Multiprocessing takes this a step further by using two or more physical CPUs within a single computer system to execute instructions in truly parallel fashion.

What is Multiprocessing?

Multiprocessing refers to the ability of a system to support more than one processor at the same time. These processors are in close communication with each other, sharing the same computer bus, clock, memory, and peripheral devices.

While Multitasking creates the 'illusion' of parallel work by switching very fast, Multiprocessing actually performs multiple calculations at the exact same instant.

Types of Multiprocessing

There are two primary ways processors can be organized in a multiprocessing system:

  • Symmetric Multiprocessing (SMP): In SMP, every processor is an equal. Each CPU runs an identical copy of the operating system and they all share the same main memory. This is the architecture used by almost all modern multi-core PCs and smartphones.
  • Asymmetric Multiprocessing (ASMP): This follows a 'Master-Slave' relationship. One master processor schedules the work and distributes tasks to the other slave processors. The slaves only perform the tasks assigned by the master.

Key Advantages

  • Increased Throughput: By having more processors, the system can complete more work in less time. If N processors are working together, the speedup isn't exactly N (due to overhead), but it is significantly higher than a single CPU.
  • Increased Reliability: If one processor fails, the system doesn't crash; it just slows down. This is known as 'Graceful Degradation' or 'Fault Tolerance'.
  • Economy of Scale: Multiprocessor systems can be cheaper than multiple single-processor systems because they share the same housing, power supply, and storage devices.

Multiprocessing vs Multiprogramming

It is important not to confuse hardware parallelism with software concurrency.

FeatureMultiprogrammingMultiprocessing
NatureA software technique for managing tasks.A hardware architecture involving multiple CPUs.
ParallelismConcurrent but not parallel (on a single core).Truly parallel execution (on multiple cores).
CPU CountWorks on a single CPU.Requires two or more CPUs.
GoalReduce CPU idle time.Increase overall processing speed and reliability.

Summary

Multiprocessing is the standard for modern computing. By coordinating multiple 'brains' (CPUs) to work as one, it allows our devices to handle massive workloads—from high-end gaming to complex data science—with speed and reliability that a single processor could never achieve.

Parallelism Logic

Question 1 of 1

Test your understanding of hardware-level parallelism.

In Symmetric Multiprocessing (SMP), what is the relationship between the different processors?
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.