Platform-agnostic operating system building blocks in Rust.
Plan is a set of operating system building blocks, focusing on correctness, efficiency and maintainability. It contains practical and common modules to facilitate the construction of operating systems, but can also be used for other infrastructure software where fallible allocation is required, such as databases.
Our primary goal is to provide a correct library. When we talk about the correctness of a system, we are actually discussing both of safety and liveness. With the help of Rust's ownership model, safety can be guaranteed by carefully reasoning about unsafe code. Undefined behavior is forbidden in Plan. As for liveness, Plan is required to be starvation-free. Any operation in Plan must return in bounded time if called properly and all the hardwares involved work normally. Note that starvation-free implies panic-free, so even panic is not allowed.
Besides, efficiency and maintainability are taken into account due to the characteristic of infrastructure software.
Other objectives include
- Less is more, salute to minimalism.
- The ability to compatible with POSIX.
And the following ones are intentionally listed for non-goals.
- Not ISA or SoC specific, as the name suggests.
- No need to compatible with other file systems.
- No network socket, network must be abstract as file system or device.
- Memory management
- Multi buddy system
- Cached allocator
- Customized data structures with allocator to support multi-tenant
- Scheduler and synchronization primitives
- Fair-share scheduling by DWRR[1] algorithm
- Fixed priority pre-emptive scheduling for real-time systems
- Mutex/Condvar/Rwlock
- Timer
- RT-Mutex
- Core structures and isolation
- VFS layer supporting namespace
- Virtual memory with on-demand paging
- Pager daemon
- Device drivers and file systems
- Transaction service with serializable isolation
- Log layer
- Transaction-safe FAT32
- Root/block/pipe device
- Get directory entry
- Temporary file system
- More FS
This project is still under heavy development.
[1] Li, Tong, Dan Baumberger, and Scott Hahn. "Efficient and scalable multiprocessor fair scheduling using distributed weighted round-robin." ACM Sigplan Notices 44.4 (2009): 65-74.