Which scheduler determines the degree of multiprogramming?

The long-term scheduler, also known as the job scheduler, controls the degree of multiprogramming by selecting processes from the job pool and admitting them into the system for execution.

Suppose a computer system receives several batch job requests from users. These batch jobs perform operations such as data processing, report generating, and file conversion. The long-term scheduler evaluates each batch job based on its resource requirements, priority, and estimated execution time.

If the system has sufficient memory and CPU resources available, the long-term scheduler admits multiple batch jobs into memory simultaneously to maximize CPU utilization and system throughput. It ensures that the system remains responsive to user requests while efficiently utilizing available resources.

As jobs complete their execution, the long-term scheduler may admit new batch jobs from the job pool into memory to maintain a steady flow of work and prevent resource idleness. This process continues iteratively, with the long-term scheduler dynamically adjusting the degree of multiprogramming based on system workload and resource availability.