Multiprogramming Operating System
The mismatch between the speed of Input/Output device and CPU leaves some resources of the computer system under-utilized. However, if the computer system is working in the multiprogramming mode, better utilization of the available equipment can be realized.
Multiprogramming refers to keeping several programs in different parts of the main memory at the same time and executing them concurrently. The CPU switches from one program to another almost instantaneously. Since the operating speed of CPU is much faster than that of I/O operations, the CPU can allocate time to several programs instead of remaining idle when one is busy with I/O operations. Hence, In multiprogramming system, when one program is waiting for I/O transfer, there is another program ready to use the CPU.
Merits of Multiprogramming Operating System
(1) Increased Throughput – Throughput is a measure of the total amount of processing that a computer system can complete over a fixed period of time. Total through put is significantly increased in multi programming because the CPU is not waiting for 1/O for the program it is executing.
(2) Shorter Response Time – Turn around time for short jobs can be greatly improved under multi programming.
(3) Ability to Assign priorities of Jobs – Most multi programming systems have schemes for setting priorities for rotating programs.
(4) Improved Primary – Storage Allocation – The greater the number of programs that primary storage can hold, the greater the probability that the CPU will be able to execute at least one program while waiting for l/O for the others.
Disadvantages of Multiprogramming Systems
- Large main memory
- Computers designed for multiprogramming must provide some type of memory protection mechanism to prevent a program in one memory partition, from changing information or instruction of a program in another memory partition.
- The main memory should contain some CPU-bound programs and some l/o- 3. bound programs in its varioius partitions so that atleast one of the program which does not need l/o is always available to the CPU for processing.
- In multiprogramming, a portion of one program is executed, then a segment of another, and so on. Before a program is suspended and the control is passed to another program, the values of all CPU registers should be stored in the memory area of that program and then restored when the control is ultimately returned to the first program. This is known as program status preservation.