Show HN: I wrote a from-scratch OS to serve my blog
8 months ago
- #operating-system
- #web-server
- #networking
- Tatix is a custom kernel designed for serving static web pages, featuring a custom TCP/IP stack, HTTP server, RAM file system, and cooperative task scheduling.
- Development and testing occur in a QEMU virtual environment on Linux, requiring standard tools like GNU Make, NASM, GCC, and Python 3.
- Tatix can serve web pages globally via HTTP, needing only a Linux host with virtualization support and a public IP address.
- The system includes a bootloader with two stages, transitioning from BIOS to 64-bit long mode with paging for kernel initialization.
- A cooperative scheduler manages tasks, including network packet handling, TCP retransmissions, and web server operations, without needing locks due to single-core execution.
- The TCP subsystem is complex, adhering to RFC standards for state management, data transmission, and retransmission with dynamic timeout adjustments.
- Memory management uses pool allocators for efficient handling of connection structures and data buffers, minimizing fragmentation.
- A RAM file system (ramfs) organizes web content in a tree structure, with nodes for directories and files, using allocators for dynamic memory management.