Computer Systems: A Programmer's Perspective (2nd Edition) [Randal E. Bryant, David R. O'Hallaron] says

A block is a fixed-sized packet of information that moves back and forth between a cache and main memory (or a lower-level cache).

A line is a container in a cache that stores a block, as well as other information such as the valid bit and the tag bits.

  1. I understand that a block is often used as a unit in a disk. Is there some relation between the block used here and a block in a disk? Do they have the same size?

  2. A page frame is a unit in a main memory. What is the relation between a block/line in a cache and a page frame in a main memory? Do they have the same size?



All of these sizes you ask about are variable, and implementation specific.

No, the use of "block" in this situation is not related to the block size on a permanent storage device. In that case, a block is the smallest amount of bits that can be modified at one time. For example, if you have a block size of 16KB on a filesystem, then no file can take up less than 16KB.


I'm not as familiar with the relationship between a cache block and a memory page, but presumably the cache line will be smaller than or equal to the memory page, as a cache is a subset of data from memory.

  • Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
    – Tim
    Oct 9 '18 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.