Beruflich Dokumente
Kultur Dokumente
File-System Structure
File structure
29 November 2012
Inode list
Data blocks
Super
block
29 November 2012
Allocation Methods
Contiguous allocation
Linked allocation
Indexed allocation
29 November 2012
29 November 2012
Linked Allocation
29 November 2012
File-Allocation Table
29 November 2012
29 November 2012
29 November 2012
Inode
10
Inode structure
10 / 12 direct
1 single indirect
1 double indirect
1 triple indirect
29 November 2012
11
29 November 2012
12
Example
Assume
29 November 2012
13
29 November 2012
14
4096
228
45423
0
0
11111
0
367
101
367
0
0 331
75
428
3333
9156
824
29 November 2012
9156
331
3333
15
E.g. 1
29 November 2012
16
E. g. 2
29 November 2012
17
29 November 2012
18
Directories
Are the files that give file system its hierarchical structure.
They play important role in converting file name in to inode
number.
Directory is a file whose content is sequence of entries
Each entry consist of inode number and the name of a file
contained in the directory.
UNIX system restrict component names to a maximum of 14
characters, and 2 byte inode number.
Size of one directory entry is 16 bytes.
Every directory contain file names dot and double dots with inode
number of its directory and its parent directory respectively.
Access Permissions
Read allows a process to read the directory
Write allows process to create, remove directory entries.
Execute allows process to search the directory for a file name.
29 November 2012
19
fopen(/etc/passwd,r)
fopen(OS/Compre/CompreQ.pdf,r) where
current directory is /root/CSC372_ISC362
29 November 2012
20