[理工] [計組]-I/O
題目
Assume that the initial setup of a DMA transfer takes 1000 clock cycles
for the processor,and assume the handling of the interrupt at DMA completion
requires 500 clock cycles for the processor.The hard disk has a transfer
rate of 4MB/sec and uses DMA.If the average transfer from the disk is 8KB
,what fraction of the 500MHz processor is consumed if the disk is actively
transferring 100% of the time?Ignore any impact from bus contention between
the proceesor and DMA controller.
答案
(1)每次DMA傳送所花費的時間=8KB/(4MB/sec)=2 * 10^-3 sec
((1000+500)clock/次)
(2)硬碟每秒所花費的時clock cycle = --------------------- =750*10^3 clock/sec
2 * 10^-3 sec/次
為什麼可以拿 DMA的setup time+handling interrup time來除以DMA傳送時間呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.42.215.32
推
01/07 01:37, , 1F
01/07 01:37, 1F
→
01/07 01:38, , 2F
01/07 01:38, 2F
→
01/07 01:47, , 3F
01/07 01:47, 3F
推
01/07 01:56, , 4F
01/07 01:56, 4F
→
01/07 01:57, , 5F
01/07 01:57, 5F
推
01/07 01:59, , 6F
01/07 01:59, 6F
推
01/07 02:02, , 7F
01/07 02:02, 7F
→
01/08 00:23, , 8F
01/08 00:23, 8F
→
01/08 00:27, , 9F
01/08 00:27, 9F
→
01/08 00:29, , 10F
01/08 00:29, 10F
→
01/08 00:30, , 11F
01/08 00:30, 11F
→
01/08 00:30, , 12F
01/08 00:30, 12F
→
01/08 00:34, , 13F
01/08 00:34, 13F
討論串 (同標題文章)