SlideShare a Scribd company logo
CPU Scheduling
 Classification of CPU Scheduling
 Performance Criteria of Good Scheduler
 CPU Scheduling Algorithms
*Property of STI J0024
CPU scheduling may be classified as:
 Non-preemptive scheduling
CPU scheduling is non-preemptive if once the CPU has been assigned to a
process and the process starts executing, the CPU cannot be taken away from
that process.
 Preemptive scheduling
In preemptive CPU scheduling, even though the CPU has been assigned to a
process and the process is already executing, the CPU scheduler may decide to
assign the CPU to another process in the ready queue.
*Property of STI J0024
A good scheduler should optimize the following performance criteria:
 CPU utilization
 Throughput
 Turnaround time
 Response time
 Waiting time
*Property of STI J0024
The different CPU scheduling algorithms are:
 First-Come, First-Served Algorithm
 Shortest Process First Algorithm
 Shortest Remaining Time First Algorithm
 Round Robin Algorithm
 Priority Scheduling
 Multilevel Feedback Queues
*Property of STI J0024
First-Come, First-Served Algorithm (FCFS)
- the one that enters the Ready queue first gets to execute at the CPU first
a.
b.
c.
A
0 8
A
0
B
8 12
A
0
B C
8 12 17
*Property of STI J0024
First-Come, First-Served Algorithm (FCFS)
d.
e.
WTA = 0 – 0 = 0 ms
WTB = 8 – 3 = 5 ms
WTC = 12 – 4 = 8 ms
WTD = 17 – 6 = 11 ms
WTE = 20 – 10 = 10 ms
The average waiting time is
(0 + 5 + 8 + 11 + 10)/5 = 34/5 = 6.8 ms
A
0
B C D
8 12 17 20
A
0
B C D
8 12 17 20
E
22
*Property of STI J0024
First-Come, First-Served Algorithm (FCFS)
TAA = 8 - 0= 8 ms
TAB = 12 - 3 = 9 ms
TAC = 17 - 4 = 13 ms
TAD = 20 - 6 = 14 ms
TAE = 22 - 10 = 12 ms
The average turnaround time is
(8 + 9 + 13 + 14 + 12)/5 = 56/5 = 11.2 ms
*Property of STI J0024
Shortest Process First Algorithm (SPF)
- the process with the shortest CPU burst
a.
b.
c.
A
0 8
A
0
D
8 11
A
0
D
8 11 13
E
*Property of STI J0024
Shortest Process First Algorithm (SPF)
d.
e.
WTA = 0 – 0 = 0 ms
WTB = 13 – 3 = 10 ms
WTC = 17 – 4 = 13 ms
WTD = 8 – 6 = 2 ms
WTE = 11 – 10 = 1 ms
The average waiting time is
(0 + 10 + 13 + 2 + 1)/5 = 26/5 = 5.2 ms
A
0
BD
8 11 13 17
E
A
0
B CD
8 11 13 17
E
22
*Property of STI J0024
Shortest Process First Algorithm (SPF)
TAA = 8- 0 = 8 ms
TAB = 17 - 3 = 14 ms
TAC = 22 - 4 = 18 ms
TAD = 11 - 6 = 5 ms
TAE = 13 - 10 = 3 ms
The average turnaround time is
(8 + 14 + 18 + 5 + 3)/5 = 48/5 = 9.6 ms
*Property of STI J0024
Shortest Remaining Time First Algorithm (SRTF)
- the preemptive version of SPF
a.
b.
c.
d.
Process ID Arrival Time CPU Burst
A 0 8
B 3 4
C 4 5
D 6 3
E 10 2
0
A
0
A
3
B
0
B
7
A
3
0
B
7
DA
3
*Property of STI J0024
Shortest Remaining Time First Algorithm (SRTF)
e.
f.
g.
h.
WTA = (0 – 0) + (12 – 3) = 9 ms
WTB = 3 – 3 = 0 ms
WTC = 17 – 4 = 13 ms
WTD = 7 – 6 = 1 ms
WTE = 10 – 10 = 0 ms
The average waiting time is
(9 + 0 + 13 + 1 + 0)/5 = 23/5 = 4.6 ms
0
B D
7 10
A
3
0
B D
7 10 12
EA
3
A
0
B D
7 10 12 17
EA
3
A
0
B CD
7 10 12 17
E
22
A
3
*Property of STI J0024
Shortest Remaining Time First Algorithm (SRTF)
TAA = 17 - 0= 17 ms
TAB = 7 - 3 = 4 ms
TAC = 22 - 4 = 18 ms
TAD = 10 - 6 = 4 ms
TAE = 12 - 10 = 2 ms
The average turnaround time is
(17 + 4 + 18 + 4 + 2)/5 = 45/5 = 9.0 ms
*Property of STI J0024
Round Robin Algorithm (RR)
- the process are selected on a first-come, first-served basis. However, each
process is given a time limit to execute at the CPU.
Assume a time quantum of 3 ms.
a.
b.
Process ID Arrival Time CPU Burst
A 0 8
B 3 4
C 4 5
D 6 3
E 10 2
0
A
3
0
B
6
A
3
*Property of STI J0024
Round Robin Algorithm (RR)
c.
d.
e
f.
g.
h
i.
0
B A
6 9
A
3
0
B A
6 9 12
CA
3
D
0
B A
6 9 12 15
CA
3
D
0
B A
6 9 12 15
CA
3
B
16
D
0
B A
6 9 12 15
CA
3
B
16
A
18
D
0
B A
6 9 12 15
CA
3
B
16
A
18
E
20
D
0
B CA
6 9 12 15
C
22
A
3
B
16
A
18
E
20
*Property of STI J0024
Round Robin Algorithm (RR)
WTA = (0 – 0) + (6 – 3) + (16 – 9) = 10 ms
WTB = (3 – 3) + (15 – 6) = 9 ms
WTC = (9 – 4) + (20 – 12) = 13 ms
WTD = 12 – 6 = 6 ms
WTE = 18 – 10 = 8 ms
The average waiting time is
(10 + 9 + 13 + 6 + 8)/5 = 46/5 = 9.2 ms
*Property of STI J0024
Round Robin Algorithm (RR)
TAA = 18 - 6= 18 ms
TAB = 16 - 3 = 13 ms
TAC = 22 - 4 = 18 ms
TAD = 15 - 6 = 9 ms
TAE = 20 - 10 = 10 ms
The average turnaround time is
(18 + 13 + 18 + 9 + 10)/5 = 68/5 = 13.6 ms
*Property of STI J0024
Priority Scheduling
- Each process is assigned a priority and the CPU scheduler selects the process in
the ready queue with the highest priority to execute next.
Using the non-preemptive priority algorithm:
a.
b.
Process ID Arrival
Time
CPU Burst Priority
A 0 8 4
B 3 4 3
C 4 5 1
D 6 3 2
E 10 2 2
A
0 8
A
0
C
8 13
*Property of STI J0024
Priority Scheduling
c.
d.
e.
WTA = 0 – 0 = 0 ms
WTB = 18 – 3 = 15 ms
WTC = 8 – 4 = 4 ms
WTD = 13 – 6 = 7 ms
WTE = 16 – 10 = 6 ms
The average waiting time is
(0 + 15 + 4 + 7 + 6)/5 = 32/5 = 6.4 ms
A
0
C D
8 13 16
A
0
C D
8 13 16 18
E
A
0
BC D
8 13 16 18
E
22
*Property of STI J0024
Priority Scheduling
TAA = 8 - 0= 8 ms
TAB = 22 – 3 = 19 ms
TAC = 13 - 4 = 9 ms
TAD = 16 - 6 = 10 ms
TAE = 18 - 10 = 8 ms
The average turnaround time is
(8 + 19 + 9 + 10 + 8)/5 = 54/5 = 10.8 ms
*Property of STI J0024
Priority Scheduling
Using the preemptive priority algorithm:
a.
b.
c.
d.
Process ID Arrival
Time
CPU Burst Priority
A 0 8 4
B 3 4 3
C 4 5 1
D 6 3 2
E 10 2 2
0
A
0
BA
3
0
B C
4 9
A
3
0
B C
4 9
A
3
D
*Property of STI J0024
Priority Scheduling
e.
f.
WTA = (0 – 0) + (17 – 3) = 14 ms
WTB = (3 – 3) + (14 - 4) = 10 ms
WTC = (4 – 4) = 0 ms
WTD = (9 – 6) = 3 ms
WTE = (12 – 10) = 2 ms
The average waiting time is
(14 + 10 + 0 + 3 + 2)/5 = 29/5 = 5.8 ms
0
B C D
4 9 12
A
3
A
0
B C D
4 9 12 14
E
22
A
3
B
17
*Property of STI J0024
Priority Scheduling
TAA = 22 – 0 = 22 ms
TAB = 17 - 3 = 14 ms
TAC = 9 - 4 = 5 ms
TAD = 12 - 6 = 6 ms
TAE = 14 - 10 = 4 ms
The average turnaround time is
(22 + 14 + 5 + 6 + 4)/5 = 51/5 = 10.2 ms
*Property of STI J0024
Multilevel Feedback Queues
Q0All processes enter
the queuing network
at the rear of the
highest priority
queue
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network
FCFS (time slice = 10 ms)
Q1
FCFS (time slice = 20 ms)
Processes that do not finish executing
within the given time slice move to the next
lower-priority queue
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network
.
.
.
Qn
RR
Processes that do not finish executing
within the given time slice move to the next
lower-priority queue
Q2
FCFS (time slice = 30 ms)
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network

More Related Content

What's hot

SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
Dhaval Sakhiya
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULING
garishma bhatia
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
Khushboo Jain
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
sathish sak
 
Merge sort algorithm power point presentation
Merge sort algorithm power point presentationMerge sort algorithm power point presentation
Merge sort algorithm power point presentation
University of Science and Technology Chitttagong
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
ShubhamGupta345141
 
process control block
process control blockprocess control block
process control block
Vikas SHRIVASTAVA
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
Kavya Kapoor
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
Chetan Mahawar
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
Mazenetsolution
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
Process management
Process managementProcess management
Process management
Birju Tank
 
Scheduling
SchedulingScheduling
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
Chankey Pathak
 
Round Robin Scheduling Algorithm
Round Robin Scheduling AlgorithmRound Robin Scheduling Algorithm
Round Robin Scheduling Algorithm
Adeel Rasheed
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithms
ali jawad
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling
JawadHaider36
 

What's hot (20)

Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULING
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
Merge sort algorithm power point presentation
Merge sort algorithm power point presentationMerge sort algorithm power point presentation
Merge sort algorithm power point presentation
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
 
process control block
process control blockprocess control block
process control block
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Process management
Process managementProcess management
Process management
 
Scheduling
SchedulingScheduling
Scheduling
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Ch5 answers
Ch5 answersCh5 answers
Ch5 answers
 
Round Robin Scheduling Algorithm
Round Robin Scheduling AlgorithmRound Robin Scheduling Algorithm
Round Robin Scheduling Algorithm
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithms
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling
 

Viewers also liked

CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
Shubhashish Punj
 
05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULING05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULING
Anne Lee
 
presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)
chetan mudenoor
 
Interfacing keypad
Interfacing keypadInterfacing keypad
Interfacing keypadPRADEEP
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithms
Shanu Kumar
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
 
System calls
System callsSystem calls
System calls
Bernard Senam
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
Vandana Salve
 
Scheduling and sequencing
Scheduling and sequencingScheduling and sequencing
Scheduling and sequencingAkanksha Gupta
 
Lcd interfacing
Lcd interfacingLcd interfacing
Lcd interfacing
AshuKaranam
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)Vaibhav Bajaj
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
harini0810
 

Viewers also liked (16)

CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULING05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULING
 
Lcd 16x2
Lcd 16x2Lcd 16x2
Lcd 16x2
 
presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)
 
Interfacing keypad
Interfacing keypadInterfacing keypad
Interfacing keypad
 
System call
System callSystem call
System call
 
Lcd
LcdLcd
Lcd
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithms
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
System calls
System callsSystem calls
System calls
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
 
Scheduling and sequencing
Scheduling and sequencingScheduling and sequencing
Scheduling and sequencing
 
Lcd interfacing
Lcd interfacingLcd interfacing
Lcd interfacing
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
 
Presentation on operating system
 Presentation on operating system Presentation on operating system
Presentation on operating system
 

Similar to 05 lcd slides 1 - CPU SCHEDULING (Powerpoint)

cpu schduling ppt.pdf
cpu schduling ppt.pdfcpu schduling ppt.pdf
cpu schduling ppt.pdf
SangeethaBS4
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
Arafat Hossan
 
AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...
AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...
AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...
Shanmuganathan C
 
C vs Java: Finding Prime Numbers
C vs Java: Finding Prime NumbersC vs Java: Finding Prime Numbers
C vs Java: Finding Prime Numbers
Adam Feldscher
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
Farhat Shaikh
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
Dr. Mazin Mohamed alkathiri
 
What is the waiting time of each process for each of the scheduling a.pdf
What is the waiting time of each process for each of the scheduling a.pdfWhat is the waiting time of each process for each of the scheduling a.pdf
What is the waiting time of each process for each of the scheduling a.pdf
pearlcoburnsanche303
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
Simen Li
 
Scheduling Fixed Priority Tasks with Preemption Threshold
Scheduling Fixed Priority Tasks with Preemption ThresholdScheduling Fixed Priority Tasks with Preemption Threshold
Scheduling Fixed Priority Tasks with Preemption Threshold
Deepak Raj
 
GCC
GCCGCC
Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)
Doug Burns
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
cjbas
 
2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...
2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...
2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...
csezenoglu
 
Facility Layout in production management
Facility Layout in production managementFacility Layout in production management
Facility Layout in production management
Joshua Miranda
 
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
Usha Mehta
 
Scoring analysis by frank paynter
Scoring analysis by frank paynterScoring analysis by frank paynter
Scoring analysis by frank paynter
Glider Pilot
 
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxInstruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
carliotwaycave
 

Similar to 05 lcd slides 1 - CPU SCHEDULING (Powerpoint) (20)

cpu schduling ppt.pdf
cpu schduling ppt.pdfcpu schduling ppt.pdf
cpu schduling ppt.pdf
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...
AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...
AlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorithmsAlgorit...
 
Os module 2 ba
Os module 2 baOs module 2 ba
Os module 2 ba
 
C vs Java: Finding Prime Numbers
C vs Java: Finding Prime NumbersC vs Java: Finding Prime Numbers
C vs Java: Finding Prime Numbers
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
What is the waiting time of each process for each of the scheduling a.pdf
What is the waiting time of each process for each of the scheduling a.pdfWhat is the waiting time of each process for each of the scheduling a.pdf
What is the waiting time of each process for each of the scheduling a.pdf
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
 
Scheduling Fixed Priority Tasks with Preemption Threshold
Scheduling Fixed Priority Tasks with Preemption ThresholdScheduling Fixed Priority Tasks with Preemption Threshold
Scheduling Fixed Priority Tasks with Preemption Threshold
 
Sa by shekhar
Sa by shekharSa by shekhar
Sa by shekhar
 
GCC
GCCGCC
GCC
 
Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
 
2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...
2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...
2005 PT Design Of Interior Permanant Magnet Machines For Hybrid Electric Vehi...
 
Cpu Scheduling Galvin
Cpu Scheduling GalvinCpu Scheduling Galvin
Cpu Scheduling Galvin
 
Facility Layout in production management
Facility Layout in production managementFacility Layout in production management
Facility Layout in production management
 
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
13 static timing_analysis_4_set_up_and_hold_time_violation_remedy
 
Scoring analysis by frank paynter
Scoring analysis by frank paynterScoring analysis by frank paynter
Scoring analysis by frank paynter
 
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxInstruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
 

More from Anne Lee

Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed database
Anne Lee
 
Data mining
Data miningData mining
Data mining
Anne Lee
 
Data warehousing
Data warehousingData warehousing
Data warehousing
Anne Lee
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
Anne Lee
 
Database monitoring and performance management
Database monitoring and performance managementDatabase monitoring and performance management
Database monitoring and performance management
Anne Lee
 
transportation and assignment models
transportation and assignment modelstransportation and assignment models
transportation and assignment models
Anne Lee
 
Database Security Slide Handout
Database Security Slide HandoutDatabase Security Slide Handout
Database Security Slide Handout
Anne Lee
 
Database Security Handout
Database Security HandoutDatabase Security Handout
Database Security Handout
Anne Lee
 
Database Security - IG
Database Security - IGDatabase Security - IG
Database Security - IG
Anne Lee
 
03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTE03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTE
Anne Lee
 
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
Anne Lee
 
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
Anne Lee
 
Indexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDEIndexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDE
Anne Lee
 
07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXES07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXES
Anne Lee
 
07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXES07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXES
Anne Lee
 
Wk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulatWk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulat
Anne Lee
 
Wk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasaWk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasa
Anne Lee
 
Wk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalitaWk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalita
Anne Lee
 
Wk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinigWk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinig
Anne Lee
 
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Anne Lee
 

More from Anne Lee (20)

Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed database
 
Data mining
Data miningData mining
Data mining
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Database monitoring and performance management
Database monitoring and performance managementDatabase monitoring and performance management
Database monitoring and performance management
 
transportation and assignment models
transportation and assignment modelstransportation and assignment models
transportation and assignment models
 
Database Security Slide Handout
Database Security Slide HandoutDatabase Security Slide Handout
Database Security Slide Handout
 
Database Security Handout
Database Security HandoutDatabase Security Handout
Database Security Handout
 
Database Security - IG
Database Security - IGDatabase Security - IG
Database Security - IG
 
03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTE03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTE
 
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
 
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
 
Indexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDEIndexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDE
 
07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXES07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXES
 
07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXES07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXES
 
Wk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulatWk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulat
 
Wk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasaWk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasa
 
Wk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalitaWk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalita
 
Wk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinigWk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinig
 
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
 

Recently uploaded

Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 

Recently uploaded (20)

Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 

05 lcd slides 1 - CPU SCHEDULING (Powerpoint)

  • 1. CPU Scheduling  Classification of CPU Scheduling  Performance Criteria of Good Scheduler  CPU Scheduling Algorithms
  • 2. *Property of STI J0024 CPU scheduling may be classified as:  Non-preemptive scheduling CPU scheduling is non-preemptive if once the CPU has been assigned to a process and the process starts executing, the CPU cannot be taken away from that process.  Preemptive scheduling In preemptive CPU scheduling, even though the CPU has been assigned to a process and the process is already executing, the CPU scheduler may decide to assign the CPU to another process in the ready queue.
  • 3. *Property of STI J0024 A good scheduler should optimize the following performance criteria:  CPU utilization  Throughput  Turnaround time  Response time  Waiting time
  • 4. *Property of STI J0024 The different CPU scheduling algorithms are:  First-Come, First-Served Algorithm  Shortest Process First Algorithm  Shortest Remaining Time First Algorithm  Round Robin Algorithm  Priority Scheduling  Multilevel Feedback Queues
  • 5. *Property of STI J0024 First-Come, First-Served Algorithm (FCFS) - the one that enters the Ready queue first gets to execute at the CPU first a. b. c. A 0 8 A 0 B 8 12 A 0 B C 8 12 17
  • 6. *Property of STI J0024 First-Come, First-Served Algorithm (FCFS) d. e. WTA = 0 – 0 = 0 ms WTB = 8 – 3 = 5 ms WTC = 12 – 4 = 8 ms WTD = 17 – 6 = 11 ms WTE = 20 – 10 = 10 ms The average waiting time is (0 + 5 + 8 + 11 + 10)/5 = 34/5 = 6.8 ms A 0 B C D 8 12 17 20 A 0 B C D 8 12 17 20 E 22
  • 7. *Property of STI J0024 First-Come, First-Served Algorithm (FCFS) TAA = 8 - 0= 8 ms TAB = 12 - 3 = 9 ms TAC = 17 - 4 = 13 ms TAD = 20 - 6 = 14 ms TAE = 22 - 10 = 12 ms The average turnaround time is (8 + 9 + 13 + 14 + 12)/5 = 56/5 = 11.2 ms
  • 8. *Property of STI J0024 Shortest Process First Algorithm (SPF) - the process with the shortest CPU burst a. b. c. A 0 8 A 0 D 8 11 A 0 D 8 11 13 E
  • 9. *Property of STI J0024 Shortest Process First Algorithm (SPF) d. e. WTA = 0 – 0 = 0 ms WTB = 13 – 3 = 10 ms WTC = 17 – 4 = 13 ms WTD = 8 – 6 = 2 ms WTE = 11 – 10 = 1 ms The average waiting time is (0 + 10 + 13 + 2 + 1)/5 = 26/5 = 5.2 ms A 0 BD 8 11 13 17 E A 0 B CD 8 11 13 17 E 22
  • 10. *Property of STI J0024 Shortest Process First Algorithm (SPF) TAA = 8- 0 = 8 ms TAB = 17 - 3 = 14 ms TAC = 22 - 4 = 18 ms TAD = 11 - 6 = 5 ms TAE = 13 - 10 = 3 ms The average turnaround time is (8 + 14 + 18 + 5 + 3)/5 = 48/5 = 9.6 ms
  • 11. *Property of STI J0024 Shortest Remaining Time First Algorithm (SRTF) - the preemptive version of SPF a. b. c. d. Process ID Arrival Time CPU Burst A 0 8 B 3 4 C 4 5 D 6 3 E 10 2 0 A 0 A 3 B 0 B 7 A 3 0 B 7 DA 3
  • 12. *Property of STI J0024 Shortest Remaining Time First Algorithm (SRTF) e. f. g. h. WTA = (0 – 0) + (12 – 3) = 9 ms WTB = 3 – 3 = 0 ms WTC = 17 – 4 = 13 ms WTD = 7 – 6 = 1 ms WTE = 10 – 10 = 0 ms The average waiting time is (9 + 0 + 13 + 1 + 0)/5 = 23/5 = 4.6 ms 0 B D 7 10 A 3 0 B D 7 10 12 EA 3 A 0 B D 7 10 12 17 EA 3 A 0 B CD 7 10 12 17 E 22 A 3
  • 13. *Property of STI J0024 Shortest Remaining Time First Algorithm (SRTF) TAA = 17 - 0= 17 ms TAB = 7 - 3 = 4 ms TAC = 22 - 4 = 18 ms TAD = 10 - 6 = 4 ms TAE = 12 - 10 = 2 ms The average turnaround time is (17 + 4 + 18 + 4 + 2)/5 = 45/5 = 9.0 ms
  • 14. *Property of STI J0024 Round Robin Algorithm (RR) - the process are selected on a first-come, first-served basis. However, each process is given a time limit to execute at the CPU. Assume a time quantum of 3 ms. a. b. Process ID Arrival Time CPU Burst A 0 8 B 3 4 C 4 5 D 6 3 E 10 2 0 A 3 0 B 6 A 3
  • 15. *Property of STI J0024 Round Robin Algorithm (RR) c. d. e f. g. h i. 0 B A 6 9 A 3 0 B A 6 9 12 CA 3 D 0 B A 6 9 12 15 CA 3 D 0 B A 6 9 12 15 CA 3 B 16 D 0 B A 6 9 12 15 CA 3 B 16 A 18 D 0 B A 6 9 12 15 CA 3 B 16 A 18 E 20 D 0 B CA 6 9 12 15 C 22 A 3 B 16 A 18 E 20
  • 16. *Property of STI J0024 Round Robin Algorithm (RR) WTA = (0 – 0) + (6 – 3) + (16 – 9) = 10 ms WTB = (3 – 3) + (15 – 6) = 9 ms WTC = (9 – 4) + (20 – 12) = 13 ms WTD = 12 – 6 = 6 ms WTE = 18 – 10 = 8 ms The average waiting time is (10 + 9 + 13 + 6 + 8)/5 = 46/5 = 9.2 ms
  • 17. *Property of STI J0024 Round Robin Algorithm (RR) TAA = 18 - 6= 18 ms TAB = 16 - 3 = 13 ms TAC = 22 - 4 = 18 ms TAD = 15 - 6 = 9 ms TAE = 20 - 10 = 10 ms The average turnaround time is (18 + 13 + 18 + 9 + 10)/5 = 68/5 = 13.6 ms
  • 18. *Property of STI J0024 Priority Scheduling - Each process is assigned a priority and the CPU scheduler selects the process in the ready queue with the highest priority to execute next. Using the non-preemptive priority algorithm: a. b. Process ID Arrival Time CPU Burst Priority A 0 8 4 B 3 4 3 C 4 5 1 D 6 3 2 E 10 2 2 A 0 8 A 0 C 8 13
  • 19. *Property of STI J0024 Priority Scheduling c. d. e. WTA = 0 – 0 = 0 ms WTB = 18 – 3 = 15 ms WTC = 8 – 4 = 4 ms WTD = 13 – 6 = 7 ms WTE = 16 – 10 = 6 ms The average waiting time is (0 + 15 + 4 + 7 + 6)/5 = 32/5 = 6.4 ms A 0 C D 8 13 16 A 0 C D 8 13 16 18 E A 0 BC D 8 13 16 18 E 22
  • 20. *Property of STI J0024 Priority Scheduling TAA = 8 - 0= 8 ms TAB = 22 – 3 = 19 ms TAC = 13 - 4 = 9 ms TAD = 16 - 6 = 10 ms TAE = 18 - 10 = 8 ms The average turnaround time is (8 + 19 + 9 + 10 + 8)/5 = 54/5 = 10.8 ms
  • 21. *Property of STI J0024 Priority Scheduling Using the preemptive priority algorithm: a. b. c. d. Process ID Arrival Time CPU Burst Priority A 0 8 4 B 3 4 3 C 4 5 1 D 6 3 2 E 10 2 2 0 A 0 BA 3 0 B C 4 9 A 3 0 B C 4 9 A 3 D
  • 22. *Property of STI J0024 Priority Scheduling e. f. WTA = (0 – 0) + (17 – 3) = 14 ms WTB = (3 – 3) + (14 - 4) = 10 ms WTC = (4 – 4) = 0 ms WTD = (9 – 6) = 3 ms WTE = (12 – 10) = 2 ms The average waiting time is (14 + 10 + 0 + 3 + 2)/5 = 29/5 = 5.8 ms 0 B C D 4 9 12 A 3 A 0 B C D 4 9 12 14 E 22 A 3 B 17
  • 23. *Property of STI J0024 Priority Scheduling TAA = 22 – 0 = 22 ms TAB = 17 - 3 = 14 ms TAC = 9 - 4 = 5 ms TAD = 12 - 6 = 6 ms TAE = 14 - 10 = 4 ms The average turnaround time is (22 + 14 + 5 + 6 + 4)/5 = 51/5 = 10.2 ms
  • 24. *Property of STI J0024 Multilevel Feedback Queues Q0All processes enter the queuing network at the rear of the highest priority queue Processes that finish executing or request for an I/O operation within the given time slice leave the queuing network FCFS (time slice = 10 ms) Q1 FCFS (time slice = 20 ms) Processes that do not finish executing within the given time slice move to the next lower-priority queue Processes that finish executing or request for an I/O operation within the given time slice leave the queuing network . . . Qn RR Processes that do not finish executing within the given time slice move to the next lower-priority queue Q2 FCFS (time slice = 30 ms) Processes that finish executing or request for an I/O operation within the given time slice leave the queuing network Processes that finish executing or request for an I/O operation within the given time slice leave the queuing network