0% found this document useful (0 votes)
17 views

Internal Representation of Files - 1

Uploaded by

jesawid181
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Internal Representation of Files - 1

Uploaded by

jesawid181
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Internal Representation of Files(1)

Low Level File System Algorithms

File System Algorithms


 iget-returns a previously identified inode
 iput- release the inode
 bmap -sets kernel parameters for accessing a file
 namei -converts a user level path name to inode
using iget, iput and bmap
 alloc and free allocates and free disk blocks for
files
 ialloc and ifree assign and free inodes for files
INODES

Disk inodes consist of following fields


File owner identifier- individual and group owner (Super user has access rights

to all files in the system).


File Type -Regular, Directory, character or Block Special File

File Access Permission- The System protects files according to three classes the

owner and the group owner and other users (read, write and execute)
File Access times- time the file was last accessed and modified file and inode

modified.
INODES

Number of Links – number names the file has in the


directory hierarchy
Table of Content for the disk addresses of data in a file.
The users treat the data in a file as a logical streams of
bytes, the kernel saves the data in discontinuous disk
blocks
File Size- Data in a file is addressable by the number of
bytes from the beginning of the file, starting from byte
offset 0, and the file size is one greater than the highest
byte offset of the data in the file.
In-Core INODES
The in-core copy of the inode contains the following fields in addition to the fields of the disk inodes
 Status of the in-core inode

 Locked
 Waiting process for inode to become unlock
 The in core representation of the file differs from the disk copy as a result of a change to the data in the inode
 The in core representation of the file differs from the disk copy as a result of a change to the file.
 File is a mount point
 The logical device number

 Inode number

 Pointers to other in-core inodes (like Buffer pool free list and hash queue)

 A reference count, indicating the number of instances of the file that are active

You might also like