in CO and Architecture
6,275 views
4 votes
4 votes
Suppose that a cache is 20 times faster than main memory and cache memory can be used 80% of the time. The speed up factor that can be achieved by using the cache is
in CO and Architecture
6.3k views

3 Answers

8 votes
8 votes
Best answer

Let Cache access time is X, then main memory access time will be 20X .

Speed up factor = (Time taken to get data W/O Cache)/(Time taken to get data with Cache)

Time taken to get data W/O Cache: 20X

Time taken to get data with Cache: .8X + .2(20X) =4.8X

Then speed up will be 20X/(4.8X) = 4.166 (Answer)

selected by

2 Comments

Time taken to get data with cache : .8X+.2(20X+X) = 5X.

Isn't this so?
0
0
No, As nothing is given regarding the  type of access we should go with simultaneous access.
1
1
4 votes
4 votes

Soverall = ((1-f) + ∑$\frac{f}{s}$)-1 
 
           = ((1-.8) + ( $\frac{.8}{20}$) -1

           = 4.166

3 votes
3 votes
Hierarchical access to main memory..
T​c : Cache Access Time, T​m : Memory Access time, Tm = 20T​c, Hit Ratio = 0.80

Effective access Time = Tc + 0.20 *Tm = Tc + 0.20*20Tc = 5*Tc
Speed Up = Memory Access Time Without Cache / Memory Access Time With Cache
= Tm/Effective Access time = 20*Tc/5*Tc

Speed up = 4

14 Comments

you have to mention that you considered hierarchical access to main memory (main memory accessed only when a cache is missed and strictly after that). This is true for read access (most probably applicable here) but for write access and write through cache by default simultaneous access is done.
0
0

@Arjun Sir, @srestha Ma'am

here without Hierarichal we are getting 4.16

and with hierarchy =4 ,

in Q it is saying it is referring cache 80% for rest 20% it will first check cache then MM , 

we should take hierarchy apprach ?

0
0

@Shaik Masthan when to use hierarchical access and when to use simultaneous..plz clarify this!

0
0
No, default is hierarchical.
1
1
edited by

sir, if it is simultaneous  access

$T_{avg} = h_1 T_1 + \color{red}{\underbrace{(1-h_1)}}\color{green}{\underbrace{(h_2.T2+(1-h_2).T_M}})$

So, the red color part is Miss ratio of L1 cache and Green color part is Miss penalty of L1 Cache.

Penalty is some thing we have to access extra ! (just like in case of pipelining)

 

if it is sequential/hierarchical access

$T_{avg} = h_1 T_1 + \color{red}{\underbrace{(1-h_1)}}\color{green}{\underbrace{(h_2.(T_1+T_2)+(1-h_2).(T_1+T_2+T_M}})$

so, at any case we have to access the $L_1$, then

==> $T_{avg} = T_1 + \color{red}{\underbrace{(1-h_1)}}\color{green}{\underbrace{((T_2)+(1-h_2).(T_M}})$

So, the red color part is Miss ratio of L1 cache and Green color part is Miss penalty of L1 Cache.

Penalty is some thing we have to access extra !

 

3
3
The third equation you gave is for hierarchical or sequential? It seems a mix of 2.
0
0
sir, the third eqn given is

" when miss penalty given and it is sequential access "

 

" Is sequential or hierarchy are both same ? "

i hope, sequential means, level by level we have to go,

hierarchy means parallel !
0
0
No, actually both are same. Hierarchical is sequential access. "Simultaneous" is the different one. In your third equation you are using hierarchical for L1 and simultaneous for L2.
0
0

actually both are same. Hierarchical is sequential access

these terms just confused me !

thanks you sir !

 

In your third equation you are using hierarchical for L1 and simultaneous for L2.

unfortunately it's a typo !

0
0
Ok :) I edited your comment. It is clear rt?
0
0
Yes sir, now it's clear !
1
1
edited by

@Arjun sir and @Shaik Masthan sir 

what about the miss penalty of L2 cache

pls chk this

in case of parallel/simultaneous = $ h_1t_1 + (1-h_1)( \color{green}{h_2}.t_2 + (1-h_2)\color{red}{t_m})$

in case of sequential/hierarchial​​​​​​= $ t_1 + (1-h_1)( t_2 + (1-h_2)\color{red}{t_m})$

in both the cases is it tm??

0
0

@ brother I m not getting ur third equation..What is it really meant for?

0
0

thats just the reduced expression of equation 2 @himgta

0
0
Answer:

No related questions found