Question: Problem 2 (.cpp, or .m or .py, or .java) We would like to use a program to compute the hit rate for a direct mapped

Problem 2 (.cpp, or .m or .py, or .java) We would like to use a program to compute the hit rate for a direct mapped cache configurations. Consider a Direct-Mapped with 4 blocks and 4 words per block. Write a program that takes references (one at a time) and returns one output, the hit rate. Your program should be dynamic. For example: After the first entry, the hit rate should be 0 After the second entry, the hit rate will be updated, After the nth entry, the hit rate will be updated Test your program and submit your result for: Where the references are: 0x00, 0x04, 0x10, 0x84, 0xe8, 0xa0, 0x400, 0x1e, 0x8c, 0xc1c, 0xb4, 0x884. Have Fun! Answer:??

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!