Writing an OS Kernel from Scratch 201: Storage System – VFS: Designing a Unified File Abstraction Layer

dean
Writing an OS Kernel from Scratch 201: Storage System – VFS: Designing a Unified File Abstraction Layer “In a custom OS, how do you make open/read/write work with both ext2 and procfs? This article designs a VFS abstraction layer from scratch, building four core objects, implementing path resolution and caching, providing a unified interface for... » read more

Writing an OS Kernel from Scratch – Part 19: User and Kernel Address Space — Building Secure Virtual Memory Boundaries

dean
Writing an OS Kernel from Scratch – Part 19: User and Kernel Address Space — Building Secure Virtual Memory Boundaries “All processes share kernel code, but must never peek at each other; user programs roam freely but cannot cross the boundary. Today, we design the higher-half kernel mapping, achieving perfect isolation and efficient sharing of... » read more

Writing an OS Kernel from Scratch – Part 28: Window Manager — Controlling Windows via Keyboard

dean
Writing an OS Kernel from Scratch – Part 28: Window Manager — Controlling Windows via Keyboard “No mouse? No problem! Real geeks control everything with the keyboard. Today, we implement a Window Manager (WM), moving and resizing windows via keyboard shortcuts!” In previous posts, we built a userspace Display Server, Launcher, and multiple applications, but... » read more

Writing an OS Kernel from Scratch – Part 18: Multi-core Support — Make Your OS Truly Parallel!

dean
Writing an OS Kernel from Scratch – Part 18: Multi-core Support — Make Your OS Truly Parallel! “Single-core scheduling is just pseudo-concurrency; the real performance leap is multi-core! Today, we wake up all CPU cores and implement SMP (Symmetric Multi-Processing) support!” In the previous post, we implemented a preemptive scheduler, but all tasks still switched... » read more

Writing an OS Kernel from Scratch – Part 3: Multiboot Protocol Explained — The “Universal Language” Between Kernel and Bootloader

dean
Writing an OS Kernel from Scratch – Part 3: Multiboot Protocol Explained — The “Universal Language” Between Kernel and Bootloader Your kernel is written, but how does GRUB “recognize” it? The secret lies in a protocol called Multiboot. In the first two posts, we successfully ran our kernel on QEMU and understood the linker script... » read more

Long Article 103: Memory Management – Kernel: In-Depth Slab Allocator Design — Compared with Linux

dean
Long Article 103: Memory Management – Kernel: In-Depth Slab Allocator Design — Compared with Linux “The Buddy system excels at allocating large chunks, but what about the kernel’s frequent 32-byte task_struct allocations? This article dives into the Slab allocator’s design philosophy, compares Linux’s three implementations (SLAB/SLUB/SLOB), and builds a high-performance, low-fragmentation industrial-grade Slab system.” The... » read more

Long Article 102: Memory Management – Physical: In-Depth Buddy System Analysis — From Theory to Industrial Implementation

dean
Long Article 102: Memory Management – Physical: In-Depth Buddy System Analysis — From Theory to Industrial Implementation “The Buddy allocator is far more than just ‘split and merge.’ This article dives into Linux kernel source-level implementation, systematically analyzing watermark management, migration types, per-CPU page frame caches, compound pages, and other core mechanisms, providing a runnable... » read more

Writing an OS Kernel from Scratch – Part 27: Application Launcher — Building Your Desktop Environment Prototype

dean
Writing an OS Kernel from Scratch – Part 27: Application Launcher — Building Your Desktop Environment Prototype “A graphical interface can’t just have windows — it needs an entry point! Today, we implement an Application Launcher, managing applications via .desktop files and launching them with a click!” In the previous post, we successfully moved the... » read more

Writing an OS Kernel from Scratch – Part 25: Unix Domain Sockets — The Foundation of IPC

dean
Writing an OS Kernel from Scratch – Part 25: Unix Domain Sockets — The Foundation of Inter-Process Communication (IPC) “The Display Server and Client need efficient communication, but pipes are unidirectional and unstructured. Today, we implement Unix Domain Sockets (AF_UNIX), making IPC as natural as file operations!” In the previous post, we built the Display... » read more

Writing an OS Kernel from Scratch – Part 24: Display Server and Client — Building a Shared Memory Graphics Architecture

dean
Writing an OS Kernel from Scratch – Part 24: Display Server and Client — Building a Shared Memory Graphics Architecture “Framebuffer lets you draw pixels, but how do multiple applications share the screen? Today, we implement a Display Server + Client architecture, achieving efficient graphics compositing via shared memory!” In the previous post, we implemented... » read more

Writing an OS Kernel from Scratch – Part 32: Integrating LVGL — Text Editor with Open Source GUI Framework

dean
Writing an OS Kernel from Scratch – Part 32: Integrating LVGL — Text Editor with Open Source GUI Framework “Building wheels from scratch is fun, but industrial-grade GUI needs mature frameworks. Today, we port LVGL (Light and Versatile Graphics Library) to our OS, implementing a professional text editor!” In previous posts, we built from scratch:... » read more

The Essence of AI Models: Using Parameters to Fit High-Dimensional Functions Humans Can Hardly Understand

dean
The Essence of AI Models: Using Parameters to Fit High-Dimensional Functions Humans Can Hardly Understand In today’s AI boom, we often hear terms like “large models,” “parameter count,” and “training.” But do you truly understand: the essence of AI models is using a bunch of parameters to fit a set of high-dimensional functions that humans... » read more