1. Server Architecture Overview
All SexOS servers share a common architecture:
- no_std Rust: No standard library. All servers compile against
x86_64-unknown-none.
- PDX Entry Point: Servers register a PDX listener slot and park on
pdx_listen_raw().
- Event Loop:
loop { let msg = pdx_listen_raw(slot); handle(msg); }
- PKU Isolation: Each server runs in its own PKEY domain. No cross-domain memory access without explicit
PageHandover.
- FLSCHED Park: All servers use
libsys::sched::park_on_ring() for wait-free event polling.
2. sexdisplay — Compositor & Display Server
| Property | Value |
| PKEY | 1 (trusted display domain) |
| Role | Framebuffer owner, SexCompositor host, scanout engine |
| Key Type | SexWindowCreateParams, SilkbarRegisterParams |
| IPC | PDX calls for window creation, frame commit, view switching |
SexCompositor Design
- Minimal,
no_std, zero-copy PDX-native compositor
- Window state with dynamic advanced tiling (Master/Stack/V/H, ratios, gaps)
- Window decorations/borders
- Frame commit via
pdx_call handing PFN lists directly to kernel MMIO/scanout
- Input forwarding: sexdisplay forwards sexinput HID events to focused PD
3. silk-shell — Window Manager & Desktop Shell
| Property | Value |
| Role | Main user-facing desktop process |
| Key Features | HID event dequeuing, FB layout queries, workspace switching, window move/resize |
| App Launching | Via sex-ld dynamic linker |
| Property | Value |
| Role | PS/2 keyboard + mouse driver, HID event source |
| Output | PDX ring buffer → sexdisplay → focused PD |
| Scancode Decoding | Full PS/2 scancode set 2 → HID event translation |
5. sexfiles — Virtual Filesystem Server
| Property | Value |
| Role | Unified VFS with multi-backend support |
| Backends | Ext4, Btrfs, FAT32, NTFS, ramfs |
| IPC | PDX-based VFS operations; block I/O dispatch to sexdrive |
| Cache | Lock-free 2Q LRU cache with shared physical pages |
| Architecture | 100% lock-free trampoline polling loop, 3-cycle PKU handover for large I/O |
6. sexdrive — NVMe / AHCI Storage Driver
| Property | Value |
| Role | Production-grade NVMe/AHCI block I/O |
| Transfer | Zero-copy DMA via Lent-Memory capabilities |
| Interrupts | MSI-X routing to driver SPSC rings |
| PCI | PciCapData resolution for BAR discovery |
7. sexshop — Object & Package Store
| Property | Value |
| Role | Backend package index, metadata, signing, mirror sync, secure download daemon |
| Client | sex-hub — GUI app store front-end (native Silk app) |
| IPC | PDX communication between sex-hub and sexshop (zero-copy) |
8. sexnet — Network Manager
| Property | Value |
| Role | User-space TCP/IP stack with WireGuard support |
| PDX Calls | SEXNET_GET_STATUS, SEXNET_SCAN_WIFI |
| Transfer | Zero-copy packet transfer via lent-memory |
9. sexnode — Cluster Node & Translator
| Property | Value |
| Role | Translator discovery, on-the-fly ELF→Sex binary translation, distributed node discovery |
| Key Feature | Linux driver hot-plug translation via DDE-style wrappers |
| Revocation | RevokeKey Multicast — hardware-accelerated capability revocation across sexnode |
10. sex-ld — Dynamic Linker
| Property | Value |
| Role | Dynamic ELF linking for SexOS userland applications |
| Usage | App launching from silk-shell: sex-ld /path/to/app.elf |