1/24
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What are the three main requirements for long-term storage?
Store large data volumes, survive process termination, and support concurrent access.
What is a file?
A linear array of bytes stored persistently on disk.
What is an inode number?
A low-level numeric identifier for a file in the file system.
What is a directory?
A special file that maps file names to inode numbers.
What is the root directory?
The top of the directory tree (represented as / in Unix).
What is an absolute pathname?
A full path starting from the root directory.
What is a relative pathname?
A path relative to the current working directory.
Can files and directories share names?
Yes, as long as they are in different locations in the hierarchy.
What is the purpose of file extensions?
To indicate file type or format, though not enforced by the OS.
What system call creates or opens a file?
open()
What is returned by open()?
A file descriptor - a process-specific integer ID for the open file.
What does read() do?
Reads bytes from a file descriptor into memory.
What does write() do?
Writes bytes from memory to a file descriptor.
What does lseek() do?
Changes the current offset within an open file for random access.
Why is rename() atomic?
So file renames either fully succeed or fail without leaving partial states.
What is metadata?
Information about a file (size, owner, timestamps, permissions, etc.).
What is the stat() system call used for?
To retrieve file metadata via a stat struct.
What are the two special directory entries found in every directory?
"." for the current directory and ".." for the parent directory.
What does mkdir() do?
Creates a new directory with default entries "." and "..".
Why can't you directly edit directory files?
They are protected metadata managed by the OS.
What is a hard link?
Another directory entry pointing to the same inode.
What is a soft (symbolic) link?
A special file that stores a pathname reference to another file.
Why can't hard links reference directories or other partitions?
To prevent cycles and because inodes are unique only within a single filesystem.
What is a dangling symbolic link?
A soft link pointing to a deleted or nonexistent file.
What does unlink() do?
Removes a directory entry; file is deleted when no links remain.