What is Compulsory miss?
A cache miss that inevitably occurs on the first access to data. A larger cache does not reduce it, but larger lines or prefetching can.
Japanese name: 初期参照ミス
A cache miss that inevitably occurs on the first access to data. A larger cache does not reduce it, but larger lines or prefetching can.
Japanese name: 初期参照ミス
Cache misses are classified into three kinds by cause: compulsory misses, which occur because data is touched for the first time; capacity misses, which occur because the cache is too small; and conflict misses, which occur because data competes for the same place. Of these, compulsory misses occur even in an infinitely large cache, because data that has never been read cannot already be in it. They are frequent just after a program starts and when it enters a new region of data.
The first method is to make the cache line larger, because one miss then brings in the neighboring data as well. With 64-byte lines, reading an array of 8-byte elements in order misses only once every 8 elements. If the line is made too large, however, fewer lines fit in the same capacity and other misses increase. The second method is prefetching. The processor detects regularity in the accesses, such as addresses increasing in sequence, and reads data in before it is used. A program can also use instructions that request a prefetch.
In processing that reads a very large array just once from beginning to end, almost all misses are compulsory. Enlarging the cache does not speed this up. What helps is prefetching and the rate at which data can be brought from memory. Laying data out at consecutive addresses as far as possible lets prefetching work well.
Answer: C. Compulsory, capacity and conflict misses
Cache misses are classified as compulsory (first access), capacity (evicted because the cache is too small) and conflict (competition for the same set). Remedies differ by cause: larger lines or prefetching for compulsory misses, a bigger cache for capacity misses, and higher associativity for conflict misses.
Answer: C. Conflict miss
Misses where two pieces of data fight over the same set and evict each other, even though the cache as a whole has room, are conflict misses. Raising associativity so a set can hold both, or offsetting one array so it maps to different sets, reduces them. Capacity misses arise because the working set exceeds the whole cache and persist even with full associativity. Compulsory misses happen on first access and do not describe repeated accesses.
Yes. It is sometimes called that in the sense of a miss that occurs while the cache is cold, that is, still empty.
It is not a compulsory miss. It occurs because data that was once loaded has been evicted, so it is a capacity miss or a conflict miss.
Compulsory miss appears in 5 practice questions across 2 topics, including Memory Hierarchy, CPUs and architecture.
As an Amazon Associate I earn from qualifying purchases.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.