HarmonyOS kernel explained

HongMeng Kernel
Developer:Huawei
Family:OpenHarmony
Working State:Current
Source Model:Closed, with open source components
Latest Preview Version:1.9.0.B100
Programmed In:C, C++, Cangjie, Rust
Supported Platforms:Current: ARM64
Kernel Type:Microkernel
License:Commercial software, Proprietary software except for open-source components
Preceded By:OpenHarmony ChCore (Monolithic) kernel, LiteOS (RTOS) kernel

HarmonyOS Kernel (HongMeng Kernel), sometimes referred to as the Harmony kernel, is a computer operating system (OS) kernel developed by Huawei since August 2023. It is used in the HarmonyOS NEXT version of the proprietary HarmonyOS operating system, replacing previous versions that utilized the AOSP compatibility layer, the Linux kernel, and the LiteOS kernel.[1] [2]

The HarmonyOS Kernel utilizes a microkernel architecture, which aims to improve security and performance by isolating critical components of the system.

Kernel design

HarmonyOS kernel is a microkernel at rich executed environment level for software outside hardware-based HarmonyOS TEE kernel, called tee_OS, enabling greater modularity and larger portions of the OS to benefit from memory protection at kernel mode. While retaining the speed of monolithic mainline Linux kernel compatibility subsystem of modular OpenHarmony standard system within its kernel abstraction layer as compatibility layer with POSIX APIs and third-party musl-libc integrated support for bigger advanced devices for some critical tasks at user mode of HarmonyOS operating system commercial distro. The kernel has Linux ABI compatibility by placing an ABI-compatible shim in IC0 (kernel space), which redirects Linux system calls to IPC and serves as a central repository for global state. The kernel also reuses Linux drivers through driver containers, which balances between compatibility and critical path performance, while having control plane and data plane separation to improve performance. HarmonyOS kernel capabilities in context switching, network, application startup time, load, frame loss, interrupt latency, etc., and also performance optimised in smart routers and smart vehicles.[3] [4]

, HarmonyOS kernel runs on ARM64 devices on Developer Beta 1 version with current version 1.9.0.B100.[5]

HarmonyOS kernel offers core capabilities and security benefits to the upper layers, including process and thread management, memory management, file system management, network management and Peripheral management. Alongside, HarmonyOS kernel, the integrated Hardware Driver Foundation (HDF) underpins an open hardware ecosystem for HarmonyOS. It standardizes peripheral device access and streamlines I/O driver development and management. Other layers of the multi-layered operating system of OpenHarmony-based HarmonyOS that sits on top of HarmonyOS kernel includes the middle System Service Layer where the system service layer provides essential services enabling the framework layer to support application functionalities. It consists of several subsystems such as the Basic System Capability Subsystem set ensures seamless distributed operation across OpenHarmony devices by handling, Distributed app execution, Scheduling and migration, Core capabilities like Distributed Soft Bus (DSoftBus) around the Distributed Virtual framework across devices with distributed data management, Distributed Scheduler, Utilities, multimodal input, graphics, security, and AI. Also, Basic Software Service Subsystem Set: These subsystems offer universal software services such as for Common events and notifications, Telephony services, Multimedia handling and Design For X (DFX). Then, Enhanced Software Service Subsystem Set where these subsystems deliver specialized software services tailored for various device types, including Smart TVs, Wearables, IoT devices, personal computers, smartphones, smart car displays and other types of devices. Hardware Service Subsystem set provides hardware-related services such as, Location services, Identity and Access Management (IAM) and Services specific to wearables and IoT devices. These subsystems within the basic software, enhanced software, and hardware service sets can be adapted and extended to fit the deployment scenarios of different device forms. The framework layer equips developers with tools to create HarmonyOS applications. It includes, Application framework and ability framework, supporting multiple programming languages (e.g., C, C++, JS), ArkUI framework for user interface development, Multi-language APIs for integrating hardware and software services. These APIs can be customized to meet the requirements of different system components and devices. This upper level layer houses both system and third-party applications. Each native HarmonyOS HAP app that are interoperability with OpenHarmony user mode, utilizes one or more types of abilities: such as Feature Abilities (FAs) Provide user interfaces for interactive functionalities and Particle Abilities (PAs): Operate without a user interface, focusing on background processes and data access. Applications leveraging FAs and PAs offer distinct service features and enable cross-device scheduling and distribution, ensuring a consistent and efficient user experience.[6]

See also

Further reading

Performance and Compatibility in the HongMeng Production Microkernel from the original on June 21, 2024. Retrieved July 10, 2024. [7]

External links

Notes and References

  1. Web site: Wu . Jessie . 2024-06-24 . Huawei's HarmonyOS NEXT breaks away from Android . 2024-07-08 . TechNode . en-US.
  2. Web site: Matsui . Emiko . 2024-01-19 . HarmonyOS NEXT is a true operating system with self-developed components: Huawei CEO . 2024-07-08 . Huawei Central . en-US.
  3. GOSIM 2024 Europe APP & WEB Jonathan Schwender: OpenHarmony for Next Gen Mobile . 2024-05-31 . GOSIM Foundation . 2024-07-08 . YouTube.
  4. Web site: Building on OpenHarmony: Navigating its Architecture and App Development Framework HackerNoon . 2024-07-08 . hackernoon.com . en.
  5. Web site: Nick . 2024-04-16 . HarmonyOS NEXT leak exposes the in-house kernel in the native HDC toolchain . 2024-07-08 . HarmonyOSHub . en-GB.
  6. Web site: docs/en/OpenHarmony-Overview.md at master · openharmony/docs . 2024-07-08 . GitHub . en.
  7. Swett C . Jr . Jia . Ning . Wang . Nan . Li . Yu . Liu . Nian . Liu . Yutao . Wang . Fei . Huang . Qiang . Li . Kun . Yang . Hongyang . Wang . Hui . Yin . Jie . Peng . Yu . Xu . Fengwei . Microkernel Goes General: Performance and Compatibility in the HongMeng Production Microkernel . This Paper is Included in the Proceedings of the 18th USENIX Symposium on Operating Systems Design and Implementation. . 10 July 2024 . 10 July 2024.