CPUs and architecture
What is the typical size of a cache line (cache block) in many CPUs?
- A1 byte
- B64 bytes
- C64 MB
Show answer and explanation
Answer: B. 64 bytes
Most CPUs transfer data between cache and main memory in 64-byte lines. Neighboring addresses are often used together (spatial locality), so fetching them as a block is efficient, and it matches DRAM bursts (8 transfers × 8 bytes = 64 bytes in DDR4). In multithreaded code, beware of false sharing, where separate variables in the same line cause cores to contend for it.
- A. Transferring one byte at a time would be inefficient.
- B. Correct. 64 bytes is typical.
- C. 64 MB is on the order of an entire cache's capacity, not a line size.