Nothing Special   »   [go: up one dir, main page]

Jump to content

HarmonyOS kernel

Page semi-protected
From Wikipedia, the free encyclopedia

HongMeng Kernel
DeveloperHuawei
Written inC
OS familyOpenHarmony
Working stateCurrent
Source modelClosed, with open source components
Initial releaseAugust 4, 2023; 16 months ago (2023-08-04)
Latest release1.9.3.B010 / October 23, 2024; 45 days ago (2024-10-23)
PlatformsCurrent: ARM64
Kernel typeMicrokernel
LicenseCommercial software, Proprietary software except for open-source components
Preceded byOpenHarmony 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 5 version of the proprietary HarmonyOS distributed 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 NEXT Architecture

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) with support for OpenHarmony and AOSP complex framework hardware migration deployments, 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 with real time capabilities functions.[3][4]

As of October 23, 2024, HarmonyOS kernel runs on ARM64 devices on HarmonyOS 5.0.0 Release (Beta) version with current version 1.9.3.B010.[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. The core of the kernel is written primarily in a confined subset of C language. It includes, Application framework and ability framework, supporting multiple programming languages (e.g., C, C++, JS, ArkTS, Cangjie), 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]

The kernel features Address tokens that connects the Access token manager that is an essential component in OpenHarmony-based distributed operating systems, responsible for unified app permission management based on access tokens. Access tokens serve as identifiers for apps, containing information such as app ID, user ID, app privilege level (APL), and app permissions. By default, apps can access limited system resources. ATM ensures controlled access to sensitive functionalities which combines both RBAC and CBAC models as a hybrid ACL model.[7][8]

See also

Further reading

  • Haibo, Chen Huawei Central Software Institute and Shanghai Jiao Tong University (21 June 2024), Microkernel Goes General:

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

References

  1. ^ Wu, Jessie (June 24, 2024). "Huawei's HarmonyOS NEXT breaks away from Android". TechNode. Retrieved July 8, 2024.
  2. ^ Matsui, Emiko (January 19, 2024). "HarmonyOS NEXT is a true operating system with self-developed components: Huawei CEO". Huawei Central. Retrieved July 8, 2024.
  3. ^ GOSIM Foundation (May 31, 2024). GOSIM 2024 Europe APP & WEB Jonathan Schwender: OpenHarmony for Next Gen Mobile. Retrieved July 8, 2024 – via YouTube.
  4. ^ "Building on OpenHarmony: Navigating its Architecture and App Development Framework | HackerNoon". hackernoon.com. Retrieved July 8, 2024.
  5. ^ Nick (April 16, 2024). "HarmonyOS NEXT leak exposes the in-house kernel in the native HDC toolchain". HarmonyOSHub. Retrieved July 8, 2024.
  6. ^ "docs/en/OpenHarmony-Overview.md at master · openharmony/docs". GitHub. Retrieved July 8, 2024.
  7. ^ USENIX (September 12, 2024). OSDI '24 - Microkernel Goes General: Performance and Compatibility in the HongMeng Production... Retrieved October 26, 2024 – via YouTube.
  8. ^ "docs/en/application-dev/security/accesstoken-overview.md at master · openharmony/docs". GitHub. Retrieved October 26, 2024.
  9. ^ 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 (July 10, 2024). "Microkernel Goes General: Performance and Compatibility in the HongMeng Production Microkernel" (PDF). This Paper is Included in the Proceedings of the 18th USENIX Symposium on Operating Systems Design and Implementation. Retrieved July 10, 2024.;