Kernel Architecture & OS Internals Questions

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.

EasyTechnical
84 practiced

Why do operating systems split execution into kernel space and user space? What can code in each mode do, and what actually happens in the CPU when a program needs something only the kernel can do?

MediumTechnical
86 practiced

What is a loadable kernel module and how does it differ from code built into the kernel? What does it mean for a kernel to be tainted, and what are the stability and security consequences of loading third-party modules?

MediumSystem Design
77 practiced

For a pipeline that parses untrusted network input, enriches it and emits results, compare one process with many threads, several cooperating processes, and a hybrid. What do you gain and lose in performance, fault isolation and debuggability?

EasyTechnical
61 practiced

How do page-level protection bits (present, read/write, user/supervisor, no-execute) enforce isolation between user and kernel space and between regions of one process? What attacks does W^X / NX stop, and what does it not stop?

EasyTechnical
61 practiced

What is address space layout randomization, how does it work at the kernel level (what is randomised and when), why does it help against exploits, and how does it complicate reading crash reports and core dumps?

That is every published Kernel Architecture & OS Internals question for Cybersecurity Engineer so far. Browse the other topics in this category, or practice this one interactively.