Collection 05

Systems

Trace a mechanism from the program to the operating system.

Systems entries connect a visible symptom to the process, descriptor, page, or cache line underneath it. They prefer a small experiment over a metaphor.

Index

On this shelf

MechanismLayerObservable question
CPU Cache Lines and Sequential Reads Concept CPU Why can reading adjacent bytes be cheaper than reading scattered bytes?
The Lifetime of a File Descriptor Concept I/O When is a file descriptor closed, and when does the underlying file go away?
Virtual and Physical Pages Concept Memory How does a virtual address become a physical page?
The Current Working Directory of a Process Concept Process Why can two processes see different meanings for the same relative path?

Reading path

A way in

Begin with the working directory if a relative path changes meaning. Then follow the descriptor lifetime when the path is correct but the file still disappears.

  1. 01 The Current Working Directory of a ProcessEach process carries its own current working directory in kernel state, and relative paths are resolved from it, so the same path string can name different files in different processes.
  2. 02 The Lifetime of a File DescriptorA file descriptor lasts until it is closed, until the process exits, or until an exec replaces the process and the descriptor is close-on-exec; closing it only drops one reference, and the file's data disappears when its last link and last open reference are gone.

All entries

Full catalog