The Moss project develops a Linux-compatible kernel in Rust

After 8 months of development, the first prototype of the Unix-like Moss kernel, partially compatible with Linux, has been released. The code is written in Rust with assembly inserts and is distributed under the MIT license. Currently, the project supports only the Aarch64 architecture, can run in QEMU, and has been tested on Raspberry Pi 4, Jetson Nano, AMD Kria, and imx8 boards. According to the developers, the kernel can be easily ported to other architectures such as x86_64 and RISC-V, thanks to a hardware abstraction layer.

At this stage of development, Moss has implemented 51 Linux system calls and provides binary compatibility with Linux applications, sufficient for running the Bash shell and most utilities from the BusyBox set. Notably, the Moss architecture utilizes an async/await model to ensure asynchronous execution of kernel components, eliminating major classes of deadlocks. All non-trivial system calls are implemented as asynchronously executed functions.

Main Features:

  • A memory management system supporting memory pages in Copy-on-Write (CoW) mode, memory page tables, asynchronous memory copy functions between the kernel and user space, and exception handling (page fault) on both the kernel and user space sides.
  • A process management system with a task scheduler and support for task migration through inter-processor interrupts (IPI). Support for process branching via the clone() call. Capabilities for sending signals to processes and threads.
  • An asynchronously operating VFS (Virtual File System) layer, a Ramdisk block device, a FAT32 driver, and a devtmpfs device.
  • The core functionality has been extracted into the libkernel library, which is not tied to hardware architectures.
  • A HAL (Hardware Abstraction Layer) to enable hardware support.
  • A test suite containing over 230 tests.

Significant limitations include the absence of a networking subsystem and the presence of only a trimmed-down file system driver that supports the FAT32 file system in read-only mode. Among the top priorities are continuing the implementation of Linux system calls, creating a TCP/IP stack, supporting load balancing in the task scheduler, and providing a full driver for the file system (ext2/4).

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster