recategorized by
2,184 views
1 votes
1 votes

Why we need to calculate miss penalty? I mean in miss rate we get every information about page table and valid/invalid bit. So, still why we calculating miss penalty?

got some information here and here

Still I want to know, if only error calculation done by miss penalty? 

 

recategorized by

1 Answer

Best answer
2 votes
2 votes

Before I attempt to clarify, I quote your statement

I mean in miss rate we get every information about page table and valid/invalid bit

We do not get anything in miss rate. Miss rate is defined as number of times, a page could not be found in main memory. Suppose you access main memory 100 times for different pages and out of this, 90 times, you get a page in main memory while for other 10 times, you do not find a page in main memory. So, for 10 accesses you missed to find a page in main memory. This is 10% of the total accesses. So, miss rate here is 10%.

Now, that you are clear with miss rate, let me attempt to clarify miss penalty. When you missed to find a page in main memory, you would need to

  • Find a page in secondary memory i.e access secondary memory
  • Transfer a page from secondary memory to main memory
  • Optionally, may need to save the page present in main memory to secondary memory if the page has to be replaced with the page currently obtained from secondary memory needs to be put at the same 

Above operations were not needed had you found a page in main memory, as you would have directly accessed it. All above operations are costing you extra time (and yes a processing power). This means above operations are something extra that you are doing as you missed to find a page in main memory. This means you are being penalized for not being able to find a page in main memory, by the way of performing extra operations to get a page. This is called miss penalty.

Hope this helps !

selected by

Related questions

1 votes
1 votes
0 answers
1
srestha asked Dec 27, 2018
414 views
Suppose there are $2$ level cache. If there are $L_{1}$ and $L_{2}$ are $2$ level cache, if both have some miss rate, then still why we need miss penalty for cache in bo...
1 votes
1 votes
1 answer
2
MayankSharma asked Aug 29, 2018
2,432 views
Are miss latency & miss penalty same in cache?if no then what's the difference???
3 votes
3 votes
1 answer
3