File Systems Flashcards
(33 cards)
What is the primary purpose of long-term information storage?
To ensure information survives for long periods or permanently.
What are the requirements of long-term storage?
- Must store large amounts of data
- Multiple processes must access information concurrently
- Stored information must survive process termination
What are the different file types?
- Regular files
- Directories
- Character Special Files
- Block special files
Define sequential access in file access methods.
Reading all bytes/records from the beginning without jumping around.
Define random access in file access methods.
Reading bytes/records in any order.
What are the essential file attributes associated with each file?
Name and associated data.
List some common file operations.
- Create
- Delete
- Open
- Close
- Read
- Write
- Append
- Seek
- Rename
What is the problem with using read()/write() system calls?
It is cumbersome.
What is a memory mapped file?
Storing the contents of a file in process virtual memory.
What do hierarchical directory systems allow users to do?
Group similar files together.
Define absolute path in directory systems.
Path from the root to the file.
Define relative path in directory systems.
Path from the current working directory to the file.
List some directory operations.
- Create
- Delete
- Opendir
- Closedir
- Readdir
- Rename
- Link
- Unlink
What is the purpose of a partition table?
Stores information about all present partitions.
What does the Master Boot Record (MBR) store?
Boot program.
What is the function of the superblock in a file system?
Contains administrative information including the magic number and number of blocks.
What are inodes?
a way to structure data so that you’re essentially keeping the address of the disk blocks or pointers to the data that the file data conta
§ advantages - inode must be in memory only when corresponding file is open § n = bytes, k = number of open files § total memory occupied is k*n
What is contiguous file allocation?
Storing each file as a contiguous run of disk blocks.
What are the advantages of contiguous file allocation?
- Easy to implement
- Files can be read efficiently
What are the disadvantages of contiguous file allocation?
- Must know maximum file size at creation
- External fragmentation
- Internal fragmentation
What is linked list allocation?
Storing file blocks in a linked list.
What are the advantages of linked list allocation?
No space lost due to external fragmentation.
What is a disadvantage of linked list allocation?
Random access is slow.
What is the File Allocation Table (FAT)?
A table storing pointers to the next block in RAM.