what is multiprogramming

what is multiprogramming

1 year ago 38
Nature

Multiprogramming is a technique used in operating systems to maximize the utilization of resources by allowing multiple programs to run on a single processor machine. It is a rudimentary form of parallel processing in which several programs run at the same time on a uniprocessor system. Before the concept of multiprogramming, computing took place in a way that did not use the CPU efficiently. Earlier, the CPU executed only one program at a time, and when a program underwent a waiting state for an input/output operation, the CPU remained idle, leading to underutilization of CPU and poor performance. Multiprogramming addresses this issue by allowing multiple programs to load into memory and run each one in rotation as CPU resources become available.

Multiprogramming is implemented in one of two ways: cooperative multiprogramming or preemptive multiprogramming. Cooperative multiprogramming is the older of the two models and is seldom used today. With cooperative multiprogramming, context switching is initiated by the programs themselves rather than the OS. Processor resources are reassigned only when a program releases control of those resources. The operating system has no choice but to execute a program with the expectation, but not the certainty, that the program will eventually release control of the resources.

On the other hand, preemptive multiprogramming is the more modern approach and is widely used today. With preemptive multiprogramming, the operating system can interrupt a running program and allocate the processor to another program. The OS can then return to the interrupted program later, ensuring that all programs receive a fair share of the processors resources.

Some key features of multiprogramming include:

  • Need Single CPU for implementation.
  • Context switch between process.
  • Switching happens when the current process undergoes a waiting state.
  • CPU idle time is reduced.
  • High resource utilization.
  • High Performance.

Multiprogramming operating systems are designed to store different programs based on sub-segmenting parts of the transient area. The resource management routines are linked with the operating system core functions. There are mainly two types of multiprogramming operating systems: multitasking operating systems and multiuser operating systems.

Examples of multiprogramming operating systems include Linux distributions, Windows, macOS, and IOS.

Read Entire Article