Interaction of Page and Buffer Cache

Buffer heads become much more interesting when used in conjunction with the useful data that they are to hold in memory. This section examines the link between pages and buffer heads.

Linking of Pages and Buffer Heads

How are buffers and pages interlinked? Recall that this approach was briefly discussed above. A page is split into several data units (the actual number varies between architectures depending on page and block size), but the buffer heads are held in a separate memory area that has nothing to do with the actual data. The page contents are not modified by the interaction with buffers, as the latter simply provide a new view of the page data.

The private element of struct page is required to support interaction between a page and buffers. It is of type unsigned long and can therefore be used as a pointer to any positions in virtual address space (the exact definition of page is given in Chapter 3):

Continue reading here: Info

Was this article helpful?

0 0