Target Duration: 60–90 seconds (~180–220 spoken words)
Goal: Deliver a clear, plain-English overview of why the project was built, its full scope, and key mental models learned, avoiding low-level implementation minutiae while dropping strategic follow-up hooks for the interviewer.
"In this project, I built a 64-bit preemptive multitasking operating system kernel from scratch in Rust for the x86_64 architecture. The goal was to understand how an operating system bootstraps bare-metal hardware, manages memory, and schedules concurrent tasks without an underlying OS.
I divided the project into four main parts:
First was CPU initialization and interrupt handling. In a freestanding no_std environment, I configured the Global Descriptor Table, set up a Task State Segment with an emergency stack for double-fault safety, and configured the Interrupt Descriptor Table while remapping the 8259 PIC.
Second was memory management. Using the bootloader's memory map, I implemented physical frame allocation and mapped page tables for virtual memory. I then built a dynamic heap allocator using fixed-size blocks, which gave me O(1) allocation and deallocation for small sizes and enabled dynamic collections like Vec and String.
Third was preemptive multitasking and synchronization. I implemented a round-robin scheduler where context switches are driven by hardware timer interrupts. Using a naked assembly handler, the kernel saves task state onto private stacks and switches between Process Control Blocks. To coordinate tasks safely, I built custom spinlocks, sleep-based mutexes, and counting semaphores.
Finally, I built the I/O and user layer. I wrote a memory-mapped VGA text driver, an in-memory hierarchical filesystem with CRUD support, and an interactive shell running as a preemptive kernel task.
Overall, this project gave me hands-on, first-principles experience with x86_64 bootstrapping, paging, preemptive scheduling, and kernel concurrency."
| What You Mentioned | Why It Was Done (The Motivation) | Problems Faced & How Solved (The Reality) | Target Deep-Dive Document |
|---|---|---|---|
| "GDT, TSS & double-fault emergency stack" | Guarantee CPU fault safety when kernel stacks overflow in Ring 0. | Configured an Interrupt Stack Table (IST[0]) inside the Task State Segment, preventing fatal triple faults. | Topic 01: Boot, GDT & TSS |
| "IDT & 8259 PIC remapping" | Avoid collisions between x86 hardware IRQs and CPU exception vectors. | Remapped PIC interrupts 0–15 to vectors 32–47 and unmasked timer (IRQ 0) and keyboard (IRQ 1). | Topic 02: IDT & PIC |
| "Physical frame allocator & 4-level paging" | Transition from bootloader identity paging to controlled virtual memory mapping. | Read bootloader memory map to track usable physical frames; navigated PML4 page tables using CR3 offset mapping. | Topic 03: 4-Level Paging |
| "Fixed-Size Block Heap Allocator" | Support dynamic heap allocations (Box, Vec) in no_std without external fragmentation. |
Implemented power-of-two free lists (8B to 2048B) backed by a 100 KiB heap, providing $O(1)$ allocation/deallocation. | Topic 04: Heap & Allocators |
| "Naked assembly timer ISR & preemptive context switching" | Achieve true preemptive multitasking without cooperative yielding. | Used naked_asm! to push 15 general-purpose registers, swap rsp inside the scheduler, and pop registers before iretq. |
Topic 05: Multitasking & Mutex |
| "In-memory VFS & interactive shell" | Provide an end-to-end interactive operating system experience. | Built a tree-structured hierarchical VFS with CRUD support and a preemptive shell task reading PS/2 keyboard buffers. | Topic 06: VFS & Shell |