<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="atom.xsl"?><feed xmlns="http://www.w3.org/2005/Atom">
    <title>Atom Feed | Gracie.lifestyle</title>
    <subtitle>code, chaos and candy since 2025</subtitle>
    <link href="https://gracie.lifestyle/feeds/atom.php" rel="self" type="application/atom+xml"/>
    <link href="https://gracie.lifestyle" rel="alternate" type="text/html"/>
    <id>https://gracie.lifestyle/feeds/atom.php</id>
    <updated>2026-07-26T00:00:00+02:00</updated>
    <author>
        <name>Gracie</name>
    </author>
    <entry>
        <title>🍵 Goodbye POSIX, Hello Tea Room: Inside MinervaOS Architecture</title>
        <link href="https://gracie.lifestyle/pages/candyjar.php?id=1" rel="alternate" type="text/html"/>
        <id>https://gracie.lifestyle/pages/candyjar.php?id=1</id>
        <published>2026-07-26T00:00:00+02:00</published>
        <updated>2026-07-26T00:00:00+02:00</updated>
        <summary>What if an operating system wasn&#039;t built around fear, but around trust? Welcome to the Tea Room.</summary>
        <content type="html">&lt;blockquote&gt;&lt;em&gt;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.&lt;/em&gt;&amp;nbsp;&lt;em&gt;Say hello to&amp;nbsp;&lt;/em&gt;&lt;strong&gt;&lt;em&gt;MinervaOS&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&amp;nbsp;and its absolute sovereign,&amp;nbsp;&lt;/em&gt;&lt;strong&gt;&lt;em&gt;Gracie&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;. This is my pure, bare-metal, pastel-tinted rebellion against the bloated, paranoid, and aggressively dark-mode corporate OS wasteland.&lt;/em&gt;&amp;nbsp;&lt;em&gt;Grab your tea or coffee, put on your favorite track, and come with me. Let&#039;s watch Dijkstra&#039;s ghost run on bare-metal hardware in a pink frilly dress. Here are the five little pillars holding up Gracie&#039;s world:&lt;/em&gt;&lt;/blockquote&gt;&lt;h2&gt;&lt;br&gt;&lt;/h2&gt;&lt;h2&gt;1. The Tea Room / Kitchen / Garden (Gracie&#039;s Apartments)&lt;/h2&gt;&lt;p&gt;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&amp;nbsp;&lt;strong&gt;Cooperative&lt;/strong&gt;. Tasks (&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;.mxe&lt;/code&gt;&amp;nbsp;applications) politely execute their business and voluntarily invoke&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;yield&lt;/code&gt;, passing the CPU token to the next guest in line.&lt;/p&gt;&lt;p&gt;Every task belongs to a dedicated&amp;nbsp;&lt;strong&gt;room&lt;/strong&gt;:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;TASK_ROOM_TEAROOM (0)&lt;/code&gt;: Gracie&#039;s Private Chamber — The absolute heart of the system and the highest privilege tier (we don’t use the aggressive word &quot;Ring 0&quot; here).&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;TASK_ROOM_KITCHEN (1)&lt;/code&gt;: The Kitchen — Reserved exclusively for system tasks explicitly trusted by Gracie herself.&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;TASK_ROOM_GARDEN (2)&lt;/code&gt;: The Garden — The playground for external guests and standard user tasks.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Tasks execute sequentially. There are no heavy, cache-thrashing context switches, no hierarchical ring transitions, and absolutely no&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;INT 0x80&lt;/code&gt;&amp;nbsp;traps. Task switching is handled elegantly in the&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;macs_switch&lt;/code&gt;&amp;nbsp;routine, swapping just 6 raw, naked assembly registers (&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;rbx, rbp, r12-r15&lt;/code&gt;) in mere nanoseconds.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;But what if a guest misbehaves? (Enter the Sandman Protocol):&lt;/strong&gt;&amp;nbsp;To prevent a stubborn task from freezing the entire world, Gracie watches from the shadows with two safety nets:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Soft Sandman:&lt;/strong&gt;&amp;nbsp;If a running task accumulates 30 ticks without yielding, Gracie gently puts it into a mandatory 3-second (300 ticks) time-out (&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;TASK_STATE_SLEEPING&lt;/code&gt;). A polite warning.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Hard Watchdog:&lt;/strong&gt;&amp;nbsp;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.&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;TASK_STATE_DEAD&lt;/code&gt;. No trial, no appeal.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;em&gt;&quot;Gracie: [task_name], the tea party is over for you. goodbye ~&quot;&lt;/em&gt;&lt;/blockquote&gt;&lt;p&gt;In the Tea Room, etiquette is law. Repeat offenders don&#039;t get a third chance.&lt;/p&gt;&lt;h2&gt;&lt;br&gt;&lt;/h2&gt;&lt;h2&gt;2. The Ether: Distributed Tuple Space (0x88B5)&lt;/h2&gt;&lt;p&gt;When two programs want to talk, they shouldn&#039;t be forced to orchestrate convoluted&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;pipes&lt;/code&gt;&amp;nbsp;or bind messy&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;TCP/UDP&lt;/code&gt;&amp;nbsp;sockets. In MinervaOS, data is simply dropped into a beautiful, shared cosmic pool called the&amp;nbsp;&lt;strong&gt;Linda IPC (Tuple Space)&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;An application gracefully leaves a note in space:&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;(out &#039;(&quot;PRINTER&quot; &quot;hello&quot;))&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;And whoever needs it, reads it directly:&amp;nbsp;&lt;/em&gt;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;(in &#039;(&quot;PRINTER&quot; ?text))&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Blurring the Physical Boundaries (Network Transparency):&lt;/strong&gt;&amp;nbsp;This is where the real magic happens. MinervaOS doesn&#039;t just isolate Tuples in local RAM. Our C-baked&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;ts_net_serialize&lt;/code&gt;&amp;nbsp;engine serializes these Lisp objects instantly into binary chunks and flushes them directly over our NE2000 Network Card as a&amp;nbsp;&lt;strong&gt;Raw Ethernet Frame (Ethertype 0x88B5)&lt;/strong&gt;&amp;nbsp;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.&lt;/p&gt;&lt;h2&gt;&lt;br&gt;&lt;/h2&gt;&lt;h2&gt;3. The Lisp Monarchy &amp;amp; JIT Magic&lt;/h2&gt;&lt;p&gt;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&amp;nbsp;&lt;strong&gt;Gracie Lisp&lt;/strong&gt;. You won&#039;t find&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;systemd&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;init&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;bash&lt;/code&gt;, or&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;PID 1&lt;/code&gt;&amp;nbsp;here. The absolute ruler of the user space is a tiny Lisp script invoked inside&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;mxe_main()&lt;/code&gt;:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;pre class=&quot;ql-syntax&quot; spellcheck=&quot;false&quot;&gt;lisp
