• Support PF! Buy your school textbooks, materials and every day products Here!

Performance of the CPU

  • Thread starter ciakamel
  • Start date
  • #1
3
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?
 

Answers and Replies

  • #2
33,514
5,195
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.
 
  • #3
3
0
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.
 
  • #4
2
0
Same problem...can any1 help me 2 solve it????
 
  • #5
2
0
Bro can u help me too
 
  • #6
33,514
5,195
See what I said in post #2.

BTW, welcome to Physics Forums!
 
  • #7
33,514
5,195
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.
 
  • #8
3
0
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!
 

Related Threads on Performance of the CPU

Replies
7
Views
917
  • Last Post
Replies
9
Views
214
  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
13
Views
5K
  • Last Post
Replies
12
Views
3K
  • Last Post
Replies
1
Views
948
  • Last Post
Replies
0
Views
3K
Replies
1
Views
1K
Replies
2
Views
479
  • Last Post
Replies
2
Views
1K
Top