https://gateoverflow.in/?qa=blob&qa_blobid=11423634474127333130
In this from slide 17 gives AMAT for a 2-level cache.
Let L1 cache access time=x cycles
Then L2 cache access time=2x cycles.
100 references to L1 cache, out of which 20 missed, $Missrate_{L1}=\frac{20}{100}=0.2$
These 20 misses of L1 cache are looked into L2 cache of which 10 misses occur in L2.
So $Missrate_{L2}(Local\,Miss\,Rate)=\frac{10}{20}=0.5$
$Global\,Miss\,Rate_{L2}=\frac{10}{100}=0.1$
Assuming Local miss rate of L2, goes below calculation.
$Misspenalty_{L1}=Hit\,Time_{L2}+(Miss\,rate_{L2} \times Miss\,Penalty_{L2})=2x+(0.5 \times 40)=2x+20$
$AMAT=Hit\,Time_{L1}+(Miss\,rate_{L1} \times Miss\,Penalty_{L1})$
$7.6=x+0.2(2x+20)$
$7.6=1.4x+4$
$x=2.57$
Since $x$ is the L1 cache access time in cycles, number of cycles must be integral, so it has taken 2 cycles plus 0.57 of another cycle so appx 3 cycles.
So, Access time L2=6 cycles.
Let me know if there is something wrong here.