0% found this document useful (0 votes)
16 views11 pages

Os 11

Uploaded by

alexkb2002online
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views11 pages

Os 11

Uploaded by

alexkb2002online
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Operating System

CSE
By
Dr. Mitul Kumar Ahirwal

Ref: Books:
“Operating system concepts” Abraham Silberschatz and Peter B Galvin
“Operating system” Andrew S. Tanenbaum
“Operating system a concept based Approach” D.M Dhamdhere 1 1
Time Quantum and Context Switch Time

2
Turnaround Time (TAT) Varies With The Time Quantum (q)

General Rule:
80% of CPU bursts should
be shorter than q

3
Example of SRTF

4
Example of Preemptive Priority

5
Multilevel Queue
• Ready queue is partitioned into separate queues, eg:
– foreground (interactive)
– background (batch)
• Process remains in a given queue
• Each queue has its own scheduling algorithm:
– foreground – RR
– background – FCFS

• Scheduling must be done between the queues:


– Fixed priority scheduling; (i.e., serve all from foreground then from
background). Possibility of starvation.
– Time slice – each queue gets a certain amount of CPU time which it can
schedule amongst its processes; i.e., 80% to foreground in RR
– 20% to background in FCFS
6
Multilevel Queue Scheduling

7
Multilevel Feedback Queue
• A process can move between the various queues;
aging can be implemented this way

• Multilevel-feedback-queue scheduler defined by


the following parameters:
– number of queues
– scheduling algorithms for each queue
– method used to determine when to upgrade a process
– method used to determine when to demote a process
– method used to determine which queue a process will
enter when that process needs service

8
Example of Multilevel Feedback Queue
• Three queues:
– Q0 – RR with time quantum 8 milliseconds
– Q1 – RR time quantum 16 milliseconds
– Q2 – FCFS

• Scheduling
– A new job enters queue Q0 which is served FCFS
• When it gains CPU, job receives 8 milliseconds
• If it does not finish in 8 milliseconds, job is moved to queue Q1
– At Q1 job is again served FCFS and receives 16 additional
milliseconds
• If it still does not complete, it is preempted and moved to queue Q2

9
Multilevel Feedback Queues

10
Reference:
Silberschatz, Galvin and Gagne
©2009 Operating System Concepts –
8th Edition

You might also like