File-System Implementation, Management, and Optimization Flashcards
What is the purpose of the Master Boot Record (MBR)?
The MBR is used to boot the computer and contains the partition table, which gives the starting and ending addresses of each partition.
What is a boot block in a file system?
The boot block is the first block of a partition and is executed by the MBR during the boot process. It loads the operating system contained in that partition.
What is the superblock in a file system?
contains key parameters about the file system:
- file-system type,
- the number of blocks
- other administrative information.
What is the purpose of the root directory in a file system?
The root directory contains the top of the file-system tree and serves as the starting point to access all other directories and files.
What is contiguous allocation in file storage?
is a file allocation scheme where each file is stored as a contiguous run of disk blocks. It offers simplicity and high read performance.
What is the disadvantage of contiguous allocation?
can lead to disk fragmentation over time, where free blocks are scattered across the disk, making it challenging to allocate space for new files.
What is linked-list allocation in file storage?
represents each file as a linked list of disk blocks. Each disk block contains a pointer to the next block in the file.
What is the advantage of linked-list allocation?
- avoids disk fragmentation, as all disk blocks can be used.
- allows for variable file sizes
- simplifies directory entry storage.
What is a File Allocation Table (FAT)?
A File Allocation Table is a table stored in memory that keeps track of the disk-block pointers for files in a linked-list allocation file system
How does the i-node scheme work in file storage?
The i-node scheme associates each file with an i-node, which lists the attributes and disk addresses of the file’s blocks.
It allows for efficient access to file blocks and requires less memory than the linked-list allocation with a table.
What is the main function of the directory system in an operating system?
The main function of the directory system is to map the ASCII name of a file onto the information needed to locate the data, such as disk addresses or i-node numbers.
Where are file attributes typically stored in a file system?
File attributes can be stored either directly in the directory entry or in the i-nodes.
How can variable-length file names be implemented efficiently?
- use a structure where each directory entry contains a fixed portion, followed by the actual file name.
- keep the file names together in a heap at the end of the directory.
What are the advantages and disadvantages of using a hash table in directories for file lookup?
speeds up file lookup, but it requires more complex administration.
Hashing the file name allows for faster access to the desired entry, but collisions may occur
requiring the use of linked lists to handle multiple files with the same hash value.
What are the two solutions to the problem of sharing files between multiple users?
- storing disk blocks in a data structure associated with the file itself, such as an i-node.
- The second solution is symbolic linking