看板 Grad-ProbAsk 關於我們 聯絡資訊
1. An I/O device whose maximum bandwidth is 100,000 bits/sec is connected to a computer system. The I/O controller interrupts the CPU whenever it receives a byte. The interrupt handling routine consists of 100 instructions. The CPU executes 10 million instructions per second on the average. What percentage of the CPU's time is used to serve the I/O device, asuming that the device transmits data with the maximum speed? (a)1.25% (b)2.5% (c)12.5% (d)25% 答案是(C) 100,000 bytes 我的算法是 100,000 bits/sec = ------------- --> 8 * 10^(-5) sec/byte 8 sec 100 instructions --------------------------- = 10^(-5) sec 10 * 10^6 instructions/sec 10^(-5) 1 1 所以答案是 --------------------- = --------- = --- = 0.111 10^(-5) + 8*10^(-5) 1 + 8 9 可是答案看起來好像是 1/8 = 0.125 也就是說傳輸的時候 interrupt handling routine 也同時在進行嗎@@? -- 人家可不是為了你才這樣做的哦! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.198.35.85