60.9k views
0 votes
Suppose that a computer can read or write a memory word in 5 nsec. Also suppose that when an interrupt occurs, all 32 CPU registers, plus the program counter and PSW are pushed onto the stack. What is the maximum number of interrupts per second this machine can process?

User Allen Qin
by
7.4k points

1 Answer

3 votes

Answer:

2,941,176 interrupts per second

Step-by-step explanation:

Given that:

The number of words = 1 PSW (program status word) + 1 program counter + 32

CPU registers

= 34

The time taken to R/W a memory word = 5 nano seconds

Prior to the interrupt, 34 words are needed to be pushed into the stack, and 34 words are needed to pop out of the stack after the interrupt is handled.

Therefore, in total 68 words are needed during the Read and Write execution.

To calculate the number of interrupts handled by the machine, we have to first establish the time required to read and write 68 words:

= 68 x 5nsec

= 340nsec

= 340 x
10^(-9) sec (converting it to seconds)

maximum number of interrupts =
(1,000, 000,000)/(340)
= 2,491,176 interrupts.

User Anthony Raymond
by
8.2k points