📚

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.

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.

6 questions

Real-Time Systems, RTOS Scheduling & WCET

Building embedded and control software with timing guarantees: hard, firm and soft real-time and why fast is not the same as predictable, RTOS task scheduling (fixed-priority, rate-monotonic, earliest-deadline-first, cooperative vs preemptive, lightweight cooperative schedulers on small microcontrollers), priorities and preemption, RTOS task states and lifecycle, bounding priority-inversion blocking with inheritance and ceiling protocols in RTOS designs, schedulability and response-time analysis including blocking terms, worst-case execution time estimation (static, measurement-based, cache, pipeline and DMA bus effects), RTOS internals such as the tick, tickless idle, software timers and context switching, serving aperiodic and best-effort work beside hard periodic tasks, multicore and mixed-criticality scheduling, bounded-wait lock APIs, choosing an RTOS, and diagnosing deadline misses and jitter from timing traces. Excludes interrupt mechanism and ISR design, general-purpose OS (desktop and server) CPU scheduling, priority inversion as a generic locking hazard, general synchronization primitives and lock-free data structures, firmware architecture and power optimization, which are covered elsewhere.

32 questions

Embedded Systems Architecture

Structuring firmware and embedded software under tight hardware constraints: partitioning a system into modules and tasks, hardware abstraction layers, bare-metal vs. RTOS designs, and managing limited memory, flash, and compute. Covers reasoning about the whole embedded stack from peripherals up through the application layer.

51 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.

34 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.

11 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.

22 questions