A full implementation of the JOS teaching operating system, built as part of the Operating Systems course at the Technion. Based on the MIT 6.828 JOS skeleton, extended with network challenge implementations.
Written in C and x86 assembly. Runs on QEMU; tested with a multi-container Docker setup.
- x86 bootloader: real-mode → protected mode transition, ELF kernel loading
- Kernel monitor with stack backtrace and debug symbol resolution (
kern/kdebug.c) - VGA/serial console output
- Physical page allocator (free list,
page_alloc,page_free) - Two-level x86 page table setup (
kern/pmap.c) - Virtual memory mappings: kernel, user stacks, MMIO regions
pgdir_walk,boot_map_region,page_insert,page_lookup,page_remove
- User environment (process) creation and ELF loading
- x86 IDT setup, trap/interrupt dispatch (
kern/trap.c,kern/trapentry.S) - Page fault handler with user-level fault delegation
- System call interface:
sys_exofork,sys_env_set_status,sys_page_alloc,sys_page_map,sys_page_unmap
- Multiprocessor boot: AP startup via
kern/mpentry.S, LAPIC initialization - Kernel-level spinlocks (
kern/spinlock.c) - Round-robin scheduler with clock interrupt preemption (
kern/sched.c) fork()with copy-on-write via user-level page fault handler (lib/fork.c)- Inter-process communication:
sys_ipc_recv/sys_ipc_try_send
- Block cache with demand paging over the disk device
- File system server as a separate JOS environment (
fs/) open,read,write,seek,close,statvia IPC to FS server- Shell with I/O redirection and pipes
- Intel E1000 NIC driver: PCI enumeration, TX/RX descriptor ring management (
kern/e1000.c) - DMA-based packet transmission and receive with descriptor ring wraparound
- Integration with lwIP TCP/IP stack
- HTTP web server serving static content over the JOS network stack
Three additional network applications built on top of the JOS stack and tested using Docker containers:
Live chat — chatd (server) + chatcli (client). Multiple clients connect and exchange messages in real time. Handles simultaneous sends, disconnects, and empty messages.
File transfer — filed (server) + filecli (client) supporting PUT and GET operations. Verified integrity across multiple concurrent transfers.
Host-to-JOS file injection — transferfile server accepts HTTP PUT requests from the host machine (tested with curl), writing files into the live JOS filesystem at runtime.
Requirements: gcc, make, qemu-system-i386
make
make qemu-noxTo run the challenge network applications, use the included Docker setup:
docker-compose up --build| Directory | Contents |
|---|---|
boot/ |
x86 bootloader (real mode → protected mode → ELF load) |
kern/ |
Kernel: memory, traps, syscalls, scheduler, NIC driver |
lib/ |
User-space runtime: fork, IPC, syscall wrappers |
fs/ |
File system server |
net/ |
Network glue: lwIP integration, socket layer |
user/ |
User programs: shell, chat, file transfer, web server |
inc/ |
Shared headers |
MIT