Adrian Lita
VARTOS Operating System
Key Highlights
- Bare-metal OS
- Optimized HTTP server
- REST processor
Overview
Complete server operating system implementation from bare-metal, featuring a highly optimized HTTP server and REST processor designed for maximum performance and minimal resource usage. Built entirely in C for direct hardware access and optimal efficiency, the system provides fundamental OS services including memory management, process scheduling, and I/O while maintaining a small footprint suitable for embedded server applications.
Technical Details
The OS is implemented in C with inline assembly for critical sections. Boot sequence uses custom bootloader, initializes protected mode, sets up GDT/IDT, and transfers control to kernel main. Memory management implements buddy allocator for physical memory and slab allocator for kernel objects. Virtual memory uses 4KB pages with demand paging. Process scheduler implements priority-based preemptive multitasking with O(1) scheduling complexity. HTTP server uses epoll for async I/O, achieving 50K+ requests/second on modest hardware. Zero-copy techniques minimize data movement. Custom JSON parser optimized for speed and low memory usage. REST routing uses trie structure for O(log n) endpoint matching.
Challenges Overcome
- • Implementing virtual memory management without bugs (wrong MM code crashes unpredictably)
- • Achieving high HTTP performance while maintaining HTTP/1.1 compliance
- • Debugging bare-metal code (no printf, no debugger, just serial console)
- • Managing complexity of concurrent request processing without race conditions
- • Optimizing for both throughput and latency under varying loads
- • Implementing secure HTTP parsing resistant to attacks
- • Balancing code size with performance (limited flash memory)
Outcomes & Impact
- ✓ Boot time under 1 second from power-on to serving requests
- ✓ HTTP server performance exceeding nginx on same hardware for target workload
- ✓ Memory footprint 10x smaller than Linux for equivalent functionality
- ✓ Deterministic behavior suitable for embedded applications
- ✓ Custom OS allowed optimization impossible with general-purpose systems
- ✓ Proof-of-concept demonstrated viability for commercial embedded server products