📜  门| GATE-CS-2015(Set 1)|第65章

📅  最后修改于: 2021-07-02 15:18:42             🧑  作者: Mango

考虑一个磁盘组,其寻道时间为4毫秒,转速为每分钟10000转(RPM)。每个磁道有600个扇区,每个扇区可以存储512字节的数据。考虑存储在磁盘中的文件。该文件包含2000个扇区。假设每个扇区访问都需要进行搜索,并且访问每个扇区的平均轮换等待时间是一个完整轮换时间的一半。读取整个文件所需的总时间(以毫秒为单位)为_________。
(A) 14020
(B) 14000
(C) 25030
(D) 15000答案: (A)
解释:

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

这个问题的测验