Assume the same details about the disk as in Example 4 (at page 457). The reques
ID: 3851938 • Letter: A
Question
Assume the same details about the disk as in Example 4 (at page 457). The request queue does notremain the same but it changes as new requests are added to the queue. At any point of time the algorithm uses the current requests to make its decision as to the nextrequest to be serviced. Consider the following request sequence:
• Initially (at time 0) the queue contains requests for cylinders: 99, 3, 25
• At the time the next decision has to be taken by the algorithm, one newrequests has joined the queue: 46
• Next decision point one more request has joined the queue: 75
• Next decision point one more request has joined the queue: 55
• Next decision point one more request has joined the queue: 85
• Next decision point one more request has joined the queue: 73
• Next decision point one more request has joined the queue: 50
Assume that the disk head at time 0 is just completing a request at track 55.
a) Show the schedule for FCFS, SSTF, SCAN, C-SCAN, LOOK, and C-LOOK.
Solution:
b) Compute the response time (in units of head traversal) for each of the aboverequests.
c) What is the average response time and throughput observed for each of thealgorithms?
Solution for b) and c):
Request
FCFS
SSTF
SCAN
CSCAN
LOOK
CLOOK
R1 (cyl 99)
R2 (cyl 3)
R3 (cyl 25)
R4 (cyl 46)
R5 (cyl 75)
R6 (cyl 55)
R7 (cyl 85)
R8 (cyl 73)
R9 (cyl 50)
Avg Response
Throughput
Request
FCFS
SSTF
SCAN
CSCAN
LOOK
CLOOK
R1 (cyl 99)
R2 (cyl 3)
R3 (cyl 25)
R4 (cyl 46)
R5 (cyl 75)
R6 (cyl 55)
R7 (cyl 85)
R8 (cyl 73)
R9 (cyl 50)
Avg Response
Throughput
Explanation / Answer
Answer for the Question:
Assume that the disk head at time 0 is just completing a request at track 55.
55 85 73 50 99 3 25 75
Total = 55+85+73+50+99+3+25+75 = 465
FCFS:
55 - 85 = 30
85 - 73 = 12
73 - 50 = 23
50 - 99 = 49
99 - 3 = 96
3 - 25 = 22
25 - 75 = 50
Total
Avg See Time = 35.25
SSTF :
55 - 50 = 5
50 - 25 = 25
25 - 3 = 22
3 - 75 = 72
75 - 73 = 2
73 - 85 = 12
85 - 99 = 14
Total = 152
Avg See Time = 19
SCAN:
55 - 50 = 5
50 - 23 = 22
23 - 3 = 20
3 - 0 = 3
0 - 73 = 70
73 - 75 = 2
75 - 85 = 10
85 - 99 = 14
Total = 146
Avg See Time = 18.25
LOOK:
55 - 50 = 5
50 - 23 = 22
23 - 3 = 20
3 - 73 = 70
73 - 75 = 2
75 - 85 = 10
85 - 99 = 14
Total = 143
17.87
C-SCAN:
55 - 50 = 5
50 - 23 = 22
23 - 3 = 20
3 - 0 = 3
0 - 465 = 465
465 - 99 = 366
99 - 85 = 14
85 - 75 =10
75 - 73 = 2
Total = 907
Avg See Time = 113.37
C-LOOK:
55 - 50 = 5
50 - 23 = 22
23 - 3 = 50
3 - 99 = 96
99 - 85 = 14
85 - 75 = 10
75 - 73 = 2
199
24.87
Total = 199
Avg See Time = 24.85