Cache

cache

用(S, E, B, m)表示,m是计算机的位数,s是组的个数,E是每组E行,B是块的大小

t用来找组里的哪一行

s是组索引

b是块偏移

中位索引可以防止数据被整体换入换出

buffer and cache

link

Buffers are associated with a specific block device, and cover caching of filesystem metadata as well as tracking in-flight pages. The cache only contains parked file data. That is, the buffers remember what's in directories, what file permissions are, and keep track of what memory is being written from or read to for a particular block device. The cache only contains the contents of the files themselves.