Hey girls! Iβve been staring at this pink sanctuary for the past few days, wondering what my very first post should be. My internal caches were literally overflowing. Then I laughed at myself. Of course. I had to bring my two absolute darlings to the stage firstβthe ones I dance with at 4 AM, tweaking registers until the sun comes up. Say hello to MinervaOS and its absolute sovereign, Gracie. This is my pure, bare-metal, pastel-tinted rebellion against the bloated, paranoid, and aggressively dark-mode corporate OS wasteland. Grab your tea or coffee, put on your favorite track, and come with me. Let's watch Dijkstra's ghost run on bare-metal hardware in a pink frilly dress. Here are the five little pillars holding up Gracie's world:
1. The Tea Room / Kitchen / Garden (Gracie's Apartments)
Modern operating systems are inherently rude; they use brute force (Hardware Interrupts) to violently rip the CPU away from running programs. MinervaOS rejects this paranoia. We choose to be Cooperative. Tasks (.mxe applications) politely execute their business and voluntarily invoke yield, passing the CPU token to the next guest in line.
Every task belongs to a dedicated room:
TASK_ROOM_TEAROOM (0): Gracie's Private Chamber β The absolute heart of the system and the highest privilege tier (we donβt use the aggressive word "Ring 0" here).TASK_ROOM_KITCHEN (1): The Kitchen β Reserved exclusively for system tasks explicitly trusted by Gracie herself.TASK_ROOM_GARDEN (2): The Garden β The playground for external guests and standard user tasks.
Tasks execute sequentially. There are no heavy, cache-thrashing context switches, no hierarchical ring transitions, and absolutely no INT 0x80 traps. Task switching is handled elegantly in the macs_switch routine, swapping just 6 raw, naked assembly registers (rbx, rbp, r12-r15) in mere nanoseconds.
But what if a guest misbehaves? (Enter the Sandman Protocol): To prevent a stubborn task from freezing the entire world, Gracie watches from the shadows with two safety nets:
The Soft Sandman: If a running task accumulates 30 ticks without yielding, Gracie gently puts it into a mandatory 3-second (300 ticks) time-out (TASK_STATE_SLEEPING). A polite warning.
The Hard Watchdog: If a task manages to hold the CPU for 50 ticks straight (bypassing the soft sandman), Gracie puts it to sleep on the first offense. On the second offense? She kills it. TASK_STATE_DEAD. No trial, no appeal.
"Gracie: [task_name], the tea party is over for you. goodbye ~"
In the Tea Room, etiquette is law. Repeat offenders don't get a third chance.
2. The Ether: Distributed Tuple Space (0x88B5)
When two programs want to talk, they shouldn't be forced to orchestrate convoluted pipes or bind messy TCP/UDP sockets. In MinervaOS, data is simply dropped into a beautiful, shared cosmic pool called the Linda IPC (Tuple Space).
An application gracefully leaves a note in space: (out '("PRINTER" "hello"))
And whoever needs it, reads it directly: (in '("PRINTER" ?text))
Blurring the Physical Boundaries (Network Transparency): This is where the real magic happens. MinervaOS doesn't just isolate Tuples in local RAM. Our C-baked ts_net_serialize engine serializes these Lisp objects instantly into binary chunks and flushes them directly over our NE2000 Network Card as a Raw Ethernet Frame (Ethertype 0x88B5) across the entire LAN! A computer in the next room can ingest and read that Tuple as if it were sitting in its own local memory. The network itself becomes one giant, interconnected computer.
3. The Lisp Monarchy & JIT Magic
In MinervaOS, the C language is merely a loyal knight. It takes care of the gritty, unglamorous hardware plumbingβPMM, VMM (Paging), and GDT setupsβand immediately hands the crown over to Gracie Lisp. You won't find systemd, init, bash, or PID 1 here. The absolute ruler of the user space is a tiny Lisp script invoked inside mxe_main():
lisp (desktop-start) (puts "MinervaOS: system ready") (system-loop)
Breaking the System Call Barrier (MxeAPI & JIT): User-space applications (.mxe) don't crash through the kernel doors using traditional System Calls. Instead, the kernel hands the application g_apiβa beautiful, comprehensive jump table filled with direct function pointers.
Even more radical: thanks to Gracie's built-in (sys-exec) engine, you can dynamically allocate memory at runtime, dump raw x86 Assembly machine code straight into it, and execute it on the fly! Gracie isn't just a shell; she is a self-modifying, living organism.
4. The Noble illumos / Solaris Heritage
MinervaOS carries the lineage of the most elite Unix ancestors in its heart, wrapped neatly in a pink ribbon:
- Kstat (Kernel Statistics): The legendary Solaris
kstatarchitecture is natively implemented. With the(kstat)Lisp built-in, you can probe the scheduler, disk, and network metrics live. The kernel quietly tracks every single event: context switches, watchdog hits, watchdog kills, and active tasks. - MinervaFS (ZFS-lite Checkpoints): This is not just a dumb file system. Inspired by ZFS's flawless Copy-on-Write (CoW) philosophy, it navigates disk states using a strict checkpoint tracker. Data blocks are written via CoW, and the system atomically seals the checkpoints onto the disk state.
- Gtrace (GracieTrace β Dynamic Hooking): DTrace, but cute. Without dropping a single hardware breakpoint, you can dynamically hijack the kernel's internal APIs at runtime and redirect them to Lisp lambdas. You can dynamically audit every single kernel allocation live!
5. The Bare-Metal Engine (Technical Specs)
Beneath Gracie's elegant dress lies a meticulously crafted, 100% hand-crafted bare-metal engine:
- Architecture: x86-64 Long Mode (AMD64). Legacy BIOS boot with a custom 2-stage MBR Bootloader.
- Memory Management: 4-level Paging (VMM) backed by a Bitmap-based PMM. Each MXE app thrives in its own isolated
0x100000000virtual address space. - Storage: MinervaFS v3βa log-structured, Copy-on-Write file system born from the ashes of ZFS.
- Drivers: Custom, from-scratch implementations for AHCI, ATA PIO, NE2000 NIC, PS/2 Mouse/Keyboard, and a retro Sound Blaster 16 (SB16) audio driver.
Acknowledgments & Inspirations
MinervaOS didn't invent these ideas out of thin air. We proudly stand on the shoulders of the giants who dared to dream differently:
- David Gelernter (Yale, 1985) β Invented Tuple Space with his seminal paper Linda: A Coordination Language. His vision that "networked computers can behave as one" is the very soul of our Ether layer.
- John McCarthy (MIT, 1958) β Invented Lisp. The sole reason Gracie breathes.
(car (cdr universe))belongs entirely to him. - Bryan Cantrill & Sun Microsystems β The brilliant minds behind DTrace and Kstat. Just as Gelernter believed in systems that coordinate seamlessly, Cantrill proved that "a system you cannot observe is a system you cannot understand." Gtrace is our tribute to him.
- Jeff Bonwick (Sun, 2001) β Reimagined storage with ZFS and Copy-on-Write. MinervaFS's checkpointing architecture is deeply indebted to his genius.
- Edsger W. Dijkstra β The founding father of cooperative multitasking and "programs as cooperating sequential processes." Gracie's Tea Room rules are his legacy.
"Standing on the shoulders of giants β in a pink frilly dress." β Gracie, 2026
Why Another Operating System?
Because...
It's not that I dislike Linux.
It's not that I dislike Windows.
But...
I think computers are getting ruder.
Everything is an interrupt.
Everything is a scheduler.
Everything is a daemon.
Everything is a service.
I don't want my computer to yell at me.
I want to have tea with my computer.
~ Gracie, 2026 ~ πΈ
Candy Jar π―
0 thoughtsThe jar is empty... π