Uniprocessor Scheduling III - PowerPoint PPT Presentation

PPT – Uniprocessor Scheduling III PowerPoint presentation | free to download - id: 26ec35-ZGYxO

The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
Title:

Uniprocessor Scheduling III

Description:

Department of Physics, Computer Science and Engineering. Christopher Newport University ... Each square represents one time unit. The number refers to the ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 21
Provided by: ming168
Category:
Tags:
Transcript and Presenter's Notes

Title: Uniprocessor Scheduling III

1
Uniprocessor Scheduling III
• CPSC 410 Operating Systems
• Department of Physics, Computer Science and
Engineering
• Christopher Newport University

2
Question
(1)
• Consider the following set of processes
• Process Name Arrival Time Processing Time
• 1 0 2
• 2 1 4
• 3 2 8
• 4 3 6
• Perform the analysis of a comparison of
scheduling policies FCFS, RR(q1), RR(q4), SPN,
SRT, HRRN, Feedback(q1), and Feedback(q2 i).

3

4

5
Solution of Question 3 - FCFS
(3)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• First Come First Served
(FCFS)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

6

7
Solution of Question 3 RR (q1)
(5)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• Round Robin (RR q1)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

8

9
Solution of Question 3 RR (q4)
(7)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• Round Robin (RR q4)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

10

11
Solution of Question 3 - SPN
(9)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• Shortest Process Next (SPN)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

12

13
Solution of Question 3 - SRT
(11)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• Shortest Remaining Time
(SRT)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

14

15
Solution of Question 3 - HRRN
(13)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• Highest Response Ratio Next
(HRRN)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

16

17
Solution of Question 3 FB q1
(15)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• Feedback (FB q1)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

18

19
Solution of Question 3 FB q2i
(17)
• 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 1 1 1 1 2
• 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0
• Each square represents one time unit. The
number refers to the running process
• Feedback (FB q2i)
• Process Pi 1 2
3 4 Average
• Arrival Time Ta 0 1 2
3
• Service Time Ts 2 4 8
6
• Finish Time Tf
• Turnaround Time Tq
• Tq Tf - Ta
• Normalized Tq/Ts
• Turnaround Time

20
Question 2 - Exercise/Home Work (1)
• Five batch jobs, A through E, arrive at a
computer center at essentially the same time.
They have an estimated running time of 15, 9, 3,
6, and 12 minutes, respectively. Their
(externally defined) priorities are 4, 7, 3, 1,
and 6, respectively, with 10 being the highest
priority. For each of the following scheduling
algorithms, determine the turnaround time for
each process and the average turnaround for all
job. Ignore process switching overhead. In the
last three cases, assume that only one job at a
time runs until it finishes and that all jobs are
completely processor-bound.
• (a) priority scheduling
• (b) FCFS (run in order 15, 9, 3, 6, and 12)
• (c) shortest job first.