Tuesday, 15 May 2018

CPU Scheduling in Operating System

CPU Scheduling:



"scheduling refer ordering of process before the execution."

 Each resource of the computer system must be schedule before its schedule since CPU is the primary resource of the system so it must be schedule before their use.

Scheduler:

 Scheduler perform the task of scheduling.
scheduler is a technique by with we can submit the job in between batch to ready queue, ready queue to CPU, CPU to wait queue and wait queue to ready queue.

There are three type of Scheduler.

  1. Long Term Scheuler
  2. Short Term Scheduler
  3. Medium Term Scheduler

CPU Scheduling Diagram
CPU Scheduling Diagram

1- Long Term Scheduler:

                                         The Scheduler swapped out the process form Batch queue to Ready queue is called 'Long Term Scheduler'.

2- Short Term Scheduler:

                                          Short Term Scheduler is responsible for submission of job form ready queue to CPU.


3- Medium Term Scheduler:

                                                It is responsible for submission of job/process form CPU to ready queue due to some input/output event wait and interrupt occur .

Advantage of Scheduling:

  • Fairness
  • Throughput increase
  • Resource utilization

CPU Criteria: 

   There are number of criteria

  •   Utilization:

In general CPU can utilization from 40% to 90%

When CPU 40% utilize is called Light Loaded System,

when CPU 90 % utilize its called Heavy Loaded System.

  • Throughput:

Number of process completed in one unit time is called throughput system.
"Number of process executing within a unit time".

  • Turnaround Time:

turn around time = (time of completion of job) - (time of submission of job)


  •   Waiting Time:

Time spend to wait in ready queue is called the waiting time of a process.

  • Respond Time:

First response of the process  is called repond time of the process.

No comments:

Post a comment

Popular Posts