Gate Question
Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is _________. (A) 14020 (B) 14000 (C) 25030 (D) 15000 [GATE CS 2015]
Answer: (A)
Explanation
Seek time (given) = 4ms
RPM = 10000 rotation in 1 min [60 sec]
So, 1 rotation will be =60/10000 =6ms [rotation speed]
Rotation latency= 1/2 * 6ms=3ms
# To access a file,
total time includes =seek time + rot. latency +transfer time
To calc. transfer time, find transfer rate
Transfer rate = bytes on track /rotation speed
so, transfer rate = 600*512/6ms =51200 B/ms
transfer time= total bytes to be transferred/ transfer rate
so, Transfer time =2000*512/51200 = 20ms
Given as each sector requires seek tim + rot. latency
= 4ms+3ms =7ms
Total 2000 sector takes = 2000*7 ms =14000 ms
To read entire file ,total time = 14000 + 20(transfer time)
= 14020 ms
Seek Time in OS
Seek Time is one of the key components of Disk Scheduling, Before going to Seek Time, let’s first discuss Disk Scheduling. Disk Scheduling is done by operating systems to schedule I/O requests arriving for the disk. Disk scheduling is also known as I/O Scheduling. Multiple I/O requests may arrive by different processes and only one I/O request can be served at a time by the disk controller. Thus other I/O requests need to wait in the waiting queue and need to be scheduled.