Vivo has opened the source code for the BlueOS kernel, written in Rust

Vivo, which holds about 10% of the global smartphone market (5th place among smartphone manufacturers), has introduced the first official open release of its BlueOS (Blue River OS) operating system kernel. BlueOS has been in development since 2018 and is already used in the Vivo Watch series of smartwatches. Vivo is also working on applying BlueOS in smart glasses, robots, smart terminals, and consumer AI devices. The kernel code is written in Rust and is open under the Apache 2.0 license. System frameworks for BlueOS are also written in Rust.

The BlueOS operating system is initially developed with a focus on security and uses the Rust programming language to prevent vulnerabilities caused by memory management errors, which, according to statistics from Google and Microsoft, account for 70% of all vulnerabilities in operating systems. To ensure safe memory management, BlueOS utilizes a combination of smart pointers at runtime and compile-time checks provided by Rust (object ownership tracking, variable borrowing checks, and lifetime tracking of objects).

The BlueOS (Blue River Kernel) is optimized for minimal resource consumption and can be used on embedded platforms, mobile devices, and Internet of Things systems. In its minimal configuration, the kernel requires only 13 KB of RAM to operate. It supports modern processor architectures, including ARM and RISC-V. A standard C library, supporting interfaces defined by the POSIX standard, is implemented on top of the kernel, as well as the rust-std library.

The kernel provides a task scheduler, file system, memory management mechanism, network stack, and a set of drivers. It supports several task scheduling algorithms, including those for evenly distributing time quanta among processes and real-time scheduling algorithms based on priority calculations. There are multiple memory allocation algorithms available, optimized for different usage scenarios.

A proprietary file system is provided with a classic hierarchical architecture based on inode, as well as file systems like tmpfs, devfs, sysfs, procfs, nfs, and fat32. The TCP/IP stack supports the POSIX Socket API, socketfd, and data processing in both blocking and non-blocking modes, and can be used in configurations with multiple network cards. To reduce overhead during data transmission, a zero-copy architecture is applied, eliminating intermediate buffering.

For driver development, there is a layer for abstracting access to hardware, allowing for the creation of drivers in Rust as well as the porting of drivers written in C for other kernels. The kernel documentation is currently limited to instructions for building and testing, along with tips for implementing your own system calls and descriptions of basic data types. For testing, it is recommended to use QEMU (mps2-an385, mps3-an547, virt-aarch64, virt-riscv64) or the Raspberry Pi Pico2 board.

Source: opennet.ru

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