03 - Operating Systems & Applications | 02. Filesystems Flashcards
What is the filesystem?
The filesystem is the data structure used by the operating system to store and retrieve data.
What does the filesystem do?
This is a software abstraction that allows developers to manipulate data without having to be concerned with the minutiae of how each storage device works.
T/F | This data is organized into files that are units of storage used to describe a self-contained piece of data. Each file has a format depending on what that file contains. This is indicated by the file’s extension that follows the file’s name.
TRUE
What are some common file extensions?
.txt
.doc
.jpg
What is the file extension .txt a file type for?
.txt for text files
What is the file extension .doc a file type for?
.doc for Microsoft Word files
What is the file extension .jpg a file type for?
.jpg for image files encoded using the JPEG compression algorithm
What happens after files are created?
Files are organized into directories
What is a directory?
A directory is a data structure that contains references to files and other directories. They are typically organized in a hierarchical tree structure called a directory tree.
What are some examples of a directory tree?
User > Download > cat.jpg
User > Photos > Grand Canyon > familypicture.jpg
T/F | Not only is it expected that files will hold important data, but it is also assumed that a certain amount of metadata is kept to manage these files.
TRUE
What does the file control block hold?
The file control block holds all of this metadata for the file, including file permissions, owners, sizes, and create, modified, and access times.
Alongside bookkeeping metadata, files can also have attributes that indicate special behavior. What are some common attributes?
- Hidden
- Immutable
- Compressed
What is an immutable attribute?
Immutable: Cannot be modified or deleted.
What is a hidden attribute?
Hidden: Cannot be viewed by default in file managers.
What is a compressed attribute?
Compressed: The file is in a compressed form to save space.
Within the file permission are controls for what?
Three main actions that can be performed on a file.
What are the three main actions that are performed on a file?
- Reading
- Writing
- Executing
What does it look like in the real world when a file is saved onto a hard drive?
Within a hard disk drive is a spinning platter with a thin magnetic coating. A pointy head that looks like a thin fountain pen moves over this platter to etch data into the platter by adjusting the direction of the magnetic field at an incredibly precise location.
On physical hardware, what is the smallest chunk of physical storage?
The smallest chunk of this physical storage is called a sector. It is the smallest unit of storage for the physical drive and its size is determined by a balance between excessive metadata and wasting space.
T/F | Smaller sectors require more information to index the entire drive?
TRUE
Smaller sectors require more information to index the entire drive, like a librarian trying to organize millions of small pamphlets. This ruins performance for finding files as well as creates substantial overhead for documenting the location and content of each sector.