Explain in brief about disk files system management in operating systems.
What is the disk files system management in operating systems?
538
02-Apr-2023
Updated on 05-Apr-2023
Krishnapriya Rajeev
05-Apr-2023One of the main management functions of the OS is file and disk management.
Computers tend to include secondary storage devices as they are a low-cost, non-volatile solution for the storage of programs and data, called files. The operating system is responsible for allocating space on secondary storage for these files.
Files (especially large ones) may be stored in non-contiguous locations on the physical disk drives. The OS needs to track the location of each and every fragment of the file on the disk. It must also be capable of locating each file and performing read and write operations on them as required
The disk management functions of the OS include:
Disk formatting is the process of configuring data storage devices before using them for the first time. The formatting that is done by the OS is low-level formatting, which is a form of physical formatting that erases all the data on the disk in such a way that it is irrecoverable.
This is performed in two steps:
2. Booting From Disk:
When the system is turned on, a small bootstrap loader program stored in the bootstrap ROM locates the OS kernel from the disk and loads it into the main memory so that the OS can start running.
Since this ROM is not programmable, in order to change the bootstrap code, one needs to change the ROM itself.
3. Recovery of Bad Sectors:
Due to the presence of moving parts, hard disks are prone to errors or damage. Sectors on a disk that are damaged so are known as bad sectors.
The disk controller maintains a list of all the bad sectors, using which it can logically replace each bad sector with a spare sector through a process called sector sparing or sector transfer.
This recovery process, however, is only triggered by a soft error. Irrecoverable hard errors may result in loss of data and require manual intervention.