MOD-ARCH: an x86 CPU simulator that shows, instruction by instruction, what an operating system does.
Context
Operating systems textbooks explain mode switches, context switches, and interrupts with static diagrams. Whoever sees them for the first time has to imagine what happens between one frame and the next: what the hardware pushes onto the stack, which process leaves the ready queue, or which selector ends up in CS, the code segment register that tells whether the CPU runs in kernel or user mode. That gap is where misconceptions take root.
MOD-ARCH runs programs step by step on a simplified x86 CPU and shows, live, what the operating system does on top of it: kernel and user mode switches, hardware interrupts, syscalls, the PCB preserved across every context switch, and memory violations. It is joint work with Ana Morales Bezeira and Antonio Silva Sprock, built as an open educational resource for the Operating Systems course, and it is available at mod-arch-simulator.com. The code is open source under the MIT license on GitHub.
Architecture
A single Go binary serves the compiled frontend and exposes a WebSocket API. The backend splits into three layers: pkg/cpu models the processor (registers, a 4 MB address space with per-region permissions, instruction decoding, and the IDT), pkg/kernel implements operating system policy, and internal/sim orchestrates the simulation and streams events to connected clients.
The unit of progress is Step(): it executes one instruction and emits typed events such as EventInstruction, EventRegWrite, EventModeSwitch, EventIRQFire, or EventPageFault. The frontend keeps no parallel model of state; it rebuilds what it shows purely from that stream. If something looks wrong on screen, the bug lives in the event that produced it, and you can trace it from the events panel without leaving the class. Because the simulation is deterministic, the same initial state always yields the same event sequence, which makes full scenarios testable, from a page fault to a thread race, without brittle oracles.
The kernel
A process tree rooted at the idle task (PID 0), a round-robin scheduler with a configurable quantum, syscalls over INT 0x80 following the Linux i386 ABI, threads, and IPC through pipes, mutexes, and semaphores. The catalog holds more than thirty demos across eight categories: CPU fundamentals, dual mode and syscalls, scheduling, processes and IPC, threads, synchronization, faults and exceptions, and integrative showcases. Each program shows pseudo-C and bytecode side by side, with the active instruction highlighted.
ARCHIUS
The conversational tutor pairs retrieval over an indexed teaching corpus with a snapshot of the active session: loaded program, PCBs, registers, and recent events. That lets it explain what the student has on screen right now rather than a generic case, and every answer cites its sources.
In the classroom
A broadcast mode syncs the instructor’s session with the students’, who can branch off to experiment on their own. The admin panel manages roles and reveals the curriculum progressively over the semester. The UI adds an accessibility layer (keyboard-reachable menu, high-contrast Atkinson Hyperlegible theme, text scaling, screen-reader announcements of kernel events, and color-blind-safe cues) and ships in Spanish, English, and Portuguese.
Recognition
At the XXI Latin American Conference on Learning Technologies (LACLO 2026) in Rio de Janeiro:
- Paper: MOD-ARCH 1.0: An Open-Concept Educational Tool for Teaching Operating Systems, presented at the conference and to appear in Springer Lecture Notes in Educational Technology.
- Third place in the learning objects competition with MOD-ARCH: A Laboratory for Operating Systems Practical Sessions (official list of awarded works).
- Workshop on process theory, the instruction execution cycle, interrupt handling, and operating system management, as instructor.
Related
- Agents are reinventing the operating system: the same mechanisms MOD-ARCH makes visible (scheduler, IPC, kernel) resurface in agent orchestrators.
- RAG as operational memory: retrieval, chunking, and citations, the groundwork ARCHIUS builds on.
- AI as an evaluator: what happens when AI enters the classroom from the other side, to grade.