File System Consistency

Description

One of the file system management and optimization concerns
Ahmad Abdelwahed
Note by Ahmad Abdelwahed, updated more than 1 year ago
Ahmad Abdelwahed
Created by Ahmad Abdelwahed almost 9 years ago
10
0

Resource summary

Page 1

Two kinds of consistency checks can be made: blocks and files.To check for block consistency, the program builds two tables, each one containing a counter for each block, initially set to 0. The counter in the first table keep track of how many times each block is present in a file; the counter in the second table record how often each block is present in the free list.Missing block doesn't occur in either table. It do no real harm, they waste space and thus reduce the capacity of the disk. The solution to missing blocks is straightforward, the file system checker just adds them to the free list.Duplication free list occurs in twice in free list table. Solution is to rebuild the free list.Duplication data block occurs twice in data list, if we remove one of them then the same block will be in use and fee at the same time, and if we remove both the block will be put onto the free list twice.The appropriate solution is to allocate a free block, copy the contents of the duplicate block into it, and insert the copy into one of the files. In this way, the information content of the files is unchanged, but the file-system structure is at least made consistent. The error should be reported, to allow the user to inspect the damage.

Show full summary Hide full summary

Similar

Shared Files
Ahmad Abdelwahed
Components of An Operating System - Jason Madappattu
Jason EM
Why we need files
Ahmad Abdelwahed
File Naming
Ahmad Abdelwahed
File attributes
Ahmad Abdelwahed
OS1: Operating system basics
MpoMp
OS11: Interprocess communication
MpoMp
OS9: Processes
MpoMp
Operating Systems
bubblesthelabrad
OS10: Threads
MpoMp
OS Final
Hello World