edited by
989 views
0 votes
0 votes
A CPU scans the status of output I/O device every 20ms. The interface for the I/O device includes two different parts one for status and other for data output. Assume the clock rate of CPU is 8MHz and every instruction takes 10 cycles. What is the time taken(in microseconds) to scan and service the I/O device by CPU?

A)4.5

B)3.75

C)1.25

D)2.5
edited by

2 Answers

1 votes
1 votes
At 8 MHz,

processor has a clock period of TCycle = 1/8 M = 0.125 μs

Instruction cycle = 10 × 0.125 = 1.25 μs.

 

To check status requires one input-type instruction to read the device status register.

 

At least one other instruction to examine the register contents.

 

 If the device is ready, one output-type instruction is needed to present data to the device handler.

 

The total is 3 instructions requiring time T = 3 * 1.25 = 3.75

Related questions

2 votes
2 votes
1 answer
2
kimaya asked Jul 8, 2017
794 views
The solution says that the answer should be 80, but applying the formula (x/y)*100, where x is 250 and y is 200 fraction comes out to be greater than 1. Am i making a mis...