File Systems Flashcards
(34 cards)
⭐️ Give the definition:
Array of persistent bytes that can be created/read/written/deleted
File
⭐️ Give the definition:
Refers to collection of files. Describes how files are mapped onto physical devices. Also refers to parts of the OS that manages these files
File System (FS)
⭐️ Give the definition:
Low-level names for files, index node
Inode
⭐️ What do we call the type of files that are human readable?
Path
⭐️ What do we call the file type that describes a files runtime state?
File descriptor
⭐️ What are inodes unique within?
A FS
⭐️ How many inode numbers does a file have?
1
What does this command do?
$ stat -x <file></file>
Shows inodes
Give the definition:
Reads for getting final inode
Traversal
Give the definition:
Unique ID for a file
Inode
How does the FS interact with inode numbers?
By using path-to-inode mappings
Where are path-to-inode mappings stored?
In a directory
Give the definition:
Placing directories within other directories
Directory tree/hierarchy
Directories and files can have the same name as long as they’re in…
Different locations of the file system tree
Give the definition:
Runtime name to read & write files
File descriptor
What table contains pointers to open file descriptors?
File descriptor table
Integers used for file I/O are indexes into what table?
File descriptor table
Give the definition:
An API used for manipulation of files
File API
⭐️ What command in the file API is this?
Returns a file descriptor
open()
⭐️ What command in the file API is this?
Allows a process to create a new file descriptor that refers to the same underlying open file as an existing descriptor
dup()
⭐️ What commands in the file API is this?
Calls return the processed bytes
read() & write()
⭐️ What command in the file API is this?
Deletes a descriptor. Returns 0 for success & -1 for failure.
close()
⭐️ What command in the file API is this?
read & write non-sequentially
lseek()
⭐️ What is whence in lseek() set to if offset is set to offset bytes?
SEEK_SET