Why OpenHarmony is not classified as Linux-based despite having a subsystem base that includes Linux kernel as one of it's multiple kernels?
Let's explore why
OpenHarmony is often confused with being a Linux-based system because it can run Linux applications through a subsystem that includes a Linux kernel. However, OpenHarmony is fundamentally different from a typical Linux distribution. Let's break down why OpenHarmony is not classified as a Linux system despite having some Linux components:
1. Core Kernel Architecture
OpenHarmony's Main Kernel: The primary kernel of OpenHarmony is the LiteOS kernel, which is a lightweight, real-time operating system kernel which the OS itself is derived from former Huawei’s 2015 LiteOS open source lightweight Real-time operating system (RTOS). This kernel is distinct from the Linux kernel and is designed to be modular, scalable, and suitable for a wide range of devices, from small IoT gadgets to more complex smart devices.
Linux Kernel in OpenHarmony: While OpenHarmony can utilize a Linux kernel through a subsystem (typically for compatibility purposes), this is not its primary kernel which was also introduced in 1.1.0 with Long Term Support (LTS) development later in April 2021 after the initial version 1.0 in September 10, 2020 that only had LiteOS kernel for lightweight systems only. The subsystem acts more like a compatibility layer that allows OpenHarmony to run Linux applications for richer larger systems but does not make the core of OpenHarmony dependent on the Linux kernel.
2. Subsystem Integration
Linux Subsystem: OpenHarmony includes a Linux Subsystem, which is essentially a compatibility layer allowing it to run Linux-based applications. This subsystem leverages a version of the mainline original Linux kernel to execute these applications but operates within the broader framework of OpenHarmony.
Hybrid Nature: The inclusion of a Linux subsystem does not make the entire system Linux-based. It is similar to how Windows has a Windows Subsystem for Linux (WSL) that lets it run Linux applications without being a Linux OS.
3. System Architecture and Components
OpenHarmony Architecture: The architecture of OpenHarmony is designed to be versatile as a multi-layered OS and is divided into layers, including the Kernel Layer (which uses LiteOS as its primary kernel), System Service Layer, Framework Layer, and Application Layer. This architecture is different from that of a typical Linux distribution, which relies on the Linux kernel at its core.
Modular Design: OpenHarmony is highly modular and allows different kernels and components to be swapped or configured based on the needs of the device. This modularity is a key feature that differentiates it from traditional Linux systems that rely heavily on the Linux kernel.
4. Purpose and Target Use
OpenHarmony’s Goals: OpenHarmony is designed with a focus on the Internet of Things (IoT) and smart devices. Its core kernel, LiteOS, is optimized for performance, low power consumption, and real-time capabilities, which are essential for such applications.
Linux Systems: While Linux can be adapted for many different devices, including IoT, its traditional distributions are not specifically optimized for the diverse and often resource-constrained environments targeted by OpenHarmony.
5. Development and Ecosystem
Open Source and Community: OpenHarmony is part of the open-source HarmonyOS project, led by Huawei, and has a different development community and ecosystem compared to traditional Linux distributions.
Different Codebases: The core codebase of OpenHarmony's kernel (LiteOS) and the software layers built on top are distinct from those of Linux distributions.
Custom distros: Vendors can have their own custom kernels with custom system and app level with APIs and programming languages, for example, Huawei themselves have an OpenHarmony-based compatible, closed source distro of it’s transitional iterative version of HarmonyOS called HarmonyOS Next which will be the single framework of upcoming HarmonyOS 5.0 that has it’s own custom kernel.
Summary
In essence, OpenHarmony is not classified as a Linux system because its primary kernel is LiteOS, not the Linux kernel. The presence of a Linux subsystem is merely to provide compatibility and does not define the fundamental architecture or identity of OpenHarmony. Its design, purpose, and core components are different from those of a Linux distribution, aligning more with its goals of supporting a wide range of devices with a modular and scalable approach.
Further Reading
OpenHarmony Official Documentation
LiteOS Overview
Understanding Linux Subsystems
This distinction highlights how operating systems can incorporate elements from other systems for compatibility without being defined by those elements.