Multiprocessing is a common word we come across while discussing the characteristics of an operating system. As the name suggests, it refers to using multiple processors in a system to increase efficiency and performance. Multiprocessing, in turn, supports multithreading, i.e. running multiple threads/processes concurrently. Let us discuss a Multiprocessing operating system in detail.
What is Multiprocessing Operating System?
A Multiprocessing operating system uses multiple central processing units within a single system. It enables a system to support more than one processor and divide the tasks among them. Every process requires a CPU for its execution. So this allows multiple processes to execute parallelly on different processing units.
Types of Multiprocessing OS
Asymmetric Multiprocessing operating system
This involves one processor behaving like a master and the other processors as slaves. The master processor assigns processes ready for execution to the slave processors. A ready queue is maintained by the master processor from which slave processors receive the processes they need to execute. In an asymmetric system, a scheduler made by the master processor assigns processes to other processors.
Advantages of Asymmetric Multiprocessing operating system
- Since a master CPU allocates jobs to other processors, the number of conflicts that may occur is significantly reduced.
- The overall process of execution is faster.
- Easier to design and Handle.
Disadvantages of Asymmetric Multiprocessing operating system
- Sometimes, all processors may not get an equal share of jobs. Some processors might be overly burdened.
- If the processor handling a specific job fails, the entire system crashes.
- Common computer clocks, buses, memories, and peripherals. Also Read, FCFS Scheduling Algorithm
Symmetric Multiprocessing operating system
There are no master-slave relationships among the processors, and all processors have their own process scheduler. A global queue is maintained in which all the ready-to-execute processes are stored. All processors receive processes from this global queue. Sometimes, two processors may get the same process. Problem locking is used to solve this conflict. The local scheduler is attached to every processor to maintain the balance and ensure optimum CPU utilization. The throughput of asymmetric Multiprocessing operating system is more as many processes get executed concurrently.
Advantages of Symmetric Multiprocessing operating system
It is fault-tolerant. Failure of a single process does not crash the entire system like asymmetric multiprocessing.
b. It is a reliable system.
c. Since multiple processors can run the jobs, the number of processes executed per unit time also increases.
Disadvantages of Symmetric Multiprocessing operating system
It has a complex design.
b. Tough to handle.
c. Costlier compared to asymmetric multiprocessing.
Also see, Difference Between Bit and Byte
Working of Operating System
Typically, in a multiprocessing operating system, each processor runs an identical copy of the OS and can communicate with each other. To run such a system efficiently, the following components are required.
Motherboard bracket - The motherboard is equipped with sockets and slots to connect and attach multiple processors.
Processor support - Processors should be capable of functioning in a multiprocessing environment.
False sharing - occurs when unrelated data items used by different processors are located next to each other in the memory.
Shared data - Multiple processors share the same data items, including the main memory.
- Locking System - A Locking system provides safe access to resources shared by multiple processes.
In a multiprocessing operating system, many processes can be executed concurrently. If four processes are ready for execution, each is allocated to a different processor. If it's a dual-core processor, two processes can execute two processes simultaneously and thus will be two times faster than a single processor system. Similarly, a quad-core processor will be four times faster than a single processor. In some cases, various small processing units are connected to perform the main processing. So, even if one of the small processing units fails, the others will automatically start execution.
Must Read: Clean Architecture
Advantages and Disadvantages of Multiprocessing Operating System
Advantages of Multiprocessing Operating System
Increased throughput and performance. Throughput is the rate of execution of processes per unit of time. Since multiple processors can execute multiple processes concurrently, the rate of process execution is increased.
Reliability. Since multiple processors work together as a single unit, the others will continue to execute without any interruptions even if one fails.
Multiprocessing systems tend to consume less electricity and power when compared to a single processing system. This is because the processor in a single processing system has more load than the ones as part of a multiprocessing unit.
You can also explore Advantages of Operating System here.
Disadvantages of Multiprocessing Operating System
Multiprocessing operating systems have a more complex architecture when compared to a single processor OS.
It may require a bigger memory as multiple processors share the same main memory.
- The system crashes if the processor in charge of a particular task fails.