Week 12: Physical File Structures (Implementation DOS WINNT)) Flashcards
What role do hard disks play in file systems?
They provide the bulk of secondary storage where file systems are maintained, with data organized in blocks.
Why are blocks important in file systems?
They improve I/O efficiency by grouping data for transfer, typically using sizes like 512 bytes or larger.
What layers are involved in a file system?
- Application programs
- Logical file system (files, directories)
- Basic file system (block read/write)
- I/O control (interrupts, device drivers)
- Hardware devices.
What happens when a file is created?
A new directory entry is made in the logical file system, including attributes and data block information.
How are files accessed after being opened?
- The operating system copies the file information into a table in operating system memory
- The file is then referred to by index into this table:
- in UNIX these indices are called file descriptors
- in Windows / WinNT they are called file handles
What is contiguous allocation?
Storing files in a single, contiguous block of disk space for fast sequential access but prone to fragmentation.
What is non-contiguous allocation using linked lists?
Files are stored as linked blocks, with each block pointing to the next. It allows non-contiguous storage but slows random access.
What is indexed allocation?
File blocks are indexed in a table, allowing fast random access but potentially wasting space with unused index entries.
What is a partition table?
A structure in the boot sector of a disk that defines partitions as contiguous blocks and their sizes.
How are partitions identified in MS-DOS?
Partitions are labelled as C:, D:, etc., and each can have its own file system.
What is the File Allocation Table (FAT)?
The File Allocation Table (FAT) is an index array that works like an array of linked-list block numbers, stored in its own disk block.
What does the File Allocation Table (FAT) do?
- The FAT helps locate all the blocks that make up a file.
- A directory entry points to the starting block of a file.
How does the File Allocation Table work?
Each block has an entry in the FAT that:
- Points to the next block in the file’s chain.
- Contains a special value to mark the end of the file (EOF).
- Marks free blocks or bad blocks.
What is VFAT?
It is a slight variation of FAT that allows for:
- Long file names (up to 256 characters) and
- Optional 16-bit or 32-bit FAT for larger partition support.
What are the shortcomings of FAT systems?
- Key file data (time, date, size) are kept in the directory entry: this prevents hard links from being used
- Large disk sizes are only possible using large clusters
- The FAT offers poor performance and is non-robust
- There is no file access protection mechanism
What is the Master File Table (MFT) in NTFS?
A variable-size table describing every file and directory in a volume, including attributes and block indices.
How does NTFS handle fault tolerance?
NTFS attempts to allocate the MFT contiguously and maintains a mirror of the MFT.
What is an inode in UNIX?
A data structure that stores:
- File information, e.g. size, access modes, times
- Block numbers of how to locate all the file data blocks
How are UNIX directories structured?
They are simple, containing file names and pointers to inodes.
What are the special directory entries in UNIX?
. refers to the current directory, and .. refers to the parent directory.
What is the process of mounting a file system in UNIX?
The root directory of a file system is registered with the kernel. Then, other file systems can be mounted onto the main root file system at a particular directory location.
What steps are involved in finding a file in UNIX?
The system traverses directories, locating the file’s inode, which points to its data blocks.