= Buffer cache key
{title2=$(d,b)$}
The identity used to find a <buffered device block>. In the fixed-block-size model, $d$ identifies the device and $b$ its block number; $(d_1,7)$ and $(d_2,7)$ are different keys if $d_1\ne d_2$. A <file>'s pathname or its logical block offset alone is insufficient for this device-indexed model. Interfaces supporting different transfer sizes need to specify the size and overlap rules too.
Maintain at most one logical <buffered device block> for each <buffer cache key> within this <buffer cache>. Otherwise two callers could modify different copies and later overwrite one another's changes. Lookup and reservation must therefore be coordinated by <synchronization (computing)>: even before contents are ready, a reserved key directs a second caller to the same structure. This invariant concerns the participating cache, not every copy of those <bytes> anywhere in the machine.
Back to article page