-2
$\begingroup$

The following code snippet is executed on a system that uses a cache with a size of 128 bytes and a block size (1 row width) of 32 bytes. The array holds 2-byte int values.

for (int j = 0; j < step; j++) {
    for (int i = 0; i < 128 / step; i++) {
        A[i * step + j] = j;
    }
}

Find the step values that result in the highest and lowest hit rates (the rate at which the desired data is found in the cache) for a cache with a direct-mapped structure.

$\endgroup$
1
  • 1
    $\begingroup$ We discourage posts that are simply the statement of an exercise-style task (and implicitly, a command for us to solve it). This site is a place where people can collaborate to build an archive of knowledge that will be helpful to others in the future. We're happy to help you understand the concepts but just solving exercises for you is unlikely to achieve that. You might find this page helpful in improving your question. $\endgroup$
    – D.W.
    Commented Nov 25 at 0:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.