M13: The OS File System Flashcards
fseek() :
sets the position of the stream to the given offset, allowing
seeking a specified part of the file
disk block
basic logic unit of storage on disk of a contiguous set of bytes
Disk partitions:
logical split of the actual disk drive. The operating system views each partition as a distinct disk, and different operating systems may be run in each split; each partition has at least one directory, in which all the partition’s files are listed.
The typical internal structure of the disk partition includes:
Boot block
Superblock
Free space data structure
i-node list
Boot block:
contains information on the disk layout and code for loading the operating system into the kernel space
Superblock:
contains basic information about the file system, including
the file system size, list of free blocks, list of allocated blocks, and time of the last modification to the partition; the superblock can be read into
memory at boot time
Free space data structure:
tracks the free blocks in the disk
I-nodes list :
stores information about the individual files stored on disk, and allocatable blocks for directories and file systems
Master boot record :
stores information about the entire drive
Partition table:
specifies the beginning of each partition
Disk space allocation
managing data in the disk with the aims to ensure fast
sequential access, fast random access, the ability to grow a file system quickly, and to minimize fragmentation
Contiguous allocation :
each file occupies a contiguous region of blocks
Linked-list allocation :
hold a linked list of blocks for each file such that
each block contains a pointer to the next block
File allocation table :
stores a condensed version of the linked list to be
stored at the beginning of the file system; the file is stored in allocated
clusters
Linked list with indexing or i-nodes
supports direct access to the file’s
blocks by storing files in the i-node data structure