Solved

# Computer Organization Polling

Posted on 2005-05-08
454 Views
Suppose that a 1GHZ processor needs to read 1000 bytes of data from a particular I/O device. The I/O device supplies 1 byte of data every 0.02ms. The code to process the data and store it in a buffer takes 1000 cycles.
. if the processor detects that a byted of data is ready through polling, and a polling iteration takes 60 cycles, how many cycles does the entire operation takes?
. if instead, the processor is interrupted when a byte is ready, and the processor spends the time between interrupts on another task, how many cycles of this other task can the processor complete while the I/O communication is taking place? the overhead for handling an interrupt is 200 cycles

Thnx
krithi
0
Question by:krithi

LVL 22

Accepted Solution

. if the processor detects that a byted of data is ready through polling, and a polling iteration takes 60 cycles, how many cycles does the entire operation takes?

Depends on what you mean exactly.  If "entire operation" means reading the whole 1000 bytes, that's going to take 1000 * 0.02ms, or 20 msec, which is 20 million cycles.  It doesnt matter how long the polling takes, as the polling loop has to wait for each byte.

If "entire operation" means reading one byte, that takes 1000 cycles, plus 60 cycles per loop, which again is easier to calculate in terms of the .02 msec pace.

. if instead, the processor is interrupted when a byte is ready, and the processor spends the time between interrupts on another task, how many cycles of this other task can the processor complete while the I/O communication is taking place? the overhead for handling an interrupt is 200 cycles

0.02 msec is 20,000 CPU cycles, and the I/O takes 1000 + 200 cycles, so there's 18,800 cycles left for other tasks
0

LVL 61

Expert Comment

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
Accept: grg99 {http:#13958536}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

mbizup
EE Cleanup Volunteer
0

## Featured Post

### Suggested Solutions

VB.net Code Gerators 3 474
FPA Financial Planning Accelerator 4 323
convert array of bytes  into hex string and back 11 620
port mapped I/o query 10 111
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…