Download presentation

Presentation is loading. Please wait.

Published byCarina Tolles Modified about 1 year ago

1
Disk scheduling examples

2
Problem parameters: u Disk has 100 cylinders, labeled u Time to move from cylinder A to cylinder B is a linear function of |A – B| u Time to read a block stored at the current cylinder is the same as the time to move one cylinder

3
Problem statement u Assume block requests arrive according to table to the right u Assume, at time 0, the read- write heads are positioned above cylinder 28. u Requests with identical arrival time are listed in FIFO order u Requests with arrival time of 0 are pending when the simulation begins u All times are given in cylinder movement units Arrival TimeCylinder

4
FCFS u Assume, when no requests are pending, the R/W heads do not move. u What is the total time to service all requests? Arrival TimeCylinder

5
FCFS u Assume, when no requests are pending, the R/W heads do not move. u What is the total time to service all requests? u (28 – 3) (16 – 3) (58 – 16) (98 – 58) + 1+ (98 – 71) (71 –12) (56 – 12) + 1 Arrival TimeCylinder

6
FCFS Arrival TimeCylinder

7
FCFS Arrival TimeCylinder

8
Scan u Assume the R/W heads are moving towards cylinder 99 when the simulation begins u What is the total time to service all requests? (58 – 28) (98 – 58) +1 + (99–98) + (99 – 16) (16 – 12) (12 – 0) + (56 – 0) (71 – 56) + 1 Arrival TimeCylinder

9
Scan Arrival TimeCylinder [101]

10
Scan Arrival TimeCylinder

11
SSTF u Assume the R/W heads continue moving toward cylinder 50 when there is no pending request, and that seek decisions can be changed dynamically u What is the total time to service all requests? (28 – 3) (16 – 3) +1 + (58–16) (98 – 58) (98 – 71) (71 – 38) + (56 – 38 ) (56 – 12) + 1 = 249 Arrival TimeCylinder

12
SSTF Arrival TimeCylinder

13
SSTF C = 38 at – 12 = – 38 = Arrival TimeCylinder

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google