3.5. File System Implementation-Allocation
3.5. File System Implementation-Allocation
Course Outcome:
Upon completion of the session, students shall have ability to
CO5 Apply concepts of file system interface, implementation, and disk management [AP]
to optimize storage utilization and random access to files.
Allocation Method
• The allocation methods define how the files are stored in the disk
blocks.
– Problems include:
• Finding space on the disk for a file,
• Knowing file size,
• External fragmentation, need for compaction off-line (downtime)
or on-line
LA/512
Extent-Based Systems
• Many newer file systems (i.e., Veritas File System) use a modified
contiguous allocation scheme
• Extent-based file systems allocate disk blocks in extents
• An extent is a contiguous block of disks
– Extents are allocated for file allocation
– A file consists of one or more extents
Linked Allocation
• Mapping
Q
LA/511
R
• Each file has its own index block(s) of pointers to its data blocks
• Logical view
index table
Performance
• Best method depends on file access type
– Contiguous great for sequential and random
• Linked good for sequential, not random
• Declare access type at creation
– Select either contiguous or linked
• Indexed more complex
– Single block access could require 2 index block reads then data block
read
– Clustering can help improve throughput, reduce CPU overhead
• For NVM, no disk head so different algorithms and optimizations needed
– Using old algorithm uses many CPU cycles trying to avoid non-
existent head movement
– Goal is to reduce CPU cycles and overall path needed for I/O
Try……..
Consider a disk where blocks 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 17, 18, 25, 26 and 27
are free and the rest of the blocks are allocated. Then the free space bitmap would
be _____________
Answer
• 001111001111110001100000011100000
Next Session…
3.6 Free Space Management