| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3763 人关注过本帖
标题:VFS 概念的一点小补充
只看楼主 加入收藏
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
结帖率:98.63%
收藏
 问题点数:0 回复次数:0 
VFS 概念的一点小补充
虽说VFS是介于应用程序和特定文件系统之间的一层

但在一些情况下VFS可以不用唤醒底层的程序而进行一个文件操作。

比如进程关掉一个open file,其实磁盘上的文件甚至连碰都不需要碰。

VFS只需要释放掉相应的file object就可以了。

同样的,当系统调用lseek()去修改一个文件指针时,

其实是open file 和进程之间的互相影响,VFS只需要修改相应的file object,

而不需要实际访问磁盘上的文件,所以同样不需要调用一个特别的文件系统程序。

顺便把英文贴上来
We said earlier that the VFS is a layer between application programs and specific filesystems. However, in some cases, a file operation can be performed by the VFS itself, without invoking a lower-level procedure. For instance, when a process closes an open file, the file on disk doesn't usually need to be touched, and hence the VFS simply releases the corresponding file object. Similarly, when the lseek( ) system call modifies a file pointer, which is an attribute related to the interaction between an opened file and a process, the VFS needs to modify only the corresponding file object without accessing the file on disk, and therefore it does not have to invoke a specific filesystem procedure. In some sense, the VFS could be considered a "generic" filesystem that relies, when necessary, on specific ones.


[ 本帖最后由 madfrogme 于 2012-8-2 00:54 编辑 ]
搜索更多相关主题的帖子: 系统 应用程序 earlier file 
2012-08-01 23:47
快速回复:VFS 概念的一点小补充
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019052 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved