H06 — How Memory Module Gold Fingers Are Connected: PCB Traces, Impedance Control, and DQ Signal Integrity

dean
H06 — How Memory Module Gold Fingers Are Connected: PCB Traces, Impedance Control, and DQ Signal Integrity Key Insight: Invisible trace lengths determine visible system stability. Memory PCB Structure A memory module (DDR DIMM) is an independent PCB filled with signal traces and power planes. DDR4 UDIMM PCB 结构(6 层或 8 层): Layers: Layer 1(Top):信号层,元器件和... » read more

Writing an OS Kernel from Scratch – Part 17: Scheduler — Making Multitasking Truly Concurrent!

dean
# Writing an OS Kernel from Scratch – Part 17: Scheduler — Making Multitasking Truly Concurrent! “Cooperative multitasking relies on programs voluntarily yielding the CPU; once there’s an infinite loop, the system freezes. Today, we introduce timer interrupts and implement a preemptive scheduler, making multitasking truly fair!” In Part 6, we implemented cooperative multitasking, where... » read more

231 Netfilter: Deep Dive into Linux Network Filtering Core Architecture and HOOK Mechanism

dean
231 Netfilter: Deep Dive into Linux Network Filtering Core Architecture and HOOK Mechanism Preface Deep within the Linux kernel network subsystem lies a core framework hailed as the “backbone of network firewalls” — Netfilter. Whether it’s iptables, nftables, Docker networking, or Kubernetes Service implementations, they all rely on Netfilter’s HOOK mechanism for their fundamental capabilities.... » read more

H02 — Why Memory Should Be Installed in Pairs: How Dual Channel Works

dean
H02 — Why Memory Should Be Installed in Pairs: How Dual Channel Works Key Insight: A single tree does not make a forest. Neither does a single channel for bandwidth. Single Channel vs Dual Channel: Numerical Comparison What is the performance difference between one 16 GB DDR4-3200 stick and two 8 GB DDR4-3200 sticks? 理论带宽对比:... » read more

[Writing an OS Kernel from Scratch] 334 – SystemServer: Service Management Mechanism Startup

dean
title: [Writing an OS Kernel from Scratch] 334 – SystemServer: Service Management Mechanism Startup category: os tag: [android, systemserver, zygote, binder] source: https://github.com/golang12306/os-kernel-from-scratch [Writing an OS Kernel from Scratch] 334 – SystemServer: Service Management Mechanism Startup 1. What Is SystemServer? In Android’s Java world, all system services do not live inside application processes. They run... » read more

357 | Memory Management: Buddy System

dean
357 | Memory Management: Buddy System Key Insight: Cut memory into neat power-of-2-sized blocks, merge when freed, merge when freed, merge when freed. This “divide and merge” algorithm is the starting point of Linux physical memory management. 1. What Problem Does the Buddy System Solve? The core problem in physical memory allocation is fragmentation. Assume... » read more

[Writing an OS Kernel from Scratch] 336 – U-Boot Porting: Getting Your Dev Board Running from Zero

dean
title: [Writing an OS Kernel from Scratch] 336 – U-Boot Porting: Getting Your Dev Board Running from Zero category: os tag: [u-boot, embedded, arm, porting] source: https://github.com/golang12306/os-kernel-from-scratch [Writing an OS Kernel from Scratch] 336 – U-Boot Porting: Getting Your Dev Board Running from Zero 1. The Essence of U-Boot Porting U-Boot porting is essentially making... » read more

H09 — How Memory Modules Are Manufactured: PCB, Soldering, and Testing

dean
H09 — How Memory Modules Are Manufactured: PCB, Soldering, and Testing Key Insight: Behind every reliably working memory module is a strict quality screening. Memory Module Manufacturing Flow The complete flow from components to finished memory module: 内存条制造流程: 1. PCB 生产 - 采购空白 PCB(6~8 层,DDR4/DDR5 规格) - 沉金(ENIG)表面处理(金手指镀金) - 丝印(Silkscreen)印刷 2. 零件准备 - DRAM 颗粒:按频率/品质分级(三星... » read more

K03 — Memory Copy During Process Creation: copy_page_range and COW Details

dean
K03 — Memory Copy During Process Creation: copy_page_range and COW Details Key Insight: The elegance of fork lies in turning “copying” into “sharing, until it must be otherwise”. Memory Copy Flow in fork The core of fork is copy_process. The memory-related part is copy_mm, which calls copy_page_range to copy the parent’s address space. fork 内存复制的调用链:... » read more

355 | Virtual Memory: From CR3 to Complete Page Table Setup

dean
355 | Virtual Memory: From CR3 to Complete Page Table Setup Key Insight: Without virtual memory, the kernel cannot even protect itself. The security foundation of the entire modern OS rests on a single register — CR3. 1. There Must First Be Someone, Then There Is a Virtual Address The previous article covered how the... » read more

Writing an OS Kernel from Scratch — Preface

Writing an OS Kernel from Scratch — A Book to Understand the Operating System Core About This Book This is a hands-on tutorial about writing an operating system kernel from scratch. The operating system textbooks on the market are either thick theory books that put you to sleep after a few pages, or directly dump... » read more