Chapter 8: Disk Scheduling
Exercise 1:
Consider one disk with 200 cylinders, numbered 0 to 199. Assume the current position of head is at
cylinder 66. The request queue is given as follows:
55, 32, 6, 99, 58, 71, 86, 153, 11, 179, 42.
Answer questions a) through c) for each of the following disk-scheduling algorithms:
First Come First Served (FCFS) – (example answer is given)
Shortest Seek Time First (SSTF)
SCAN – in the direction of increasing track number
C-SCAN – in the direction of increasing track number
LOOK – in the direction of increasing track number
C-LOOK – in the direction of increasing track number
a) Show the current position of head based on the disk arm movement to satisfy the above requests,
i.e. the sequence of requests serviced.
b) Count the total distance (in cylinders) of the disk arm movement to satisfy the requests.
c) Decide the best algorithm for the given case above. Why?
Example answers:
First Come First Served (FCFS)
a) 66, 55, 32, 6, 99, 58, 71, 86, 153, 11, 179, 42
b) 11 + 23 + 26 + 93 + 41 + 13 + 15 + 67 + 142 + 168 + 137 = 736
fsktm/niu
Exercise 2:
Consider one disk with 2000 cylinders, numbered 0 to 1999. Assume the current position of head is at
cylinder 143. The request queue is given as follows:
Pertimbangkan satu cakera dengan 2000 silinder, bernombor 0 hingga 1999. Andaikan kedudukan
semasa kepala adalah pada silinder 143. Giliran permintaan diberi seperti berikut:
103, 80, 1400, 813, 1714, 748, 1409, 1100, 1666, 90
For each of the following disk-scheduling algorithms,
Bagi setiap algorithma penjadualan cakera berikut,
i. Shortest Seek Time First (SSTF)
ii. LOOK (variation of SCAN) – in the direction of increasing track number
(dalam arah nombor trek menaik)
iii. C-LOOK (variation of C-SCAN) – in the direction of increasing track number
a) show the current position of head based on the disk arm movement to satisfy the above requests,
i.e. the sequence of requests serviced.
tunjukkan kedudukan semasa kepala berdasarkan pergerakan lengan cakera untuk memenuhi
permintaan di atas, iaitu jujukan permintaan yang dipenuhi.
b) count the total distance (in cylinders) of the disk arm movement to satisfy the requests.
kirakan jumlah jarak (dalam silinder) bagi pergerakan lengan cakera untuk memenuhi
permintaan tersebut.
SSTF LOOK C-LOOK
Track Distance Track Distance Track Distance
accessed accessed accessed
Total Total Total
= = =
distance distance distance
1. Access time has two major components: seek time and rotational latency/delay. Explain each of
them.
fsktm/niu