We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5
Internal Representation of Files(4)
The Namei Algorithm Super block
Super block consist of
The size of the file system The number of free blocks in the file system A list of free blocks available on the file system The index of the next free block in the free block list The size of the inode list The number of free inodes in the file system A list of free inodes in the file system The index of the next free inode in the free inode list Lock fields for the free block and free inode lists A flag indicating that the super block has been modified Inode assignment to a new file The file system contains a linear list of inodes An I node is free if its type field is zero When the process needs a new inode, the kernel searches the inode list for a free inode using super block. Super block contains an array to cache the number of free inodes in the file system The kernel first verifies that no other process have locked access to the super block free inode list. If the list of inode number in the super block is not empty, the kernel assigns the next inode number, If the super block list of free inodes is empty, the kernel searches the disk and places as many free inode number as possible into the super block. The kernel reads the inode list on disk, block by block , and fills the super block list of inode number to capacity, remembering the highest- numbered inode that it finds, calls that inode “remembered” inode The next time the kernel searches the disk for free inodes it uses the remembered inode as its starting point Free inode count is decremented in super block when inode is assigned ialloc algorithm