Operating Systems and Filesystems in Practice
-
What an Operating System Manages
An operating system coordinates execution, memory, devices, and persistent data so applications can request those resources under defined interfaces.
-
A System Call as a Request to the Operating System
A system call asks the operating system to perform an operation under its protected interface, often through a user-space library wrapper.
-
Identifying a Process Across Its Lifetime
An operating system can assign a running process an identifier so management and observation tools can refer to that instance.
-
Ready, Running, and Blocked Processes
A process or thread can be runnable, executing on a processor, or waiting for an event. Exact states depend on the operating system.
-
Processes and Threads Through One Shared-State Example
Threads in one process commonly share its address space while keeping their own execution context. Separate processes often exchange data through explicit interfaces.
-
Parent, Child, and Process Exit
A launcher and a launched process have distinct lifetimes. On many systems the launcher can use a wait operation to collect the child's exit result.
-
An Open File Handle and Its Pathname
A pathname locates an entry when resolving it. An open handle identifies the opened object according to the operating system even if the entry later changes.
-
Following Components of a Filesystem Path
Resolving a path usually walks directory entries component by component from an appropriate base.
-
Hard Links and Symbolic Links
A hard link is an additional directory entry naming the same file identity where supported. A symbolic link stores a path reference interpreted during resolution.
-
Traversing a Directory Tree with a Link Policy
Directory traversal needs a rule for which entries it follows and whether several paths may lead to one underlying directory.
-
Reading File Permission Checks by Operation
Operating systems can check permissions separately for reading, changing, or executing a file and for traversing its containing directories.
-
Resource Limits on a Running Program
A platform or supervisor can restrict resources such as open handles, memory, or execution time. A program needs a usable response when it reaches that limit.
-
Regular Files and Pipe Streams
A regular file usually supports retained bytes and positioning. A pipe normally transports bytes in order between current endpoints.
-
Why a Second File Read Can Be Faster
An operating system can cache recently accessed file contents in memory, making demand on the underlying storage depend on earlier reads.
-
Cached and Durable Writes
A write can become visible to a subsequent process before it has reached persistent storage. The operating system and storage need explicit guarantees for recovery after a crash.
-
Two Processes Can Use the Same Virtual Address
Virtual addresses are interpreted in a process's address space. The same numeric address can identify different mapped storage in different processes.
-
Dividing Addresses into Pages and Offsets
Paging groups addresses into fixed-size ranges. A page number identifies the range, while an offset identifies a position inside it.
-
A Page Fault Can Be Part of Normal Execution
A page fault transfers control to the operating system because the memory access needs handling under current mappings or permissions.
-
Memory Mapping and Explicit File Reads
A memory mapping lets program accesses refer to file-backed pages. Ordinary reads copy bytes through the file interface under its rules.
-
An Active Memory Working Set
A working set approximates which memory regions a program will actively reuse over a chosen observation interval.
-
A Long Wait Can Use Little CPU Time
Elapsed time includes running and waiting. CPU time estimates execution time charged to the process or its threads under the measurement interface.
-
Elapsed Time and CPU Time for Several Threads
Elapsed time describes the whole observation interval. CPU time for several threads can sum the time each one ran.
-
Using a Temporary Directory as a Work Area
An operation can create a private temporary directory to contain files whose names and lifetime belong to one run.
-
Removing a Name While a File Is Open
On Unix-like systems, removing a directory entry can make future opens by that path fail while an existing handle still accesses the opened file.
-
A Mount Point Within a Path Hierarchy
A mounted filesystem can provide the contents visible at a directory location in an operating system's path hierarchy.
-
Available Disk Space and Successful File Writes
Available-space measurements are snapshots. Other work, filesystem rules, and allocation overhead can change what an actual write can store.
-
Resolving Resource Files Shipped with a Program
A bundled resource belongs to the installed package or configured resource location. The caller's working directory may be unrelated.
-
Coordinating Programs Writing One File
Shared file writes need a policy defining who may update the content and how another reader learns that an update is complete.
-
Interpreting an Operating-System Error in Context
An operating-system error describes an attempted action under particular process and path conditions. Useful diagnostics identify that action and the affected resource.
-
Choosing a Process or a Thread for a Local Task
The choice depends on what state workers must share, how independently they should fail, and how their results are exchanged.