The prototype of the domestic OS Phantom based on Genode will be ready by the end of the year.

Dmitry Zavalishin discussed the project aimed at porting the Phantom operating system's virtual machine to work within the microkernel OS Genode environment. The interview highlights that the main version of Phantom is already ready for pilot projects, and the Genode-based version will be prepared for use by the end of the year. Meanwhile, the project's website currently only mentions a functioning conceptual prototype, the stability and functionality of which are not yet at a level suitable for industrial use, with immediate plans including the development of an alpha version that can be experimented with by third-party developers.

The project's code is distributed under the LGPL license, but the latest update in the main repository dates back to November 2019. Public activity related to the project is concentrated in the fork repository for Genode, which has been maintained since December 2020 by Anton Antonov, a student from Innopolis University.

The Phantom operating system has been developed as a personal project by Dmitry Zavalishin since the early 2000s and was moved under the wing of Digital Zone, a company established by Dmitry, in 2010. The system is notable for its focus on high reliability and its usage of the "everything is an object" concept instead of "everything is a file," allowing it to operate without files by preserving memory state and continuous operation cycles. Applications in Phantom do not terminate; instead, they are merely suspended and can resume from the point they were interrupted. All variables and data structures can be stored as long as required by the application without any special need for the programmer to manage data preservation.

Applications in Phantom are compiled into bytecode, which runs in a stack-based virtual machine similar to the Java Virtual Machine. The virtual machine ensures the persistence of application memory — the system periodically dumps snapshots of the virtual machine's state to permanent storage. After a shutdown or crash, work can continue from the last saved memory snapshot. Snapshots are created asynchronously without pausing the virtual machine's operation, but the snapshot captures a momentary freeze, as if the virtual machine was stopped, saved to disk, and then restarted.

All applications run in a shared global address space, which eliminates the need for context switches between the kernel and applications, and significantly simplifies and accelerates interaction among applications running in the virtual machine, which can exchange objects by passing references. Access separation is implemented at the object level, where references can only be obtained through the invocation of corresponding methods (pointer arithmetic is absent). Any data, including numerical values, is treated as separate objects.

To the application, work appears continuous and is independent of OS reboots, crashes, and computer shutdowns. The programming model for Phantom is compared to running never-ending server applications for an object-oriented programming language. Porting Java applications to Phantom is considered one of the main ways to develop applications, facilitated by the similarity of the Phantom virtual machine to the JVM. In addition to the bytecode compiler for Java, the project plans to create compilers for Python and C#, as well as implement a translator from intermediate code to WebAssembly.

To perform tasks that require high performance, such as video and audio processing, the ability to launch binary objects with native code in separate threads is provided (LLVM is used for compiling the binary objects). To access low-level kernel services, some VM classes ("internal" classes) are implemented at the OS kernel level. A POSIX layer is provided for running Linux applications, which emulates the calls necessary for Unix processes (persistence for applications in the POSIX layer is currently not supported).

The prototype of the domestic OS Phantom based on Genode will be ready by the end of the year.

The traditional Phantom OS not only includes a virtual machine but also features its own kernel with an implementation of threads, memory management, a garbage collector, synchronization mechanisms, an input/output system, and drivers for hardware interaction, which significantly complicates the project's readiness for widespread use. Components with a network stack, graphical subsystem, and user interface are developed separately. Notably, the graphical subsystem and window manager operate at the kernel level.

To enhance the project's stability, portability, and security, an attempt has been made to port the Phantom virtual machine to work with components of the open microkernel operating system Genode, which is developed under the supervision of the German company Genode Labs. A special build environment based on Docker has been prepared for those who wish to experiment with Phantom on the Genode platform.

Using Genode will allow the use of already proven microkernels and drivers, as well as move drivers into user space (currently, drivers are written in C and executed at the Phantom kernel level). This will also enable the use of the seL4 microkernel, which has undergone mathematical reliability verification, confirming that the implementation fully meets the specifications set in formal language. There is also consideration for preparing a similar reliability proof for the Phantom virtual machine, allowing for the verification of the entire OS environment.

The primary application area of the Genode-based port is the development of applications for various industrial and embedded devices. Currently, a set of changes has been prepared for the virtual machine, and wrappers that operate over Genode have been added to ensure the persistence of core components and key low-level interfaces. It is noted that the virtual machine Phantom can already operate in a 64-bit environment of Genode, but implementing VM operation in persistence mode, reworking the driver subsystem, and adapting network stack and graphical subsystem components for Genode are still pending.

The prototype of the domestic OS Phantom based on Genode will be ready by the end of the year.
The prototype of the domestic OS Phantom based on Genode will be ready by the end of the year.
The prototype of the domestic OS Phantom based on Genode will be ready by the end of the year.


Source: opennet.ru
Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster