OS-Volume Structure and Free Space Control

Volume structure

The disk units of an OS use a specific layout to accommodate its way of working. The layout in Unix shows.

        Boot block - loads the main system loader
        Super block – details of disk size, inode, datablocks
        Data blocks – for files & sub-directries

We can add the volume using mount command & U mount to reverse process.

Free space control

The mkfs program creates a series of linked blocks, which each contain an array of free data block numbers, together with a pointer to the next block in the chain also, the super block contains a similar array and the start pointer of the chain.

To obtain a free block, OS consults the super block array and uses a block number therein, this number the being deleted from the array the chain pointer is used to locate the first of the chained pointer blocks. The list in this block is transferred to the super block and block removed from the chain. Freed blocks are added to the end of the chain.
OS-Volume Structure and Free Space Control Reviewed by 1000sourcecodes on 22:37 Rating: 5
Powered by Blogger.