{"version":1,"pages":[{"id":"-M13KDG5VlFCsQNQI5Ve","title":"Learn OS with me","pathname":"/build_a_os","siteSpaceId":"sitesp_WOnJA","description":"This is my journey of learning how to build an operating system."},{"id":"-M4biFxrD-TIgOWg4iVz","title":"OS interfaces","pathname":"/build_a_os/os-interfaces/os-interfaces","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"OS Interfaces"}]},{"id":"-M4bj3IXmHaeZGA_DqvX","title":"I/O and File descriptors","pathname":"/build_a_os/os-interfaces/i-o-and-file-descriptors","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"OS Interfaces"}]},{"id":"-M4birvUdi1ZKk9NsX_J","title":"Process and Memory","pathname":"/build_a_os/os-interfaces/process-and-memory","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"OS Interfaces"}]},{"id":"-M4bjBGodNJRGgfuTDM1","title":"Pipes","pathname":"/build_a_os/os-interfaces/pipes","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"OS Interfaces"}]},{"id":"-M4bjFSwS5vLvVZXVpRV","title":"File","pathname":"/build_a_os/os-interfaces/file","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"OS Interfaces"}]},{"id":"-M4biNWwFypNtS1HD1BF","title":"OS Organization","pathname":"/build_a_os/os-organization/untitled","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"OS Organization"}]},{"id":"-M4bk29Kppil2cathR_K","title":"Challenge yourself","pathname":"/build_a_os/os-organization/challenge-yourself","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"OS Organization"}]},{"id":"-M13O8xmRiXPyeSjdBud","title":"XV6 Virtual Memory","pathname":"/build_a_os/virtual-memory/xv6-virtual-memory","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"}]},{"id":"-M4buQB1aiw0Dq3OY-Lw","title":"Page Table","pathname":"/build_a_os/virtual-memory/page-table","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"}]},{"id":"-M4buJrX70llfNvP0et9","title":"Part 1: How to translate address","pathname":"/build_a_os/virtual-memory/page-table/part-1-how-to-translate-address","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"},{"label":"Page Table"}]},{"id":"-M4buyUvCHVzJ03q7NLh","title":"Part 2: Create an Address Space","pathname":"/build_a_os/virtual-memory/page-table/part-2-create-an-address-space","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"},{"label":"Page Table"}]},{"id":"-M4bvALtOahgRpSEvG2I","title":"Part 3: How Page Table is used","pathname":"/build_a_os/virtual-memory/page-table/part-3-how-page-table-is-used","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"},{"label":"Page Table"}]},{"id":"-M4bvbI6X-pvcdh5Obyo","title":"Part 4: Page Fault and Swap","pathname":"/build_a_os/virtual-memory/page-table/part-4-page-fault-and-swap","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"},{"label":"Page Table"}]},{"id":"-M4bzPvzHiZKwahTF6Kn","title":"Part 5: How to operate on page tables","pathname":"/build_a_os/virtual-memory/page-table/part-5-how-to-operate-on-page-tables","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"},{"label":"Page Table"}]},{"id":"-M4buQ2FJD5qIfirC7BC","title":"xv6 buddy allocator","pathname":"/build_a_os/virtual-memory/untitled-1","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"}]},{"id":"-M4byI44dDk39JvMMYdr","title":"How to display physical memory","pathname":"/build_a_os/virtual-memory/untitled-1/how-to-display-physical-memory","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"},{"label":"xv6 buddy allocator"}]},{"id":"-M4buPrLA8G59ZbUAIgY","title":"Memory Management Walk Through","pathname":"/build_a_os/virtual-memory/untitled","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Memory Management"}]},{"id":"-M4f4tZ2YMuVakQBmWSJ","title":"Trap Home Page","pathname":"/build_a_os/traps-and-interrupts/trap-home-page","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Traps and Interrupts"}]},{"id":"-M4fDrPr7Q1qWG3xhlyJ","title":"系统调用的核心原理","pathname":"/build_a_os/traps-and-interrupts/trap-home-page/xi-tong-tiao-yong-de-he-xin-yuan-li","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Traps and Interrupts"},{"label":"Trap Home Page"}]},{"id":"-M4f4uBfm2Ua8uXLmsWU","title":"What is trapframe","pathname":"/build_a_os/traps-and-interrupts/untitled-2","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Traps and Interrupts"}]},{"id":"-M4f4umOXQLM--2dmp-H","title":"What is trampoline","pathname":"/build_a_os/traps-and-interrupts/untitled-3","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Traps and Interrupts"}]},{"id":"-M4f9lIYgqvIMLdZRgLz","title":"Traps from kernel space","pathname":"/build_a_os/traps-and-interrupts/traps-from-kernel-space","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Traps and Interrupts"}]},{"id":"-M4f9keh0yFllRNKArCm","title":"How fork() works","pathname":"/build_a_os/traps-and-interrupts/how-fork-works","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Traps and Interrupts"}]},{"id":"-M1ITenaXBqQJbTySQCI","title":"How system calls get into/out of the kernel","pathname":"/build_a_os/traps-and-interrupts/untitled","siteSpaceId":"sitesp_WOnJA","description":"What happens if the shell printing a prompt with write(2, “$ “, 2)?","breadcrumbs":[{"label":"Traps and Interrupts"}]},{"id":"-M4fDUURc-qZ9I_ytOp8","title":"How exec() works","pathname":"/build_a_os/traps-and-interrupts/how-exec-works","siteSpaceId":"sitesp_WOnJA","description":"Split the flow into 2 phases.","breadcrumbs":[{"label":"Traps and Interrupts"}]},{"id":"-M13N2bih9z_ur0ci2bq","title":"XV6 CPU Scheduling","pathname":"/build_a_os/scheduling/xv6-cpu-scheduling","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Scheduling"}]},{"id":"-M4f34p1wieV0tODSXqN","title":"How unix pipes work?","pathname":"/build_a_os/scheduling/how-unix-pipes-work","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Scheduling"}]},{"id":"-M4f3Uefo7Dg0Pje3PmO","title":"How does wait(), exit(), kill() work?","pathname":"/build_a_os/scheduling/how-does-wait-exit-kill-work","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Scheduling"}]},{"id":"-M4bk_CLexBAWVF1r9YD","title":"Overview and Disk Layout","pathname":"/build_a_os/file-system/overview-and-disk-layout","siteSpaceId":"sitesp_WOnJA","description":"7 layers of file system","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bkaHEWMOLx3MOVxAs","title":"Buffer Cache","pathname":"/build_a_os/file-system/buffer-cache","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bka8dDjKxUMyOlsxp","title":"Design Inode Layer","pathname":"/build_a_os/file-system/design-inode-layer","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4boiInOgLwqjNH89TM","title":"Inode Content","pathname":"/build_a_os/file-system/inode-content","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bn79ceT0CmwyjDJbh","title":"Block Allocator","pathname":"/build_a_os/file-system/block-allocator","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bnFtWVSSQoqVMJAPG","title":"Design a log system for crash recovery","pathname":"/build_a_os/file-system/design-a-log-system-for-crash-recovery","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bnzMmWl7AKfZk5FDS","title":"Directory Layer","pathname":"/build_a_os/file-system/directory-layer","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bnz7q2Li7qA3rMyVa","title":"Path names","pathname":"/build_a_os/file-system/path-names","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bnQxARtrktYCHM3Wb","title":"File Descriptor Layer","pathname":"/build_a_os/file-system/untitled-2","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bnQX0WZTJzwYStIK6","title":"FS System Calls","pathname":"/build_a_os/file-system/untitled","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bnYPYCaQONW6aphvL","title":"XV6 VS Real World","pathname":"/build_a_os/file-system/xv6-vs-real-world","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bk_xfV_dq4DUru9TX","title":"Make Xv6 File disk management system","pathname":"/build_a_os/file-system/make-xv6-file-disk-management-system","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4bo_eJ8e4opggV31Wx","title":"Write FS simulator in python","pathname":"/build_a_os/file-system/write-fs-simulator-in-python","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M4boyaepDe6nOnedPTv","title":"How Redirect Shell command works","pathname":"/build_a_os/file-system/how-redirect-shell-command-works","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"File System"}]},{"id":"-M1ITqX20vCexgceBzqG","title":"Spinlock","pathname":"/build_a_os/lock/untitled","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Concurrency"}]},{"id":"-M4ezWjWsbZCZKJxKQpv","title":"How linux select work","pathname":"/build_a_os/lock/how-linux-select-work","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Concurrency"}]},{"id":"-M4ezWaBP58hXOntjxuQ","title":"Hardware Support Locking","pathname":"/build_a_os/lock/untitled-3","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Concurrency"}]},{"id":"-M4ezWSmg6yDLsbrXyC1","title":"Exercise: Implement atomic counter","pathname":"/build_a_os/lock/untitled-2","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Concurrency"}]},{"id":"-M4f1BKVG0yfNwkyArh5","title":"Locking in Xv6","pathname":"/build_a_os/lock/locking-in-xv6","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Concurrency"}]},{"id":"-M4f0oPgoPes78CwR4BZ","title":"Concurrency in Xv6","pathname":"/build_a_os/lock/concurrency-in-xv6","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Concurrency"}]},{"id":"-M4f1-ieqbFPsrElGrxg","title":"Exercise: Socket Programming with Event loop","pathname":"/build_a_os/lock/exercise-socket-programming-with-event-loop","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Concurrency"}]},{"id":"-M1PLr-un9RVKMqBw1rB","title":"Lab 1 Xv6 and Unix utilities","pathname":"/build_a_os/labs/lab-1-xv6-and-unix-utilities","siteSpaceId":"sitesp_WOnJA","description":"Implement some user tools.","breadcrumbs":[{"label":"Labs"}]},{"id":"-M2B8G7flEcYyqxLHLii","title":"Lab 2 Shell","pathname":"/build_a_os/labs/lab-2-shell","siteSpaceId":"sitesp_WOnJA","description":"Write a simple shell in OS","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1ST4A83A05FeXfaqUq","title":"Lab 3 Buddy Allocator","pathname":"/build_a_os/labs/lab-3-buddy-allocator","siteSpaceId":"sitesp_WOnJA","description":"Understand and improve physical memory allocator","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1CLUBGTPLpZk8m_kHU","title":"Lab 4 Lazy","pathname":"/build_a_os/labs/lab-4-lazy","siteSpaceId":"sitesp_WOnJA","description":"Allocate user memory lazily","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1DCwhYocRlqV8LIe2A","title":"Lab 5 Copy-on-Write Fork for xv6","pathname":"/build_a_os/labs/lab-5-copy-on-write-fork-for-xv6","siteSpaceId":"sitesp_WOnJA","description":"Your task is to implement copy-on-write fork in the xv6 kernel","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1IQ_ctyv_Ausg4k_ai","title":"Lab 6 RISC-V assembly","pathname":"/build_a_os/labs/lab-6-risc-v-assembly","siteSpaceId":"sitesp_WOnJA","description":"warmup and learn assembly","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1IPpcFdh7orrz3mYMy","title":"Lab 6 Uthread: switching between threads","pathname":"/build_a_os/labs/lab-6-uthread-switching-between-threads","siteSpaceId":"sitesp_WOnJA","description":"Design the context switch mechanism for a user-level threading system","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1IRshCi1sf97cchyno","title":"Lab 6 Alarm","pathname":"/build_a_os/labs/lab-6-alarm","siteSpaceId":"sitesp_WOnJA","description":"Implement a primitive form of user-level interrupt/fault handlers.","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1SLMmhN3xy_piNziQ5","title":"Lab 7 Lock","pathname":"/build_a_os/labs/lab-7-lock","siteSpaceId":"sitesp_WOnJA","description":"Re-designing code to increase parallelism","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1ISTDDf4hOCJv6ApuH","title":"Lab 8 File System: Large Files","pathname":"/build_a_os/labs/lab-8-file-system-large-files","siteSpaceId":"sitesp_WOnJA","description":"Increase the maximum size of an xv6 file.","breadcrumbs":[{"label":"Labs"}]},{"id":"-M1ISqRw_CtZ66F9CKiM","title":"Lab 8 File System: Symbolic links","pathname":"/build_a_os/labs/lab-8-file-system-symbolic-links","siteSpaceId":"sitesp_WOnJA","description":"Add symbolic links to xv6","breadcrumbs":[{"label":"Labs"}]},{"id":"-M13O_u5Vf1RQPSzUPWQ","title":"Lab 9 mmap","pathname":"/build_a_os/labs/untitled","siteSpaceId":"sitesp_WOnJA","description":"Implement features relevant to memory-mapping a file","breadcrumbs":[{"label":"Labs"}]},{"id":"-M2B6Yi0uhzrGFWIKvPV","title":"Lab 10 Networking Part 1","pathname":"/build_a_os/labs/lab-10-networking-part-1","siteSpaceId":"sitesp_WOnJA","description":"Complete the implementation of the E1000 networking driver","breadcrumbs":[{"label":"Labs"}]},{"id":"-M2B7Nv1aOvMt6uETkfZ","title":"Lab 10 Networking Part 2","pathname":"/build_a_os/labs/lab-10-networking-part-2","siteSpaceId":"sitesp_WOnJA","description":"Implement network sockets","breadcrumbs":[{"label":"Labs"}]},{"id":"-M4bpbUasU0Fib_Ex5Fe","title":"RISC-V assembly","pathname":"/build_a_os/hardware-device-assembly/risc-v-assembly","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Hardware, Device, Assembly"}]},{"id":"-M4bwMocpDsZCWtO4_d2","title":"Assembly: Access and Store information in Memory","pathname":"/build_a_os/hardware-device-assembly/assembly-access-and-store-information-in-memory","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Hardware, Device, Assembly"}]},{"id":"-M4btr1h2JRpc_mnfA7b","title":"Start xv6 and the first process","pathname":"/build_a_os/hardware-device-assembly/start-xv6-and-the-first-process","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Hardware, Device, Assembly"}]},{"id":"-M4btlNMhU-tyYqXdLAf","title":"Why first user process loads another program?","pathname":"/build_a_os/hardware-device-assembly/why-first-user-process-loads-another-program","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Hardware, Device, Assembly"}]},{"id":"-M4btaRN6WzspvGlzMqD","title":"What does kernel.ld do in XV6?","pathname":"/build_a_os/hardware-device-assembly/what-does-kernel.ld-do-in-xv6","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Hardware, Device, Assembly"}]},{"id":"-M4bqDZsH_RmZso2jaJy","title":"XV6 Device Driver","pathname":"/build_a_os/hardware-device-assembly/xv6-device-driver","siteSpaceId":"sitesp_WOnJA","description":"","breadcrumbs":[{"label":"Hardware, Device, Assembly"}]}]}