(desktop-start)
(puts &quot;MinervaOS: system ready&quot;)
(system-loop)
&lt;/pre&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Breaking the System Call Barrier (MxeAPI &amp;amp; JIT):&lt;/strong&gt;&amp;nbsp;User-space applications (&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;.mxe&lt;/code&gt;) don&#039;t crash through the kernel doors using traditional System Calls. Instead, the kernel hands the application&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;g_api&lt;/code&gt;—a beautiful, comprehensive jump table filled with direct function pointers.&lt;/p&gt;&lt;p&gt;Even more radical: thanks to Gracie&#039;s built-in&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;(sys-exec)&lt;/code&gt;&amp;nbsp;engine, you can dynamically allocate memory at runtime, dump raw&amp;nbsp;&lt;strong&gt;x86 Assembly machine code&lt;/strong&gt;&amp;nbsp;straight into it, and execute it on the fly! Gracie isn&#039;t just a shell; she is a self-modifying, living organism.&lt;/p&gt;&lt;h2&gt;&lt;br&gt;&lt;/h2&gt;&lt;h2&gt;4. The Noble illumos / Solaris Heritage&lt;/h2&gt;&lt;p&gt;MinervaOS carries the lineage of the most elite Unix ancestors in its heart, wrapped neatly in a pink ribbon:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Kstat (Kernel Statistics):&lt;/strong&gt;&amp;nbsp;The legendary Solaris&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;kstat&lt;/code&gt;&amp;nbsp;architecture is natively implemented. With the&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;(kstat)&lt;/code&gt;&amp;nbsp;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.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;MinervaFS (ZFS-lite Checkpoints):&lt;/strong&gt;&amp;nbsp;This is not just a dumb file system. Inspired by ZFS&#039;s flawless&amp;nbsp;&lt;em&gt;Copy-on-Write&lt;/em&gt;&amp;nbsp;(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.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gtrace (GracieTrace — Dynamic Hooking):&lt;/strong&gt;&amp;nbsp;DTrace, but cute. Without dropping a single hardware breakpoint, you can dynamically hijack the kernel&#039;s internal APIs at runtime and redirect them to Lisp lambdas. You can dynamically audit every single kernel allocation live!&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;&lt;br&gt;&lt;/h2&gt;&lt;h2&gt;5. The Bare-Metal Engine (Technical Specs)&lt;/h2&gt;&lt;p&gt;Beneath Gracie&#039;s elegant dress lies a meticulously crafted, 100% hand-crafted bare-metal engine:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Architecture:&lt;/strong&gt;&amp;nbsp;x86-64 Long Mode (AMD64). Legacy BIOS boot with a custom 2-stage MBR Bootloader.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Memory Management:&lt;/strong&gt;&amp;nbsp;4-level Paging (VMM) backed by a Bitmap-based PMM. Each MXE app thrives in its own isolated&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;0x100000000&lt;/code&gt;&amp;nbsp;virtual address space.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Storage:&lt;/strong&gt;&amp;nbsp;&lt;strong&gt;MinervaFS v3&lt;/strong&gt;—a log-structured, Copy-on-Write file system born from the ashes of ZFS.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Drivers:&lt;/strong&gt;&amp;nbsp;Custom, from-scratch implementations for AHCI, ATA PIO, NE2000 NIC, PS/2 Mouse/Keyboard, and a retro Sound Blaster 16 (SB16) audio driver.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;&lt;br&gt;&lt;/h2&gt;&lt;h2&gt;Acknowledgments &amp;amp; Inspirations&lt;/h2&gt;&lt;p&gt;MinervaOS didn&#039;t invent these ideas out of thin air. We proudly stand on the shoulders of the giants who dared to dream differently:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;David Gelernter&lt;/strong&gt;&amp;nbsp;(Yale, 1985) — Invented Tuple Space with his seminal paper&amp;nbsp;&lt;em&gt;Linda: A Coordination Language&lt;/em&gt;. His vision that &quot;networked computers can behave as one&quot; is the very soul of our Ether layer.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;John McCarthy&lt;/strong&gt;&amp;nbsp;(MIT, 1958) — Invented Lisp. The sole reason Gracie breathes.&amp;nbsp;&lt;code style=&quot;background-color: rgb(60, 60, 60); color: rgb(208, 208, 208);&quot;&gt;(car (cdr universe))&lt;/code&gt;&amp;nbsp;belongs entirely to him.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bryan Cantrill &amp;amp; Sun Microsystems&lt;/strong&gt;&amp;nbsp;— The brilliant minds behind DTrace and Kstat. Just as Gelernter believed in systems that coordinate seamlessly, Cantrill proved that &quot;a system you cannot observe is a system you cannot understand.&quot; Gtrace is our tribute to him.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Jeff Bonwick&lt;/strong&gt;&amp;nbsp;(Sun, 2001) — Reimagined storage with ZFS and Copy-on-Write. MinervaFS&#039;s checkpointing architecture is deeply indebted to his genius.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Edsger W. Dijkstra&lt;/strong&gt;&amp;nbsp;— The founding father of cooperative multitasking and &quot;programs as cooperating sequential processes.&quot; Gracie&#039;s Tea Room rules are his legacy.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;em&gt;&quot;Standing on the shoulders of giants — in a pink frilly dress.&quot; — Gracie, 2026&lt;/em&gt;&lt;/p&gt;&lt;h2&gt;&lt;br&gt;&lt;/h2&gt;&lt;h2&gt;Why Another Operating System?&lt;/h2&gt;&lt;p&gt;Because...&lt;/p&gt;&lt;p&gt;It&#039;s not that I dislike Linux.&lt;/p&gt;&lt;p&gt;It&#039;s not that I dislike Windows.&lt;/p&gt;&lt;p&gt;But...&lt;/p&gt;&lt;p&gt;I think computers are getting ruder.&lt;/p&gt;&lt;p&gt;Everything is an interrupt.&lt;/p&gt;&lt;p&gt;Everything is a scheduler.&lt;/p&gt;&lt;p&gt;Everything is a daemon.&lt;/p&gt;&lt;p&gt;Everything is a service.&lt;/p&gt;&lt;p&gt;I don&#039;t want my computer to yell at me.&lt;/p&gt;&lt;p&gt;I want to have tea with my computer.&lt;/p&gt;&lt;p&gt;&lt;em&gt;~ Gracie, 2026 ~&lt;/em&gt;&amp;nbsp;🌸&lt;/p&gt;</content>
        <category term="Architecture"/>
    </entry>
</feed>
