# Numerical problem on Access time in Cache memory

For a system with two levels of cache, define:

• $T_{c_1}$ is the first-level cache access time
• $T_{c_2}$ is the second-level cache access time
• $T_m$ is the memory access time
• $H_1$ is the first-level cache hit ratio
• $H_2$ is the combined first/second level cache hit ratio

Provide an equation for the average access time $T_a$ of a read operation.

• I'm not sure but is Ta = Tc1(H1) + (Tc2+Tc1)(H2) + (Tc1+Tc2+Tm)(1-H2) the way to solve it? @YuvalFilmus Mar 19, 2017 at 15:42
• Unfortunately I'm not your TA. If you can justify this formula, then it is probably true. You don't need us for that. Mar 19, 2017 at 15:43
• This is the exact problem I have (copied straight from the Stallings book), and I know posting HM is distasteful, but this post (the OP's comment specifically) helped me think about how to write an equation for such a question. I had no idea how to do it otherwise. Whether it's correct, I guess I need to figure this out. So...1+ Mar 8, 2021 at 3:42