Unlike fat index block is stored on a per file basis

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: together into the index block/table. Unlike FAT, index block is stored on a per-file basis like a mini-FAT (sized to fit into a disk block) Logical view: index table Example Example of Indexed Allocation address of index index block Index blocks are usually fixed size arrays: some wasted space Indexed Indexed Allocation (Cont.) Random access and reduced external fragmentation, but have have overhead of index block. How big? How to store it? Example: Example: suppose max file size is 1024 KB with a block size of 2KB 2KB how big is index table? Indexed Indexed Allocation – Mapping (Cont.) Most files are small: hence small index block should be ok, but how to store large files? Chain index blocks together Linked scheme – link blocks of index table (no limit on size). size). Last entry of index node is pointer to next index block. Nil pointer is the end. As As with linked allocation, may have to traverse a few pointers for random access (but fewer) Indexed Indexed Allocation – Mapping (Cont.) Two-level indexing outer-index index table file Faster access on average: given logical block #, jump right to index block – still want each table to fit on a disk block How big a file can I store – 4K blocks? Combined Combined Scheme: UNIX inode (4K bytes per block) Directory entry stores an inode inode# that “points” to this structure Pointers to first n blocks stored directly – faster After that have to go via indirection Disk FreeDisk Free-Space Management Bit vector (n blocks) 01 2 n -1 … bit[i] = 0 block[i] free 1 block[i] occupied Bit map requires extra space. Example: block size = 212 bytes disk size = 230 bytes (1 gigabyte) n = 230/212 = 218 bits (or 32K bytes) Easy to find first free block or get contiguous blocks Free Free-Space Management (Cont.) Linked list (free lis...
View Full Document

Ask a homework question - tutors are online