Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For each of the following memory hierarchies, calculate the average memory acces

ID: 3690151 • Letter: F

Question

For each of the following memory hierarchies, calculate the average memory access time. If you end up with a fractional number of cycles, round up there isn't much you can do (besides read/write the register file) in half a cycle! The cache takes 1 cycle to access and has a 15% miss rate, main memory takes 1 cycles to access and has an 8% miss rate, and the disk takes 30,000 cycles to access. The cache takes 3 cycles to access and has a 92% hit rate, main memory takes 450 cycles to access and has a 96% hit rate, and the disk takes 15,000 cycles to access. This problem deals with a multi-level cache like those found in modem machines. The cache levels are listed in terms of their order in the memory hierarchy-an access initially goes to the level 1 (LI) cache. If there is a miss in the LI cache, you then check the level 2 (L2) cache, then the level 3 (L3) cache, and then main memory. The LI cache takes 1 cycle to access, with a 94% hit rate. The L2 cache takes 20 cycles on each access and has a 97% hit rate. The L3 cache takes 60 cycles to access and has a 99% hit rate. Main memory takes 500 cycles to access, with an 85% hit rate, while the disk takes 45,000 cycles to access.

Explanation / Answer

a) Average Mean Access Time (Amat) = (hit time) + (miss rate) × (miss penalty)
      where the miss penalty is simply the AMAT for the next level of the memory hierarchy.
      Therefore:

        AMAT = 1 + (0.15)(AMAT of Main Memory)
       = 1 + (0.15)(150 + (0.8)(AMAT of Disk)
       = 1 + (0.15)(150 + (0.8)(30000)
                   = 1 + (0.15)(150 + 2400)
                   = 1 + (0.15)(2550) = 1+382.5 = 383.5 Cycles round up to 384 cycles

b)   AMAT = 3 + (0.08)(AMAT of Main Memory)
       = 3 + (0.08)(450 + (0.04)(AMAT of Disk)
     = 3 + (0.08)(450 + (0.04)(15000)
     = 3 + (0.08)(450 + 600)
       = 3 + (0.08)(1050) = 3 + 84 = 87 Cycles

c) 1 + (0.06)(AMAt of L2 )
1 + (0.06)(20 + 0.03(Amat of L3)
1 + (0.06)(20 + 0.03( 60 + 0.01(amat of Main Memory)
1 + (0.06)(20 + 0.03( 60 + 0.01(500 + 0.15(AMAT of DISK)
1 + (0.06)(20 + 0.03( 60 + 0.01(500 + 0.15(45000)
1 + (0.06)(20 + 0.03( 60 + 0.01(500 + 6750)
1 + (0.06)(20 + 0.03( 60 + 0.01(7250)
1 + (0.06)(20 + 0.03( 60 + 72.5)
1 + (0.06)(20 + 0.03( 60 + 73)    72.5 rounded off to 73
1 + (0.06)(20 + 0.03( 133)
1 + (0.06)(20 + 3.99)
1 + (0.06)(24)     3.99 rounded off to 4 and added to 20
1 + 1.44 = 2.44cycles   round up to 3 cycles

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote