Skip to content

ssddOnTop/microkernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mkernel

A structured microkernel written in Rust for COMP 512. Implements capability-based security, SMP scheduling, IPC message passing, and resource domains using onion architecture with strict layer separation. All library crates are #![no_std] with zero external dependencies. Boots on QEMU via Multiboot1.

Architecture

              mkernel_domain          Pure types, no logic
                    ^
              mkernel_services        Trait definitions (16 traits, 76 methods)
               ^      ^      ^
          mkernel_infra  mkernel_hal  mkernel_kernel
               \       |       /        \
        +-------+------+------+          \
   mkernel_boot                      mkernel_bare
   (std, dev/test)               (bare-metal, x86_64-unknown-none)
Crate Role
mkernel_domain Types only (ThreadId, Message, Capability, KernelError, etc.)
mkernel_services All trait definitions: 6 infra + 4 HAL + 6 orchestration
mkernel_infra Infra implementations (thread manager, scheduler, IPC, capabilities, memory, resource domains)
mkernel_hal HAL implementations (timer, context switch, memory mapping, interrupt controller)
mkernel_kernel Orchestration implementations (thread lifecycle, preemption, IPC orchestration, capability gate, resource enforcement, memory orchestration)
mkernel_boot Host-side binary with full demo scenario and logging
mkernel_bare Bare-metal binary for x86_64, boots on QEMU

Traits in the same layer are mutually exclusive -- they cannot depend on each other. The layer above orchestrates them.

Build & Test

# Run all tests (123 tests)
make test

# Build workspace crates
make build

Boot on QEMU

Prerequisites: rustup target add x86_64-unknown-none, QEMU, and objcopy.

# Build and run
make bare-run

# With GDB server
make bare-debug

Press Ctrl+C to stop QEMU.

Host Demo

cargo run -p mkernel_boot

Runs a simulated 9-phase scenario (domain setup, thread spawn, IPC, preemption, budget enforcement, memory management, teardown) with formatted event logging.

About

COMP 512 (OS) Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages