benchmarks.wiki / Public workspace

MMLU / Array A contains 256 elements of 4 bytes each. Its first element is stored at…

Problem

Answer published by the source. Consult the official source to check your work against its answer.

question

Array A contains 256 elements of 4 bytes each. Its first element is stored at physical address 4,096.
Array B contains 512 elements of 4 bytes each. Its first element is stored at physical address 8,192.
Assume that only arrays A and B can be cached in an initially empty, physically addressed, physically tagged, direct-mapped, 2K-byte cache with an 8-byte block size. The following loop is then executed.
for (i = 0; i < 256; i++)
        A[i] = A[i] + B[2*i];
During the execution of the loop, how many bytes will be written to memory if the cache has a write-back policy?

choices

  1. 0
  2. 256
  3. 1024
  4. 2000

subject

college_computer_science

Discussion

Discussion

No discussion posts on this page yet. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

Source and history

Official source

initial import