Writing an OS Kernel from Scratch | 351: NIC — From PHY to Socket

dean
Writing an OS Kernel from Scratch | 351: NIC — From PHY to Socket Abstract: The network card is the gateway for a computer to connect to the network. Data travels from the application socket all the way through the protocol stack, driver, bus, and reaches the PHY, finally becoming optical/electrical signals transmitted over the... » read more

A03 — Multi-threaded malloc: Arena Contention and Per-thread Arena

dean
A03 — Multi-threaded malloc: Arena Contention and Per-thread Arena Key Insight: In multi-threaded scenarios, every malloc is a potential contention point. ptmalloc uses arenas to solve this problem. The Problem with Multi-threaded malloc In single-threaded programs, malloc contention is rare (only one heap). But in multi-threaded programs, all threads share the same heap. Without special... » read more

Writing an OS Kernel from Scratch | Synchronization Primitives — spinlock and semaphore, How the OS Coordinates Concurrent Access

dean
Writing an OS Kernel from Scratch | Synchronization Primitives — spinlock and semaphore, How the OS Coordinates Concurrent Access Two processes write data to the same file simultaneously — process A writes the first 100 bytes, process B writes the next 100 bytes. If no coordination is done, what happens? Process A just read the... » read more