Kernel Architecture & OS Internals Questions
How an operating system kernel is structured and what it is responsible for: monolithic vs. microkernel designs, the role of kernel subsystems (scheduler, memory manager, VFS, drivers), kernel vs. user space, and the boot/initialization path. Includes how kernel modules and device drivers extend the kernel and how the kernel mediates access to hardware.
Two services concurrently update the same configuration file and occasionally produce a corrupted file. As a systems engineer, provide a root cause analysis plan and a set of fixes: explain file locking (flock), atomic writes using temporary files and rename(), advisory vs mandatory locks, implications for NFS-mounted filesystems, and alternatives such as using etcd/consul for coordinated config updates. Describe how to test the fix.
A Windows service is failing to start. Describe how you would use the Event Viewer, Windows Service Control Manager (sc.exe), Process Explorer, and Service properties (including ImagePath and account) to diagnose the failure. Include steps to find relevant event IDs, check dependent services, and how to configure automatic service recovery options.
Walk through the full system boot process on a typical x86 Linux machine: from power-on (BIOS/UEFI) to bootloader (GRUB) to kernel initramfs and finally to init/systemd (or SysV). Explain what initramfs is used for, how systemd units differ from SysV init scripts, and describe how you would investigate and recover if a server fails to reach a multi-user target (for example it hangs at 'A start job is running for...' or drops to emergency mode).
Write a Bash script (POSIX-compliant) that runs a child process (for example, an executable provided as an argument). The script must forward SIGTERM to the child, wait up to 10 seconds for the child to exit gracefully, and if it hasn't exited send SIGKILL. Show the script and explain how trap, wait, and kill are used to implement this behavior. Mention how your script behaves when it is PID 1 (e.g., inside a container).
Explain the high-level differences between containers (e.g., Docker) and virtual machines. Cover isolation boundaries (namespaces, cgroups), the role of the host kernel, performance differences, typical use-cases for each, and security considerations when running untrusted workloads. Give at least two specific kernel features that enable containers and describe their function briefly.
Unlock Full Question Bank
Get access to all 33 Kernel Architecture & OS Internals interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.