📚

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.

12 questions

System Calls & the Kernel Interface

The boundary between user space and the kernel: how programs request privileged services through system calls, the user/kernel mode transition, and the semantics of core POSIX calls such as fork, exec, wait, open, read, write, and stat. Covers syscall numbers, arguments, return values and errno, and how libc wrappers relate to the underlying trap. This is the foundational interface for all systems programming on Unix/Linux.

11 questions

Systems Performance Analysis & Tuning

Deep, tool-driven diagnosis of a slow host or service once first-pass resource readings point somewhere: sampling with perf and reading flame graphs, continuous low-overhead profiling of production hosts, tracing system calls and library calls with strace and ltrace and their overhead, kernel tracing with ftrace, tracepoints, kprobes and eBPF / bpftrace, and the low-level causes these tools expose: page faults and page-cache behaviour, memory pressure and OOM-killer analysis (system-wide shortage versus a cgroup limit), per-process memory accounting from /proc, NUMA locality, scheduling and CPU-frequency effects, interrupt and softirq load, block-I/O latency, memory growth inside a process, and lock and futex contention. Covers choosing the right tool and its production safety, and isolating the bottleneck before tuning. First-pass resource-saturation readings (load average, utilization and iowait, the USE checklist), profiler theory and application-level instrumentation, kernel internals as concepts, general Linux administration and database tuning are covered elsewhere.

5 questions