# build a OS

## build a OS

- [Learn OS with me](https://xiayingp.gitbook.io/build_a_os/master.md): This is my journey of learning how to build an operating system.
- [OS interfaces](https://xiayingp.gitbook.io/build_a_os/os-interfaces/os-interfaces.md)
- [I/O and File descriptors](https://xiayingp.gitbook.io/build_a_os/os-interfaces/i-o-and-file-descriptors.md)
- [Process and Memory](https://xiayingp.gitbook.io/build_a_os/os-interfaces/process-and-memory.md)
- [Pipes](https://xiayingp.gitbook.io/build_a_os/os-interfaces/pipes.md)
- [File](https://xiayingp.gitbook.io/build_a_os/os-interfaces/file.md)
- [OS Organization](https://xiayingp.gitbook.io/build_a_os/os-organization/untitled.md)
- [Challenge yourself](https://xiayingp.gitbook.io/build_a_os/os-organization/challenge-yourself.md)
- [XV6 Virtual Memory](https://xiayingp.gitbook.io/build_a_os/virtual-memory/xv6-virtual-memory.md)
- [Page Table](https://xiayingp.gitbook.io/build_a_os/virtual-memory/page-table.md)
- [Part 1: How to translate address](https://xiayingp.gitbook.io/build_a_os/virtual-memory/page-table/part-1-how-to-translate-address.md)
- [Part 2: Create an Address Space](https://xiayingp.gitbook.io/build_a_os/virtual-memory/page-table/part-2-create-an-address-space.md)
- [Part 3: How Page Table is used](https://xiayingp.gitbook.io/build_a_os/virtual-memory/page-table/part-3-how-page-table-is-used.md)
- [Part 4: Page Fault and Swap](https://xiayingp.gitbook.io/build_a_os/virtual-memory/page-table/part-4-page-fault-and-swap.md)
- [Part 5: How to operate on page tables](https://xiayingp.gitbook.io/build_a_os/virtual-memory/page-table/part-5-how-to-operate-on-page-tables.md)
- [xv6 buddy allocator](https://xiayingp.gitbook.io/build_a_os/virtual-memory/untitled-1.md)
- [How to display physical memory](https://xiayingp.gitbook.io/build_a_os/virtual-memory/untitled-1/how-to-display-physical-memory.md)
- [Memory Management Walk Through](https://xiayingp.gitbook.io/build_a_os/virtual-memory/untitled.md)
- [Trap Home Page](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/trap-home-page.md)
- [系统调用的核心原理](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/trap-home-page/xi-tong-tiao-yong-de-he-xin-yuan-li.md)
- [What is trapframe](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/untitled-2.md)
- [What is trampoline](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/untitled-3.md)
- [Traps from kernel space](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/traps-from-kernel-space.md)
- [How fork() works](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/how-fork-works.md)
- [How system calls get into/out of the kernel](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/untitled.md): What happens if the shell printing a prompt with write(2, “$ “, 2)?
- [How exec() works](https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/how-exec-works.md): Split the flow into 2 phases.
- [XV6 CPU Scheduling](https://xiayingp.gitbook.io/build_a_os/scheduling/xv6-cpu-scheduling.md)
- [How unix pipes work?](https://xiayingp.gitbook.io/build_a_os/scheduling/how-unix-pipes-work.md)
- [How does wait(), exit(), kill() work?](https://xiayingp.gitbook.io/build_a_os/scheduling/how-does-wait-exit-kill-work.md)
- [Overview and Disk Layout](https://xiayingp.gitbook.io/build_a_os/file-system/overview-and-disk-layout.md): 7 layers of file system
- [Buffer Cache](https://xiayingp.gitbook.io/build_a_os/file-system/buffer-cache.md)
- [Design Inode Layer](https://xiayingp.gitbook.io/build_a_os/file-system/design-inode-layer.md)
- [Inode Content](https://xiayingp.gitbook.io/build_a_os/file-system/inode-content.md)
- [Block Allocator](https://xiayingp.gitbook.io/build_a_os/file-system/block-allocator.md)
- [Design a log system for crash recovery](https://xiayingp.gitbook.io/build_a_os/file-system/design-a-log-system-for-crash-recovery.md)
- [Directory Layer](https://xiayingp.gitbook.io/build_a_os/file-system/directory-layer.md)
- [Path names](https://xiayingp.gitbook.io/build_a_os/file-system/path-names.md)
- [File Descriptor Layer](https://xiayingp.gitbook.io/build_a_os/file-system/untitled-2.md)
- [FS System Calls](https://xiayingp.gitbook.io/build_a_os/file-system/untitled.md)
- [XV6 VS Real World](https://xiayingp.gitbook.io/build_a_os/file-system/xv6-vs-real-world.md)
- [Make Xv6 File disk management system](https://xiayingp.gitbook.io/build_a_os/file-system/make-xv6-file-disk-management-system.md)
- [Write FS simulator in python](https://xiayingp.gitbook.io/build_a_os/file-system/write-fs-simulator-in-python.md)
- [How Redirect Shell command works](https://xiayingp.gitbook.io/build_a_os/file-system/how-redirect-shell-command-works.md)
- [Spinlock](https://xiayingp.gitbook.io/build_a_os/lock/untitled.md)
- [How linux select work](https://xiayingp.gitbook.io/build_a_os/lock/how-linux-select-work.md)
- [Hardware Support Locking](https://xiayingp.gitbook.io/build_a_os/lock/untitled-3.md)
- [Exercise: Implement atomic counter](https://xiayingp.gitbook.io/build_a_os/lock/untitled-2.md)
- [Locking in Xv6](https://xiayingp.gitbook.io/build_a_os/lock/locking-in-xv6.md)
- [Concurrency in Xv6](https://xiayingp.gitbook.io/build_a_os/lock/concurrency-in-xv6.md)
- [Exercise: Socket Programming with Event loop](https://xiayingp.gitbook.io/build_a_os/lock/exercise-socket-programming-with-event-loop.md)
- [Lab 1 Xv6 and Unix utilities](https://xiayingp.gitbook.io/build_a_os/labs/lab-1-xv6-and-unix-utilities.md): Implement some user tools.
- [Lab 2 Shell](https://xiayingp.gitbook.io/build_a_os/labs/lab-2-shell.md): Write a simple shell in OS
- [Lab 3 Buddy Allocator](https://xiayingp.gitbook.io/build_a_os/labs/lab-3-buddy-allocator.md): Understand and improve physical memory allocator
- [Lab 4 Lazy](https://xiayingp.gitbook.io/build_a_os/labs/lab-4-lazy.md): Allocate user memory lazily
- [Lab 5 Copy-on-Write Fork for xv6](https://xiayingp.gitbook.io/build_a_os/labs/lab-5-copy-on-write-fork-for-xv6.md): Your task is to implement copy-on-write fork in the xv6 kernel
- [Lab 6 RISC-V assembly](https://xiayingp.gitbook.io/build_a_os/labs/lab-6-risc-v-assembly.md): warmup and learn assembly
- [Lab 6 Uthread: switching between threads](https://xiayingp.gitbook.io/build_a_os/labs/lab-6-uthread-switching-between-threads.md): Design the context switch mechanism for a user-level threading system
- [Lab 6 Alarm](https://xiayingp.gitbook.io/build_a_os/labs/lab-6-alarm.md): Implement a primitive form of user-level interrupt/fault handlers.
- [Lab 7 Lock](https://xiayingp.gitbook.io/build_a_os/labs/lab-7-lock.md): Re-designing code to increase parallelism
- [Lab 8 File System: Large Files](https://xiayingp.gitbook.io/build_a_os/labs/lab-8-file-system-large-files.md): Increase the maximum size of an xv6 file.
- [Lab 8 File System: Symbolic links](https://xiayingp.gitbook.io/build_a_os/labs/lab-8-file-system-symbolic-links.md): Add symbolic links to xv6
- [Lab 9 mmap](https://xiayingp.gitbook.io/build_a_os/labs/untitled.md): Implement features relevant to memory-mapping a file
- [Lab 10 Networking Part 1](https://xiayingp.gitbook.io/build_a_os/labs/lab-10-networking-part-1.md): Complete the implementation of the E1000 networking driver
- [Lab 10 Networking Part 2](https://xiayingp.gitbook.io/build_a_os/labs/lab-10-networking-part-2.md): Implement network sockets
- [RISC-V assembly](https://xiayingp.gitbook.io/build_a_os/hardware-device-assembly/risc-v-assembly.md)
- [Assembly: Access and Store information in Memory](https://xiayingp.gitbook.io/build_a_os/hardware-device-assembly/assembly-access-and-store-information-in-memory.md)
- [Start xv6 and the first process](https://xiayingp.gitbook.io/build_a_os/hardware-device-assembly/start-xv6-and-the-first-process.md)
- [Why first user process loads another program?](https://xiayingp.gitbook.io/build_a_os/hardware-device-assembly/why-first-user-process-loads-another-program.md)
- [What does kernel.ld do in XV6?](https://xiayingp.gitbook.io/build_a_os/hardware-device-assembly/what-does-kernel.ld-do-in-xv6.md)
- [XV6 Device Driver](https://xiayingp.gitbook.io/build_a_os/hardware-device-assembly/xv6-device-driver.md)
