The Gateway to Computer Science Excellence
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?
in CO and Architecture by Active (1.2k points)
edited by | 100 views
8.875 given in the answer key.
check my answer
with the first formula getting incorrect answer.

I think the correct answer is 8.75 here (by applying hierarchical  access method ) but the thing how should we decide when to use hierarchical and when to use parallel access criteria?
it will be given in the question, in case nothing is given then by default, we should consider Heirarchical access method

2 Answers

0 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 )





by Active (2.5k points)
edited by
Bro, I don't see where Hierarchical access is mentioned in the question?

access time of 50ns and an access time of 5ns for each word thereafter

This is the line from which we can have the hint. Its clearly mentioning the hierarchical access.


@Ashwani Yadav

One thing for sure.. either way you can interpret the question. Here the given statement favors more to hierarchical. But if you think it differently simultaneous also might work. GATE would mention it hopefully.

But if nothing is given, we should go with hierarchical method :)


@Shamim Ahmed

why have u not multiplied 2.5 with 0.95 ?

It would fetch same result only:

0.95*2.5+(1−.95)[2.5+125] = 8.75
0 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


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

by Boss (25.1k points)
edited by
u have calculated it wrong . check again 6.25+2.375 = 8.625
Sorry , now corrected
so according to u 8.625 is the correct answer?
8.75... now corrected
so what should we assume if nothing is given? Hierarchical access or parallel?


Don't mug up any formula except the one given below for these kind of each line of question then u will understand what to do. try to visualize what is happening,

Hit rate * ( how much time if hit occurs) + miss rate * (how much time if miss occurs)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,834 questions
57,821 answers
108,303 users