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

Writing an OS Kernel from Scratch – Part 26: User-Mode Display Server and Client — A True Graphics System Architecture

dean
Writing an OS Kernel from Scratch – Part 26: User-Mode Display Server and Client — A True Graphics System Architecture “An in-kernel Display Server is controllable but violates the microkernel philosophy; a real graphics system should be in userspace! Today, we move the Display Server and Client entirely to userspace, communicating via Unix domain sockets!”... » read more

#233 Conntrack: High-Performance Connection Tracking and NAT Implementation

dean
#233 Conntrack: High-Performance Connection Tracking and NAT Implementation Preface In the previous two articles, we thoroughly understood Netfilter’s HOOK mechanism (Article 231) and iptables’ rule table-chain system (Article 232). However, there’s one system hiding between them, omnipresent yet not yet detailed — Connection Tracking (conntrack). Conntrack is the cornerstone of Linux stateful firewalls. It’s because... » read more

Writing an OS Kernel from Scratch | #345: USB Protocol — From HID to High-Speed Devices

dean
Writing an OS Kernel from Scratch | #345: USB Protocol — From HID to High-Speed Devices Abstract: USB is essentially the “universal serial bus” for all peripherals, but many only know “plug and play.” This article takes you from physical layer topology, transfer types, xHCI controller, to practical lsusb usage, thoroughly understanding USB’s design philosophy... » read more

Writing an OS Kernel from Scratch – Part 6: First Look at Multitasking — From Single-Core Loops to Process Switching

dean
Writing an OS Kernel from Scratch – Part 6: First Look at Multitasking — From Single-Core Loops to Process Switching “A kernel that can only do one thing? That’s a bare-metal program. A real OS must be able to ‘simultaneously’ do multiple things!” In the previous five posts, we completed kernel boot, entering protected mode,... » read more

Writing an OS Kernel from Scratch – Part 15: Slab Allocator — Efficiently Managing Kernel Small Objects

dean
Writing an OS Kernel from Scratch – Part 15: Slab Allocator — Efficiently Managing Kernel Small Objects “The Buddy system is great at allocating large memory blocks, but what about the kernel’s frequent 32-byte, 128-byte small object allocations? Today, we implement the Slab allocator, making kernel memory allocation lightning fast!” In the previous post, we... » read more