The Design of Unix Operating System (5) the internal presentation of file
2010-04-01 16:07
519 查看
A inode contains information like owner, permissions, updated time and something elese, but doesn’t include the path name(s) of the file.
The in-core copy of the inode contains some additional fields: the status of the in-core node
the logical device number
the inode number
pointers to other in-core inodes. the in-core inodes are linked in the same way as the buffers.
a reference count indicating the number of instances of the file.
each disk node should have at most one in-core copy.
the in-core copy node will be locked when the process is executing a system call. And the lock will be released at the conclusion of the system call. A inode is never locked across system calls.
The reference count remains between system calls set to prevent kernel from reallocating an active in-core indoe.
The system call open() will encrement/decrement the reference count; while other system calls will allocate/release indoes.
If there’s no in-core inode in the free list, the kernel will return error instead of making the process asleep waiting for an inode. While the situation for buffer is different: since a buffer should not be locked across system calls, a buffer will be available after a system call.
(direcotry 和 super block, mount, link 等需要再好好看~)
owner |
group |
type(regular file, directory, pipe, ) |
permissions |
last accessed time |
last modified time |
inode last modified time |
file size |
disk address |
the logical device number
the inode number
pointers to other in-core inodes. the in-core inodes are linked in the same way as the buffers.
a reference count indicating the number of instances of the file.
each disk node should have at most one in-core copy.
the in-core copy node will be locked when the process is executing a system call. And the lock will be released at the conclusion of the system call. A inode is never locked across system calls.
The reference count remains between system calls set to prevent kernel from reallocating an active in-core indoe.
The system call open() will encrement/decrement the reference count; while other system calls will allocate/release indoes.
If there’s no in-core inode in the free list, the kernel will return error instead of making the process asleep waiting for an inode. While the situation for buffer is different: since a buffer should not be locked across system calls, a buffer will be available after a system call.
(direcotry 和 super block, mount, link 等需要再好好看~)
相关文章推荐
- The Design of Unix Operating System (2) kernel
- The design of Unix Operating System (1) overview of System V
- The Design Of Unix Operating System (4) Buffer cache
- Describe the process of opening a file in Linux system, what actions the operating system w
- [我研究] A TAXONOMY OF SECURITY FAULTS IN THE UNIX OPERATING SYSTEM - Master Thesis
- The design and Implementation of a Log-Structured File System
- Design and Implementation of the Sun Network File System
- Design and Implementation of the Sun Network File System
- Migrating to the Solaris Operating System: The Discipline of UNIX-to-UNIX Migrations
- 从软件设计角度下的操作系统发展轨迹——From the perspective of the software design of operating system course
- Resource is out of sync with the file system解决办法
- 解决eclipse中出现Resource is out of sync with the file system问题
- 解决eclipse中出现Resource is out of sync with the file system问题
- Eclipse Resource is out of sync with the file system 解决办法
- Resource is out of sync with the file system的解决办法
- File C:\Temp\Test.ps1 cannot be loaded because the execution of scripts is disabledon this system.
- 解决eclipse中出现Resource is out of sync with the file system问题
- Resource is out of sync with the file system
- eclipse 3.7 search 报resource is out of sync with the file system 解决方法
- Resource is out of sync with the file system解决办法