File control block storage structure consisting of

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: esides on secondary storage (disks). File control block – storage structure consisting of information information about a file (kept within directory) User issues a file logical address LA … turned into physical physical disk address Typical disk block is 4K – disk operations allow random seek File File-System Structure File size constrained by address range of machine; a 32 32-bit file pointer/offset can address 4 GB only - though on some filesystems, files can exceed this OS OS maintains free disk blocks (also stored on the disk itself) Contiguous Contiguous Allocation Each Each file occupies a set of contiguous blocks/sectors on the disk. Simple – only starting location (disk block #) and length (number (number of blocks or bytes) are required. Accessing block b+1 after block b normally requires no disk head movement modulo disk scheduling algorithm (BIG win) Example Example Contiguous Contiguous Allocation Problems Linked Linked Allocation Each file is a linked list of disk blocks: blocks may be scattered anywhere on the disk. disk block = pointer data Allocate as needed, link together; e.g., file starts at block 9 count directory: contiguous File start length count 2 2 Linked Linked Allocation (Cont.) Simple – need only starting address Free-space management – less waste of space Files Files can grow Problems: Linked Linked Allocation (Cont.) File Allocation Table (FAT) stored on disk (MS-DOS, OS-2) directory name Start block 217 217 339 indexed by physical block 618 618 End-of-file 339 -1 Grow: look for first 0 entry in FAT Random access improved if cached in memory (read the FAT … stored contiguously at well-known location on disk). Could have two seeks per block unless cached in memory. Problems Problems with FAT FAT is like a big page table 40 GB disk and 4K disk blocks-> 40 MB of space Break Break Indexed Indexed Allocation Want efficient random access with pointer blocks, and more memory efficient Brings all pointers...
View Full Document

This document was uploaded on 04/02/2014.

Ask a homework question - tutors are online