Linux Kernal FS-inode&files(4)

2021SC@SDUSC

inode(2)

We've talked about inodes, so what are we doing here.After reading some blogs from several great coders, I finally notice that I am far from ultimately understand such structure, so I would like to start with inodes again about some new information.

One senior write in his blog that inode is actually the core of vfs, which means almost every operations to files are connected to this structure.One of the reason is that a inode directly map to single file, and you will have to access inode first before really started to read or write a file.One of the very important thing that ralated to inode is page cache.

Our cpu and ram runs a lot quicker than disks, and if we go to storage to get files every time we use them, it will be very slow than you ever expected, that is why all os realize their cache, so is linux kernal.So when you use a file which is recently used, the system will firstly check the cache for such file, if exsited, it won't go to hard disk for files again, instead they get file from cache.If the file being used is not in cache, the system will find it in disk and save it to the cache.Be aware that cache are quite smaller than any hardware so it is not possible to store all the files in cache, otherwise you won't need disks at all.So whe

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值