W4 - File Systems Flashcards
(86 cards)
Superuser
A user account with elevated priveleges at the OS level.
Can perform administrative tasks (e.g. installing software, changing system settings).
Do processes run by superusers run in user mode or kernel mode?
User mode. They can request privileged operations via system calls.
Partial Context Switch
On certain events (e.g. timer interrupts), only part of the CPU context is moved to main memory.
What is overhead
Extra work the system has to do that doesn’t directly help with the task, but is necessary to support it.
Overhead Examples
Example 1: Switching tasks means you need to save current state and load next state.
Example 2: Extra memory used for managing data (e.g. pointers or metadata)
What is a disk partition?
A logically separated section of a physical disk that behaves like an independent disk.
What is logical deletion of files?
When a file is marked as deleted but not physically removed from the disk, allowing possible recovery.
What does the Master Boot Record contain?
It contains the bootloader and the partition table.
Where is the Master Boot Record located?
At the start of a disk.
What are the limitations of MBR?
Supports only 4 primary partitions and up to 2TB of disk space.
What is the GUID Partition Table (GPT)?
A modern partitioning scheme that uses GUIDs, supports 128+ partititons, and handles disks over 2TB.
What is Ext2?
A Linux filesystem. [possibly needs to be covered more?]
What is a GUID?
Globally Unique Identifier. 128 bits long. Used to uniquely identify partitions and partition types, avoiding conflicts.
What is a file system?
A part of the OS that organizes raw disk blocks into usable files and directories.
Name the four main functions of a file system.
Disk management - (grouping disk blocks together to form files)
Naming - (Let users/apps find files by name, not by physical location)
Protection - (Controls access to files e.g. read/write/execute)
Reliability/Durability - (Ensures data isn’t lost despite crashes or hardware failure)
Describe the user’s view of a file.
As durable data, accessible by name.
How does the system view a file via system calls?
As a collection of bytes.
How does the OS view a file internally?
As a collection of logical blocks.
What’s the difference between a block and a sector?
A block is a logical OS-level transfer unit; a sector is a hardware-level physical transfer unit.
What is a typical block size in UNIX?
4 KB.
Are files stored as blocks?
Yes, file data is broken into 4 KB (or similar) blocks and stored on the disk.
What happens if a file is smaller than a block?
The file still takes up one full block — the rest is unused but reserved (this is called internal fragmentation).
What does the OS use to track which blocks belong to which files?
Data structures like inodes, FAT tables, or metadata depending on the file system.
Can two files share the same disk block?
No — each file gets its own blocks. Sharing isn’t allowed.