When there is a cache miss , we need to go down in memory hierarchy , like from cache to memory .
so it says " memory access time is 1 nanosecond for a read operation with a hit in cache " this means when data us found in cache it takes 1 ns to fetch that data from cache to cpu.
1 nanoseconds time involved = time for cpu to reach cache + cache search time ( negligible, in real problems we ignore this time ) + time to reach from cache to cpu
This 1 ns time is for cache hit .
" 5 nanoseconds for a read operation with a miss in cache."
this means when a miss happen in cache, we go from cache to memory .
so 5 nanoseconds time involved = time to reach from cache to memory + search in memory ( negligible time ) + time to reach with data ( assume there is a hit in memory ) from memory to cache and copy it into cache + time for cache to reach this data into CPU ,
when there is a cache miss , we have to find that data into lower level, this takes more time than time taken in case of hit .
so that's why memory access time change depending on whether it's a hit or miss .