Show Menu
Cheatography

1.Process Scheduling Cheat Sheet by

Process Scheduling in Operating System

Sche­duling Queue

Job Queue :A process when enters a system is put into a job queue .
Ready Queue: The processes residing in main memory and ready for execution are put in the ready queue.
Device Queue: The processes waiting for a particular I/O device are put into the device queue.

Sche­duling Criteria

1. CPU Utiliz­ati­on: It should be maximum. 40% minimum- 90% maximum.
2. Throug­hput: Number of processes that are completed per unit time are called throu­ghput. It should be maximum.
3. Turnaround Time: The interval from time of submission of process to time of comple­tion. Turna­round time= period spent waitin­g+ready queue time+e­xec­uti­on+I/O interrupt time. It should be minimum.

1. First Come First Serve (FCFS)

Priority Scheduling Diagram

5. Multilevel Queue Schedu­ling

 

Sche­duling Queue Diagram

Medium Term scheduler Diagram

SCHE­DULING ALGORI­THM

Scheduling Algorithm decides which process should the CPU be allocated to. There are six scheduling algori­thms.

First Come First Serve Shortest Job First

The process that requests for the CPU first, gets the access first.
Each process has the length of the next CPU burst.
FIFO queue is used in handling the process.
The process with the smallest next CPU burst gets access to the process.
Long waiting time for the next processes.
Compar­itively less waiting time for next process.
It is a non-p­ree­mptive algorithm.
It can be premptive or non-pr­eem­ptive algorithm.

Priority Scheduling Round Robin Scheduling

Each process has a prior­ity.
There is a fixed time quantum.
CPU allocated to the process with higher priority.
Ready queue is treated as a circular queue and CPU is allocated to the First process for specific time quantum.
Prob­lem: Starvation of low priority proces­s.­So­lut­ion: AGING
Prob­lem: If time quantum is too large, algorithm works as FCFS.
It can be preem­ptive or non-pr­eem­ptive
It is preem­ptive.

Mult­ilevel Queue Multilevel Feedback Queue

Ready queue is divided into: Foreg­round (inter­active) process and Backg­round (batch) process.
Allows the process from one queue to move to the next queue.
Fore­gro­und implements Round Robin Schedu­ling. and Back­gro­und implements FCFS.
Here processes are separated according to their CPU burst.
 

Sche­duler

Long Term Schedu­ler: Also known as job scheduler selects process from disk and puts into memory.
Short Term Schedu­ler: Also known as CPU scheduler select process from memory and allocates a CPU to it.
Medium Term Schedu­ler: It is used to remove a process from and reduce degree of multi-­pro­graming .Later it can be re-int­roduced from point where it was left . This is called as swapp­ing.

Sche­duling Criteria

4. Waiting Time: The time for which the process has to wait in the ready queue is waiting time. It should be minimum.
5. Response Time: Time taken to respond to a process is response time. It should be minimum.

2. Shortest Job First (SJF)

4. Round Robin Scheduling Diagram

6. Multilevel Feedback Queue Schedu­ling

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          System Development Methodologies Cheat Sheet
          PM2 - Process Manager for Node.js Cheat Sheet
          1.Process Scheduling Cheat Sheet