Storing Files
Files can be allocated on disk in different ways, e.g.:
- 1. contiguous allocation
- like memory
- fast and simplifies directory access
- inflexible, causes fragmentation, needs compaction
- 2. linked structure
- each block points to next block, directory points to first
- good for sequential access (bad otherwise)
- 3. indexed structure
- an “index block” contains pointers to many other blocks
- better for random access
- may need multiple index blocks (linked together)