Sikau

Learn Operating systems

Processes, scheduling, virtual memory, concurrency and file systems — by building them.

Learn what the kernel does by building its pieces in JavaScript: a process state machine, FCFS, SJF and round-robin schedulers, a generator-based multitasker, address translation, FIFO and LRU page replacement, a malloc/free allocator, an MMU with a TLB, race-condition and deadlock analysers, an in-memory file system — and finally a tiny kernel with system calls.

Advanced · 12 lessons · about 8 hours · free

Start Operating systems free: run real code in your browserright here

Continue with Google

What you will learn

Unit 1: Processes and scheduling

The kernel, process states and who gets the CPU.

  1. Day 1What an operating system doesKernel vs user mode, system calls, and the life of a process.30 min
  2. Day 2Scheduling: FCFS and SJFWaiting time, first-come-first-served and shortest-job-first.40 min
  3. Day 3Round robin and time slicesPreemption with a quantum: fair turns for everyone.40 min
  4. Day 4Project: Processes as generatorsRun several programs on one thread, switching whenever they yield.40 min

Unit 2: Memory

Virtual memory, page replacement and the heap.

  1. Day 5Virtual memory and pagingEvery process gets its own address space; page tables map it to real memory.40 min
  2. Day 6Page replacementWhen memory is full: FIFO, LRU and Belady's anomaly.40 min
  3. Day 7malloc and freeA first-fit heap allocator with splitting and coalescing.40 min
  4. Day 8Project: A virtual memory systemDemand paging, LRU eviction and a TLB — with statistics.50 min

Unit 3: Concurrency and files

Races, deadlocks, file systems and your own kernel.

  1. Day 9Race conditionsWhy counter++ isn't safe with threads — explored by trying every interleaving.40 min
  2. Day 10DeadlockThreads waiting on each other forever — detect cycles and avoid them with lock ordering.40 min
  3. Day 11File systemsDirectories, paths and files — a small file system in memory.40 min
  4. Day 12Capstone: A tiny operating systemProcesses as generators, system calls, sleeping, spawning and a preemptive scheduler.55 min

Before you start

These courses make Operating systems easier:

See all courses

Built with ❤️ by dibe.sh