-- Mar 21 In-class Exercise Thread
- let I = [I1,I2, I3]
Round_1 = I2, I1,I2,I1,I3
Round_2 = I3,I3,I2,I2,I2,I2,I1
- cache = [I1,I3]
I2 - cache Miss eject I3,
I1 - cache = [I1,I2]
I2 - cache = [I1,I2]
I1 - cache = [I1,I2]
I3 - cache Miss eject I1 cache = [I2,I3]
Round 1 -----
I3 - cache = [I2,I3]
I3 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I1 - cache Miss
end of Round 2 ____
- cache = [I1,I3]
I2 - cache Miss eject I1,
I1 - cache = [I2,I3] cache miss eject I2
I2 - cache = [I1,I3] cache miss eject I3
I1 - cache = [I1,I2]
I3 - cache Miss eject I1 cache = [I2,I3]
end of Round 1 -----
I3 - cache = [I2,I3]
I3 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I1 - cache Miss eject I3
end of Round 2______
LRU has 5 misses - 4 for the first sequence and 1 for the second sequence
- Hk = 1+ 1/2 = 1.5
Number of cache misses for LRU = 5 > Hk
1. let I = [I1,I2, I3]
Round_1 = I2, I1,I2,I1,I3
Round_2 = I3,I3,I2,I2,I2,I2,I1
2. cache = [I1,I3]
I2 - cache Miss eject I3,
I1 - cache = [I1,I2]
I2 - cache = [I1,I2]
I1 - cache = [I1,I2]
I3 - cache Miss eject I1 cache = [I2,I3]
Round 1 -----
I3 - cache = [I2,I3]
I3 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I1 - cache Miss
end of Round 2 ____
3. cache = [I1,I3]
I2 - cache Miss eject I1,
I1 - cache = [I2,I3] cache miss eject I2
I2 - cache = [I1,I3] cache miss eject I3
I1 - cache = [I1,I2]
I3 - cache Miss eject I1 cache = [I2,I3]
end of Round 1 -----
I3 - cache = [I2,I3]
I3 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I2 - cache = [I2,I3]
I1 - cache Miss eject I3
end of Round 2______
LRU has 5 misses - 4 for the first sequence and 1 for the second sequence
4. Hk = 1+ 1/2 = 1.5
Number of cache misses for LRU = 5 > Hk