📚

Operating Systems & Systems Programming Topics

Covers operating system fundamentals and systems programming topics, including process management, memory management, file system interfaces, inter-process communication, low-level kernel interactions, and system call interfaces (e.g., fork, exec, opendir, stat) across Unix/Linux and other OS environments.

Interprocess Communication (IPC)

Mechanisms that let separate processes exchange data and coordinate: pipes and named pipes, message queues, shared memory, signals, and Unix domain sockets. Covers the trade-offs between IPC methods (throughput, latency, complexity, ordering) and when each is appropriate for a given systems design.

0 questions

Kernel Architecture & OS Internals

How an operating system kernel is structured and what it is responsible for: kernel subsystems (scheduler, memory manager, drivers, interrupt handling), kernel vs. user space and the cost of crossing between them, and the boot and initialization path. Includes the core mechanisms the kernel provides: process and thread lifecycle (creation, zombies and orphans, uninterruptible sleep) and context switching, processes vs. threads as an architectural choice, CPU scheduling (CFS, priorities, preemption models, real-time policies on a general-purpose kernel), virtual memory (address translation, multi-level page tables and entry formats, TLB misses and shootdowns, page faults, copy-on-write, memory-mapped files, userfaultfd, swapping, page replacement, kernel allocators, process address-space layout, page-level protection such as NX and ASLR as mechanisms, hugepages, page coloring, overcommit and the OOM killer as kernel mechanisms), interrupts and softirqs, and how loadable modules and device drivers extend the kernel. Includes worked exercises such as page-replacement traces, address-translation arithmetic and small page-table, TLB or scheduler simulations. Covers the concepts and internals, not microcontroller interrupt and ISR design, RTOS and real-time scheduling theory, day-to-day host administration, system-call and POSIX API semantics, OS-level performance tuning, or forensic and security analysis of a host.

0 questions

CPU Scheduling & Context Switching

How the operating system decides which runnable task gets the CPU and switches between them: preemptive vs. cooperative scheduling, algorithms such as round-robin, priority, and multilevel feedback queues, time slices, and the mechanics and cost of a context switch. Covers scheduling goals like throughput, latency, fairness, and starvation avoidance.

0 questions

Mobile Platform Internals & Resource Management

How mobile operating systems work beneath the app layer and how apps live within their constraints: the app sandbox and permission model, process and memory management specific to mobile, inter-app communication, and platform services, together with the app lifecycle and process suspension, background execution limits, battery and power optimization, and memory-pressure and thermal handling. Covers how iOS and Android reclaim resources and how a mobile engineer reasons about performance, security, and platform behavior at the OS level.

0 questions

State Machines & Protocol Implementation

Modeling behavior and communication with explicit state: finite state machines, event-driven transitions, and implementing wire or hardware protocols with framing, timeouts, and error handling. Covers structuring long-lived logic as a state machine to keep firmware and systems code correct and testable.

0 questions

Firmware Buffering & Ring Buffers

Low-level data movement and buffering in constrained systems: circular/ring buffers, producer-consumer queues, lock-free single-producer/single-consumer designs, and handling overflow and wraparound. Covers buffering strategies for streaming data between ISRs, DMA, and application code without dynamic allocation.

0 questions

Systems Performance Analysis & Tuning

Finding and fixing performance problems at the OS and low level: profiling CPU, memory, I/O, and lock contention, reading utilization and saturation signals, and using tools like perf, strace, and tracepoints. Covers cache behavior, false sharing, syscall overhead, and the methodology of isolating a bottleneck before optimizing.

0 questions

Concurrency, Synchronization & Deadlock

Correctness of shared-state coordination between concurrent threads and tasks. Covers mutexes (futex-based and spin-then-sleep), semaphores, condition variables, spinlocks, reader-writer locks, and the producer-consumer pattern; atomic operations, compare-and-swap, lock-free and wait-free structures with the ABA problem and safe memory reclamation; memory ordering, barriers and acquire/release semantics; race conditions, data races, critical sections, time-of-check to time-of-use gaps and read-modify-write hazards; deadlock (the Coffman conditions, lock ordering, prevention and detection), livelock and starvation; priority inversion as a locking hazard and the priority-inheritance fix; designing thread-safe structures such as bounded queues, caches, rate limiters, event buses and work-stealing schedulers, with coarse versus fine-grained and per-key locking; alternatives to locking such as thread confinement, message passing, actors and transactional memory; and diagnosing and testing concurrency bugs (heisenbugs, race detectors, stress and replay, reviewing concurrent code). Excludes a specific language's threading API and memory model, concurrency for throughput and pool tuning, distributed locks and consensus, database isolation levels, RTOS ceiling protocols and schedulability, and interrupt masking between ISRs and main code.

10 questions