Handbook

Architecture

What every subsystem does, why it thinks in threes, and how the hosted Linux build maps to the same semantics.

thatteOS is a microkernel for a balanced ternary computing fabric. Addresses are trits, privilege is one trit deep, and “permission AND request” collapses to a single hardware gate (TMIN2). In hosted mode the same ManiT source runs as a native Linux process.

Big picture

userspace (any license — syscall note)
      │  syscalls / IPC
┌─────┴──────────────────────────────────┐
│ syscall dispatcher                     │
│ kernel/  schedule, process, privilege  │
│ mm/      frames, trit-trie page tables │
│ fs/      TritFS                        │
│ ipc/     messages, pipes, trit streams │
│ security/ capabilities, photon caps    │
│ drivers/ tty                           │
└────────────────────────────────────────┘

Three-ring privilege

Privilege is a single trit: +1 kernel, 0 service, −1 user. Access is not a comparison routine — it is the ternary minimum:

access = TMIN2(privilege, request)

A user privilege can never produce kernel access by algebra, not by an accidental code path.

Virtual memory

Balanced ternary addresses translate through trit-trie page tables — branching factor 3, one trit consumed per level — with per-address privilege checks.

TritFS

Inodes, file descriptors, and permissions expressed in ternary rings rather than binary rwx triplets. The hosted shell’s ls, cat, and friends walk this filesystem.

IPC

  • Messages — microkernel send/recv queues
  • Pipes — unnamed byte streams
  • Trit streams — zero-copy channels modeled on physical bus lines: the sender’s output current is the receiver’s input

Capabilities

Nine-trit capability words with attenuation (weaken, never strengthen). On real hardware, photon-schedule capabilities make possession of a delivery schedule the permission itself; the emulator models wavelengths as abstract channel IDs.

Syscalls

The dispatcher and handlers are the boundary the syscall note refers to: normal use of the ABI does not pull userspace under AGPL.

Boot (hosted)

thatteos.mt initialises memory, interrupts, timer, TritFS, IPC, and security; starts init; drops privilege; hands you the shell. build.sh compiles via maniTC’s LLVM backend.

Deep source map: docs/ARCHITECTURE.md in the OSS tree. Language and ISA refs live with maniTC.