Performance of CPU: CPI, Interrupts & Shadow Registers

  • Thread starter Thread starter ciakamel
  • Start date Start date
  • Tags Tags
    cpu performance
Click For Summary

Discussion Overview

The discussion revolves around the performance of a CPU, specifically focusing on Cycle Per Instruction (CPI), the impact of interrupts, and the concept of shadow registers. Participants are analyzing how interrupts affect effective CPI and performance loss, as well as questioning the realism of the time required to restore shadowed registers.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant states that each instruction takes 5 cycles, equating to 50 nanoseconds, and calculates the interrupt cost as 30 cycles plus 20 cycles for restoring registers.
  • Another participant emphasizes that interrupts occur every 1/100 of a second, suggesting that an instruction will not be affected by more than one interrupt during its execution.
  • Some participants express a need for assistance in solving the problem, indicating a lack of initial attempts to analyze the situation.
  • There is a question raised about the realism of the 10 cycles required to restore shadowed registers.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the effective CPI or the performance loss due to interrupts. There are multiple viewpoints regarding the calculations and assumptions about the interrupt frequency and restoration time.

Contextual Notes

Some assumptions about the frequency of interrupts and the time taken to restore registers remain unresolved, and participants have not fully explored the implications of these factors on effective CPI.

Who May Find This Useful

This discussion may be useful for individuals interested in CPU architecture, performance analysis, and the effects of interrupts on computational efficiency.

ciakamel
Messages
3
Reaction score
0
A micro-instruction sequencing and execution machine has a clock cycle
time of 10 ns and a base Cycle Per Instruction (CPI) of 5. The possibility
of interrupts and (or) exceptions may happen in the middle of an
instruction that must have copies of the values of the registers at the
beginning of the instruction. These registers are usually called shadow
registers. Assume that the average instruction has two register operands
that must be restored on an interrupt. The interrupt rate is 100 interrupts
per second, and the interrupt cost is 30 cycles plus the time to restore the
shadowed registers, each of which takes 10 cycles. Analyze the
followings:
i) What is the effective CPI after accounting for interrupts?

ii) What is the performance loss from interrupts?

iii) Is 10 cycles to restore shadowed registers realistic?Anyone can help me with this question?
 
Physics news on Phys.org
Welcome to Physics Forums!

Since you're new here, you probably haven't noticed the rules (see the Rules item in the menu across the top of the screen). Before we can help you, you need to have made an effort at solving your problem.
 
Mark44 said:
Welcome to Physics Forums!

Since you're new here, you probably haven't noticed the rules (see the Rules item in the menu across the top of the screen). Before we can help you, you need to have made an effort at solving your problem.

Ok,thank you, i will show my attempts.
 
Same problem...can any1 help me 2 solve it?
 
Bro can u help me too
 
See what I said in post #2.

BTW, welcome to Physics Forums!
 
Each instruction takes 5 cycles = 50 nsec, right?

Interrupt cost = 30 cycles + 20 cycles = 50 cycles [itex]\neq[/itex] 500 nsec.

Interrupts happen every 1/100 of a second, or every 10,000,000 nsec, meaning that an instruction won't get hit with more than one interrupt. This also gives you some idea of how often an instruction will get hit with an interrupt, which I think you need to take into account in the effective CPI.
 
Mark44 said:
Each instruction takes 5 cycles = 50 nsec, right?

Interrupt cost = 30 cycles + 20 cycles = 50 cycles [itex]\neq[/itex] 500 nsec.

Interrupts happen every 1/100 of a second, or every 10,000,000 nsec, meaning that an instruction won't get hit with more than one interrupt. This also gives you some idea of how often an instruction will get hit with an interrupt, which I think you need to take into account in the effective CPI.

got it, thanks for the help!
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
Replies
29
Views
6K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 3 ·
Replies
3
Views
4K