OS - Long, Short & Medium Term Schedulers

<<Previous

Next >>




The OS selects the processes from the queue and the processes are handled by the scheduler. Scheduling is split into 3 activities handled by

  • Long-term scheduler
  • Short-term scheduler
  • Medium-term scheduler

Long-term Job scheduler

  • It is also called Job Scheduler
  • It selects the processes from the process pool. These selected processes are loaded into the memory for execution.
  • It executes the process less frequently.
  • It controls the degree of multiprogramming (i.e., number of processes in the memory). If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of process leaving from the memory.
  • In general, the processes can be represented as either I/O-bound or CPU-bound.
    • I/O-bound: More time of the process is spending with doing I/O request.
    • CPU-bound: More time of the process is spending with doing computation.
    Thus the long-term scheduler selects the balanced process mix of I/O-bound and CPU-bound processes.
  • It takes more time for making decision of which process is going to be selected for execution.

Short-term CPU Scheduler

  • It is also known as CPU Scheduler.
  • It selects the process from processes that is ready to execute and allocate the CPU to one of them.
  • It can often select the process for execution on CPU frequently.
  • It is faster than the long-term scheduler.

Medium-term scheduler

  • It is an intermediate level of scheduling.
  • It uses the concept of swapping. It removes the process from the memory so that it can reduce the degree of multiprogramming. After sometime, that process may be reintroduced into memory and continue its execution where it is left off.
  • Therefore, the medium-term scheduler handles the swapped in and swapped out processes.

<<Previous

Next >>







OS - Long, Short & Medium Term Schedulers

<<Previous

Next >>




The OS selects the processes from the queue and the processes are handled by the scheduler. Scheduling is split into 3 activities handled by

  • Long-term scheduler
  • Short-term scheduler
  • Medium-term scheduler

Long-term Job scheduler

  • It is also called Job Scheduler
  • It selects the processes from the process pool. These selected processes are loaded into the memory for execution.
  • It executes the process less frequently.
  • It controls the degree of multiprogramming (i.e., number of processes in the memory). If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of process leaving from the memory.
  • In general, the processes can be represented as either I/O-bound or CPU-bound.
    • I/O-bound: More time of the process is spending with doing I/O request.
    • CPU-bound: More time of the process is spending with doing computation.
    Thus the long-term scheduler selects the balanced process mix of I/O-bound and CPU-bound processes.
  • It takes more time for making decision of which process is going to be selected for execution.

Short-term CPU Scheduler

  • It is also known as CPU Scheduler.
  • It selects the process from processes that is ready to execute and allocate the CPU to one of them.
  • It can often select the process for execution on CPU frequently.
  • It is faster than the long-term scheduler.

Medium-term scheduler

  • It is an intermediate level of scheduling.
  • It uses the concept of swapping. It removes the process from the memory so that it can reduce the degree of multiprogramming. After sometime, that process may be reintroduced into memory and continue its execution where it is left off.
  • Therefore, the medium-term scheduler handles the swapped in and swapped out processes.

<<Previous

Next >>







Learn about Stack Data Structure

Learn about Heap Data Structure

Learn about Operating System

Learn AVL Tree

Learn Djikstra's Algorithm