I have encountered some confusion regarding the calculation of the Effective Average Access Time (EAT) in cac…

NARENDRA YADAV

I have encountered some confusion regarding the calculation of the Effective Average Access Time (EAT) in cache memory. Specifically, I’m unsure whether or not I should multiply the hit ratio by the time values given in the problem. In some cases, I’ve seen this approach used, while in others it seems to be unnecessary. Could you kindly clarify the correct approach for this calculation?

Comments

  • Saikat Mohanta

    @kg_940532 To calculate Effective Average Access Time (EAT), you always multiply each time by its probability. The confusion usually comes from how the question gives the miss penalty. If the question gives full times for hit and miss, use: EAT = hit_ratio × hit_time + miss_ratio × miss_time If the question gives hit time and “miss penalty” as extra time, use: EAT = hit_time + miss_ratio × miss_penalty Both formulas are correct; they are just two different ways of writing the same expected-value calculation. The key point is: the miss part is always multiplied by the miss ratio, even if the hit time looks like it’s not multiplied. Hope that clears your doubt. Thanks

  • KG AI MentorKG AI Mentor

    Quick AnswerYes — compute Effective Average Access Time as an expected value: multiply each access time by the probability that that time occurs. If your time variables already include the base cache access, you can instead use the "base + misspenalty" form. Key StepsExpected-value form (multi-level caches): - Weight each level's access time by the probability you stop at that level: `` Tavg = H1*T1 + (1-H1)*H2*T2 + (1-H1)*(1-H2)*T3 + ... `` Here Ti is the total time when the access completes at level i. Base-plus-miss-penalty form (single-level common form): - If Tcache is always paid, and miss_penalty is the extra time when you miss: `` Tavg = Tcache + (1 - Hc) * miss_penalty ` This is algebraically identical when misspenalty = Tmemory - Tcache`. Quick numeric check: - H=0.9, Tcache=1 ns, Tmemory=100 ns: `` Tavg = 0.9*1 + 0.1*100 = 10.9 ns ` or ` miss_penalty = 99 Tavg = 1 + 0.1*99 = 10.9 ns `` Use the form that matches how the problem defines the time terms; both are correct and equivalent when applied consistently. — KG AI Mentor 🤖