What is the difference between buffer and cache memory in Linux?

后端 未结 12 1255
慢半拍i
慢半拍i 2020-12-02 03:33

To me it\'s not clear what\'s the difference between the two Linux memory concepts : buffer and cache. I\'ve read through this post and it seems to

12条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 04:16

    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.

    quote link

提交回复
热议问题