One 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:
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:
Dividing the disk into multiple cylinder groups, where each group is treated as a logical disk.
Storing the data structures for the first file system onto the disk. This contains both free space and allocated space.
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.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
One 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.