Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JOS: Educational x86 Operating System (MIT 6.828/6.S081 Labs)

An end-to-end, from-scratch operating system for 32-bit x86. I implemented the bootloader, kernel, virtual memory, system calls, preemptive scheduling, IPC, and user programs by completing Labs 1–4. The code runs on QEMU and is debugged with GDB.


What this is

  • A small yet real OS that boots from a 512-byte sector into protected mode, sets up paging, enters the kernel, and runs user-space processes with isolation and a syscall interface.
  • Aligned with the JOS design (exokernel-like split): minimal kernel with user-level services and clear IPC-based interfaces.

Tech stack

  • C (freestanding, 32-bit) and x86 assembly (AT&T syntax)
  • QEMU for virtualization, GDB for debugging
  • GNU Make, GCC, Binutils (objdump/ld/objcopy)

Highlights (what I built)

  • Boot path: real → protected mode, GDT/segment setup, ELF loading
  • Virtual memory: page tables, allocator, user/kernel isolation, page faults
  • Traps and syscalls: IDT, trap handling, user↔kernel transitions, syscall ABI
  • Processes: environment abstraction, context switch, fork and exec-style loading
  • Scheduling: preemptive round-robin via timer interrupts
  • IPC: message passing and page mapping with permissions
  • SMP-ready pieces: LAPIC/TSS/init scaffolding and spinlocks (where applicable)
  • User space: small libc-style support, test apps, and utilities

Core concepts I learned

  • Protected mode, segmentation, privilege levels (ring transitions)
  • Paging mechanics: CR3, PTE flags, TLB behavior, invalidation
  • Trap/interrupt architecture and robust fault handling
  • System call design and user/kernel ABI surface
  • Preemption, timer-driven scheduling, and context switching
  • Safe sharing via page-mapped IPC and copy/permission semantics
  • Low-level debugging with QEMU+GDB, disassembly, and symbol inspection

Run it

make            # build bootloader, kernel, and user programs
make qemu-nox   # run in terminal

If you are on macOS/ARM, use a cross toolchain (i386-elf-gcc/i386-elf-binutils).

Repo at a glance

  • boot/: first-stage loader (boot.S, main.c)
  • kern/: kernel (entry.S, pmap.c, trap.c, syscall.c, sched.c, console, SMP pieces)
  • lib/: user-space support (syscall stubs, libc-ish helpers)
  • user/: user programs and tests
  • fs/: file-related code (lab scaffolding/tests)

— aj-arts

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages