5.1.2 Describe the various methods of storing files
Contiguous allocation
- Each file occupies a set of contiguous blocks on the disk.
- Simple only starting location (block #) and length (number of blocks) are required.
- Random access.
- Wasteful of space (dynamic storage allocation problem).
- Files cannot grow.
Linked List Allocation (disc block)
Allow direct record acess.
Every file has own index block.
Support sequential and direct access.
Does not necessarily improve storage space use.
Larger file experience several index levels.
Indexed Allocation
- Brings all pointers together into the index block.
- Logical view.
- Need index table
- Random access
- Dynamic access without external fragmentation, but have overhead of index block.
- Mapping from logical to physical in a file of maximum size of 256K words and block size of 512 words. We need only 1 block for index table.
Comments
Post a Comment