edited by
849 views
0 votes
0 votes
Consider a single level cache with an access time of 2.5ns with a block size of 64 bytes. Main Memory uses a block transfer capability that has a first word (4 bytes) access time of 50ns and an access time of 5ns for each word thereafter. If the hit ratio of the cache memory is 95%, then average memory access time is_______.

 

 

When to consider a Strict memory hierarchy method or Parallel accessing method in Solving these types of questions? By Default which way is followed?
edited by

2 Answers

1 votes
1 votes

Given line size is 64 bytes there are 64/4=16 words [since word size is 4] in a cache line fetch and first word is of 4 bytes having access time 50 ns and remaining fifteen have access time 75 ns(i.e., 50+75=125 ns )

Tavg=timecache+(1−hitcache)[timememory]

=2.5+(1−.95)[125]

=2.5+6.25

=8.75

edited by
1 votes
1 votes

level -> simultaneous access or parallel access-> H1(T1) +M1{(H2*T2) +(M2 * Tmemory)}

hierarchal  -> H1(T1) +M1[{H2*(T2+T1)} +{M2 * (T2+T1+Tmemory)}]

--------------------------------------------------------------------------------------------------------------------------------------------------

In question

Consider a single level cache

it means first formula will apply but

Main Memory uses a block transfer capability that has a first word access time of 50ns and an access time of 5ns thereafter

this line means that first we search in cache

if hit then we access in 2.5ns

and

if a miss occurs then

-> we access 16 words and transfer it to cache and access it

-> first transfer takes 50ns and remaining 15 words take 5 ns each

-> So Tmemory = 50+(15*5) ns=50+75 ns = 125 ns.

-> and then we access the word from cache in 2.5ns

---------------------------------------------------------------------------------------------------------------------------------------------------------

hence H1 = 0.95

           T1= 2.5

           M1 = 1-0.95 =0.05

            Tmemory = 125ns.

H1(T1) +M1(Tmemory + T1)

=> 0.95*(2.5)+0.05*(125 + 2.5)

=>2.375 + 6.375

=> 8.75 ns

edited by

Related questions

2 votes
2 votes
2 answers
1
0 votes
0 votes
0 answers
3