Question-1 What is boot block? What is Superblock? How they are used to handle file management system in OS?
- File systems are stored on disks. Most disks can be divided up into one or more partitions, with independent file systems on each partition.
- Sector 0 of the disk is called the MBR (Master Boot Record) and is used to boot the computer. The end of the MBR contains the partition table. This table gives the starting and ending addresses of each partition.
- One of the partitions in the table is marked as active.
- When the computer is booted, the BIOS read in and execute the MBR.
- The MBR program locates the active partition, reads in its first block, called the boot block, and executes it.
- The program in the boot block loads the operating system contained in that partition.
- For uniformity, every partition starts with a boot block, even if it does not contain a bootable operating system.
- Other than starting with a boot block, the layout of a disk partition varies strongly from file system to file system.
- Often the file system will contain some of the items shown in Fig. below.
- The first one is the superblock. It contains all the key parameters about the file system and is read into memory when the computer is booted or the file system is first touched.
- Typical information in the superblock includes a magic number to identify the file system type, the number of blocks in the file system, and other key administrative information.
- Next field may contain information about free blocks in the file system, for example in the form of a bitmap or a list of pointers.
- This might be followed by the i-nodes, an array of data structures, one per file, telling all about the file.
After that might come the root directory, which contains the top of the file system tree. Finally, the remainder of the disk typically contains all the other directories and files.
You may be interested in:
Operating System Short Descriptive Questions and Answers