Skip to content
academia.sh

Unit 01 of 03

System Interfaces

File descriptors and the shared file offset, creating and waiting for processes, signal handling, inter-process communication through pipes, shared memory and sockets, and sharing under a lock in POSIX threads — each paired with the question of who sees a change.

Published Updated

Lessons

  1. 01 File Descriptors Whether a pointer refers to the same memory location is measured by equality; whether a file descriptor shares the same open file description is measured by offset behavior instead — the descriptor itself is an integer and says nothing on its own. 11 min read
  2. 02 Process Management fork splits a process in two and hands the child a copy of the memory at that moment; once the copy is made, the two sides are independent of each other — no change reaches the other side in either direction. 10 min read
  3. 03 Signals A signal handler runs outside the main flow, at an unexpected point; the only safe form of sharing is a volatile sig_atomic_t flag, and if a signal arrives again while blocked it is delivered only once when it is unblocked. 14 min read
  4. 04 Inter-Process Communication A pipe carries bytes once, and every byte read drops out of the stream; a mapping set up with mmap and MAP_SHARED shows the same page to two processes at once, and these two fall into two different classes within the same lesson. 4 min read
  5. 05 POSIX Threads Two threads in the same process changing the same memory under a lock is not a handoff, consumed once like the bytes a pipe carries, but a continuously shared exchange. 14 min read

Start typing to search.

↑↓ ↵ Esc navigate · open · close