作者jim055006 (好崩潰)
看板Grad-ProbAsk
標題[理工] [OS]Disk transfer
時間Thu Dec 15 20:41:10 2011
(1)Consider a disk drive whose transfer speed to the memory over the bus
is 100 Mbps and the speed to read blocks right under its disk head depends
on how fast its disk rotates. Suppose that the rotation speed is 600 rpm,
there are 1200 blocks, of 4K bytes each, in each track, and the disk drive
cannot transfer and read at the same time. What interleaving factor should
be designed, so that the disk head can read blocks of contiguous order
without skipping a desired block at the first chance ?
(Note that an interleaving factor of n means the disk controller reads one
block and then skips n blocks under the disk head.)
(A)2 (B)3 (C)4 (D)5 (E)6
答案是給 C
我求出了轉一圈要花10^(-1)秒
一秒可讀取48M的資料
但是還是不知道題目要求的比例是啥??
去除以100M也得不到4= =
請問這題到底要算啥??
------------------------------------------------------------------------------
(2)An IDE hard disk spins at 7200 RPM, has 2 megebytes internal cache, 5000
cyclinders, 20 tracks per cylinder, 120 sectors per track, 512 bytes per
sector,
and connects to a computer via Ultra ATA/133 interface at a speed of 133
megebytes per second.
a.Calculate the disk size.
b.Estimate the sustained transfer rate of this drive in megabytes per second.
c.Suppose that the average seek time for the drive is 4 ms. Estimate the I/Os
per second and effective transfer rate for a random-access workload that
reads
individual sectors scattered across the disk.
d.Calculate the random-access I/Os per second and transfer rate for I/O sizes
of
4KB, 8KB, and 16KB.
e.If the hard disk connects to a computer via USB 1.0, 1.1 and 2.0 at speed of
1.5, 12 and 480 Megabits per second respectively, please estimate the
sustained transfer rate of this drive via a different USB interfaces from a
device driver point of view.
想問bcde要如何算XDD
因為不太了解他後面的一些敘述
-------------------------------------------------------------------------------
以上
有勞高手解惑
鋼溫!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 223.140.227.136
推 louis719:第一題我猜他是問傳輸一個block的時間 相當於磁碟頭轉過 12/16 17:09
→ louis719:了幾個block 12/16 17:09
→ louis719:我這樣算是3.84 雖然有點誤差 不過蠻接近答案的 12/16 17:09
不好意思我不太懂ㄝ
傳輸一個block的時間 相當於磁碟轉了幾個block??
※ 編輯: jim055006 來自: 223.142.237.142 (12/16 23:24)
推 louis719:抱歉我可能講不太清楚,題目是想問你 假設disk傳資料經過 12/17 09:27
→ louis719:bus的時候,磁碟頭會繼續轉(不會停),那麼你透過bus傳完 12/17 09:28
→ louis719:一個block後,磁碟頭已經不是在原本的位置了 12/17 09:28
→ louis719:假設我們沒有考慮這點,我們可能會把資料配置在連續的blo 12/17 09:29
→ louis719:ck,方便磁碟頭連續讀取。但若是傳輸bus的時候,磁碟頭會 12/17 09:30
→ louis719:繼續轉,則要在兩個連續的block中間空幾個block出來?才 12/17 09:31
→ louis719:可以讓他們連續讀取而不錯過 12/17 09:31
→ louis719:算出來應該是3.84 取roof(要大於3.84的整數),就是4了 12/17 09:33
所以是要先算出傳bus傳一個block需要多少時間
再去除以磁頭轉一個block需要多少時間??
是這樣算嗎??
※ 編輯: jim055006 來自: 223.142.242.2 (12/18 00:44)
推 louis719:是的 12/18 01:02
所以
一個block為4KB
去除以100Mbps的bus
得到
1/25000秒
然後磁頭轉過一個block需要1/12000秒
那我除出來的結果是12/25ㄝ??
跟louis大你求出來的差很大
請問我是錯在哪??
※ 編輯: jim055006 來自: 223.140.209.195 (12/19 23:46)