consider 4-block cache which is initially empty with the following main memory block references.
Identify the hit ratio for direct mapped cache?
Draw a cache with 4 blocks and number it 0-3 take the page number and find ( page number)%4. And assign it to the block you will get the hit ratio.
It is 0.3
Yes its correct we have to consider cache with 4 blocks and on applying mod 4 to each we can calculate the hit ratio. It is 0.3 .Both your answer and explaination are correct