• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 476
  • Last Modified:

Computer Organization Polling

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
krithi
Asked:
krithi
1 Solution
 
grg99Commented:
. 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
 
mbizupCommented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now