in CO and Architecture edited by
543 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
in CO and Architecture edited by
543 views

2 Answers

0 votes
0 votes
What is the answer for this?
0 votes
0 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