Tutorial 10 (Solutions)
Tutorial 10 (Solutions)
Q1. Consider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders
(numbered as 0, 1, … , 199), and 256 sectors per track (numbered as 0, 1, … 255). The
following 6 disk requests of the form [sector number, cylinder number, platter number] are
received by the disk controller at the same time:
[120, 72, 2], [180, 134, 1], [60, 20, 0], [212, 86, 3], [56, 116, 2], [118, 16, 1]
Currently head is positioned at sector number 100 of cylinder 80, and is moving towards
higher cylinder numbers. The average power dissipation in moving the head over 100
cylinders is 20 milliwatts and for reversing the direction of the head movement once is 15
milliwatts. Power dissipation associated with rotational latency and switching of head
between different platters is negligible.
The total power consumption in milliwatts to satisfy all of the above disk requests using the
Shortest Seek Time First disk scheduling algorithm is ______ .
Explanation: Avg. time to transfer = Avg. seek time + Avg. rotational delay + Data
transfer time
Avg Seek Time – time taken to move from 1st track to 1sr track : 0ms, 1st to
2nd : 1ms, 2ms, 3ms,….499ms
Avg Seek time =( ∑0+1+2+3+…+499)/500 = 249.5 ms
Avg Rotational Delay – RMP : 600 , 600 rotations in 60 sec (one Rotation =
60/600 sec = 0.1 sec) So, Avg Rotational Delay = 0.1/2= 50 ms
Data Transfer Time: In One 1 Rotation we can read data on one track = 100 *
500 = 50,000 B data is read in one rotation. 250 bytes -> 0.1 * 250 / 50,000 =
0.5 ms
Therfore ATT = 249.5+50+0.5 = 300 ms
Q3. Suppose the following disk request sequence (track numbers) for a disk with 100 tracks
is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is
on track 50. The additional distance that will be traversed by the R/W head when the Shortest
Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm
(assuming that SCAN algorithm moves towards 100 when it starts execution) is _________
tracks
(A) 8
(B) 9
(C) 10
(D) 11
Solution:
Answer: (C)
Explanation: In Shortest seek first (SSTF), closest request to the current position of the head,
and then services that request next.
In SCAN (or Elevator) algorithm, requests are serviced only in the current direction of arm
movement until the arm reaches the edge of the disk. When this happens, the direction of the
arm reverses, and the requests that were remaining in the opposite direction are serviced, and
so on.
Given a disk with 100 tracks
And Sequence 45, 20, 90, 10, 50, 60, 80, 25, 70.
Initial position of the R/W head is on track 50.
In SSTF, requests are served as following
Next Served Distance Traveled
50 0
45 5
60 15
70 10
80 10
90 10
25 65
20 5
10 10
-----------------------------------
Total Dist = 130
Q5. Consider a disk pack with 16 surfaces, 128 tracks per surface and 256 sectors per track.
512 bytes of data are stored in a bit serial manner in a sector. The capacity of the disk pack
and the number of bits required to specify a particular sector in the disk are respectively:
(A) 256 Mbyte, 19 bits
(B) 256 Mbyte, 28 bits
(C) 512 Mbyte, 20 bits
(D) 64 Gbyte, 28 bits
Solutions:
Answer (A)
Capacity of the disk = 16 surfaces X 128 tracks X 256 sectors X 512 bytes = 256 Mbytes.
To calculate number of bits required to access a sector, we need to know total number of
sectors. Total number of sectors = 16 surfaces X 128 tracks X 256 sectors = 2^19
So the number of bits required to access a sector is 19.
Q6. Disk requests are received by a disk drive for cylinder 5, 25, 18, 3, 39, 8 and 35 in that order.
A seek takes 5 msec per cylinder moved. How much seek time is needed to serve these requests
for following Disk Scheduling algorithm? Assume that the arm is at cylinder 20 when the last of
these requests is made with none of the requests yet served.
FCFS
SSTF
SCAN
LOOK
Q7.
Solutions:
Q8.
Q9. Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is
at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105,
110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk
access, the request for cylinder 90 is serviced after servicing ____________ number of
requests.
(A) 1
(B) 2
(C) 3
(D) 4
Solution:
Answer: (C)
Q10. A fast wide SCSI-II disk drive spins at 7200 RPM, has a sector size of 512 bytes, and
holds 160 sectors per track. Estimate the sustained transfer rate of this drive
(A) 576000 Kilobytes / sec
(B) 9600 Kilobytes / sec
(C) 4800 Kilobytes / sec
(D) 19200 Kilobytes / sec
Answer: (B)
Explanation:
Number of rotations in 1 minute = 7200
In 60 seconds = 7200 rotations
In 1 second = 7200 / 60 = 120 rotations
So, in 1 second, SCSI-II disk is able to read 120 tracks.
Number of sectors in each track = 160
Size of each sector = 512 Bytes
Disk Transfer rate in 1 sec = 120 *160 *512
= 98,30,400 Bytes
In KBytes = 9830400 / 1024 = 9600 KB
Option (B) is correct.