Past exam question: 2074 (Past Questions), QF
Open in the Padhaiko appExplain multi-programming, multiprocessing and distributed operating system.
Solution
Multi-programming Operating System: A multi-programming operating system maintains multiple active programs/processes concurrently resident in main memory.
- Core Operational Principle: On a uniprocessor system, running only one program at a time causes severe CPU idling whenever the program executes an I/O operation. In a multiprogramming system, the OS keeps a pool of ready jobs in RAM. The CPU executes one job; the moment that job blocks waiting for an I/O operation (or any external signal), the OS CPU scheduler switches execution to another ready job.
- Key Objective: Maximize overall CPU utilization and system throughput by overlapping CPU compute cycles with peripheral I/O wait times.
- Concurrency vs. Parallelism: Achieves concurrency through rapid interleaved execution on a single physical CPU, but cannot achieve true simultaneous hardware parallelism.
Multiprocessing Operating System: A multiprocessing operating system (often termed a tightly coupled system) operates across hardware architectures equipped with two or more physical processors (or multi-core CPUs) sharing a common physical memory, system bus, power supply, and peripheral devices.
- Architectural Configurations:
- Symmetric Multiprocessing (SMP): Every processor executes an identical copy of the operating system kernel and can schedule any user process. All processors have equal access to memory and devices over a shared bus.
- Asymmetric Multiprocessing (AMP / Master-Slave): One designated master processor runs the kernel and distributes specific tasks to dedicated slave processors.
- Key Advantages:
- True Parallelism: Multiple instructions belonging to different processes or threads execute simultaneously at the exact same physical clock cycle on distinct cores.
- Increased Throughput: More work is completed in less elapsed time.
- Enhanced Reliability & Graceful Degradation: If one physical processor fails, the remaining processors absorb the workload, allowing the system to continue operating at reduced capacity rather than suffering a catastrophic failure.
Distributed Operating System: A distributed operating system (loosely coupled system) manages a collection of independent, physically separated, autonomous computer systems connected via a high-speed communication network (LAN or WAN).
- Single-System Image: The defining characteristic of a true distributed OS is transparency: it presents the entire distributed collection of heterogeneous computers to the user as a single, coherent, unified computing environment. A user executes commands without needing to know which physical machine across the network provides the CPU cycles or disk storage.
- Core Mechanisms:
- Resource Sharing: Enables seamless sharing of remote hardware (printers, compute clusters) and data (distributed file systems like NFS or Andrew File System).
- Location & Migration Transparency: Files and processes can migrate dynamically between nodes to balance load without requiring modifications to user code.
- Fault Tolerance & High Availability: If a single networked node crashes, the distributed OS automatically reroutes requests and migrates services to healthy nodes.
A Multiprogramming OS keeps multiple processes in memory on a single CPU, interleaving execution when a process waits for I/O to maximize CPU utilization. A Multiprocessing OS manages multiple physical CPUs/cores sharing memory and buses to achieve true simultaneous parallel execution, higher throughput, and hardware fault tolerance. A Distributed OS coordinates multiple autonomous, network-connected computers with private memories, presenting them to the user as a single, coherent, transparent computing system.