Hongmeng OS architecture and key technologies

1. Overall introduction of Hongmeng OS

Introduction to HarmonyOS

Original author: xiangzhihong8
Two days ago, Huawei released HarmonyOS 2.0. I also followed the trend and gave you a brief introduction to HarmonyOS.
Definition
First, let's take a look at the official definition of HarmonyOS. According to the official definition, HarmonyOS is a "future-oriented" distributed operating system for all scenarios (mobile office, sports and health, social communication, media entertainment, etc.). On the basis of traditional single-device system capabilities, HarmonyOS proposes a distributed concept based on the same set of system capabilities and adapting to multiple terminal forms, which can support the capabilities of multiple terminal devices.
For consumers, HarmonyOS can integrate the capabilities of various terminals in life scenarios to form a "super virtual terminal", which can realize fast connection, mutual assistance and resource sharing between different terminal devices, and match suitable devices , Provide a smooth full-scene experience.
For application developers, HarmonyOS adopts a variety of distributed technologies, so that the development and implementation of applications has nothing to do with the differences in the form of different terminal devices, reducing the difficulty and cost of development. This allows developers to focus on upper-level business logic and develop applications more conveniently and efficiently.
For device developers, HarmonyOS adopts a component-based design scheme, which can be flexibly tailored according to the resource capabilities and business characteristics of the device to meet the operating system requirements of different types of terminal devices.
Technical features
Hardware mutual assistance, resource sharing
1, distributed soft bus
Distributed soft bus is a unified base for various terminal devices, which provides a unified distributed communication capability for the interconnection and intercommunication between devices, and can quickly discover and connect devices. To efficiently distribute tasks and transmit data, the schematic diagram of the distributed soft bus is shown in the figure below.

insert image description here

2. Distributed device virtualization
The distributed device virtualization platform can realize resource integration, device management, and data processing of different devices, and multiple devices together form a super virtual terminal. For different types of tasks, match and select execution hardware with appropriate capabilities for users, so that business can continuously flow between different devices, and give full play to the resource advantages of different devices. The schematic diagram of distributed device virtualization is shown in the figure below.
insert image description here

3. Distributed data management
Distributed data management is based on the ability of distributed soft bus to realize distributed management of application program data and user data. User data is no longer bound to a single physical device, business logic is separated from data storage, and data is seamlessly connected when applications run across devices, creating basic conditions for creating a consistent and smooth user experience. The schematic diagram of distributed data management is shown in the figure below.
insert image description here

4. Distributed task scheduling
Distributed task scheduling is based on technical features such as distributed soft bus, distributed data management, and distributed Profile, and builds a unified distributed service management (discovery, synchronization, registration, and call) mechanism to support cross-device It can perform operations such as remote startup, remote invocation, remote connection, and migration of applications, and can select appropriate devices to run distributed tasks according to the capabilities, locations, business operation status, resource usage, and user habits and intentions of different devices. The application migration in the following figure is taken as an example to briefly demonstrate the distributed task scheduling capability.
insert image description here

One-time development, multi-device deployment
HarmonyOS provides a user program framework, Ability framework, and UI framework, and supports the reuse of business logic and interface logic of multiple terminals during the application development process, enabling one-time development of applications and multi-device deployment, which improves cross-device applications development efficiency. The schematic diagram of one-time development and multi-terminal deployment is shown in the figure below.
insert image description here

Unified OS, flexible deployment
HarmonyOS supports on-demand flexible deployment of various terminal devices through componentization and miniaturization design methods, and can adapt to different types of hardware resources and functional requirements. It supports the automatic generation of componentized dependencies through the compilation chain relationship, forms a component tree dependency graph, supports the convenient development of product systems, and lowers the development threshold of hardware devices.
Support the selection of each component (components are optional): According to the shape and requirements of the hardware, the required components can be selected.
Support the configuration of function sets in components (components can be large or small): according to hardware resource conditions and functional requirements, you can choose to configure the function sets in components. For example, choose to configure some of the controls in the Graphics Framework component.
Support the association of dependencies between components (the platform can be large or small): according to the compilation chain relationship, componentized dependencies can be automatically generated. For example, selecting a graphics framework component will automatically select dependent graphics engine components, etc.
The technical architecture
of HarmonyOS follows the layered design as a whole, from bottom to top: kernel layer, system service layer, framework layer, and application layer. The system functions are expanded step by step according to "system > subsystem > function/module". In the multi-device deployment scenario, some non-essential subsystems or functions/modules can be tailored according to actual needs. The technical architecture of HarmonyOS is shown in the figure below.
insert image description here

The kernel layer
HarmonyOS system is divided into a kernel subsystem and a driver subsystem.
Kernel subsystem: HarmonyOS adopts a multi-kernel design, which supports the selection of suitable OS kernels for different resource-constrained devices. Kernel Abstract Layer (KAL, KernelAbstract Layer) provides basic kernel capabilities to the upper layer by shielding multi-core differences, including process/thread management, memory management, file system, network management, and peripheral management.
Driver subsystem: HarmonyOS driver framework (HDF) is the foundation of HarmonyOS hardware ecological openness, providing unified peripheral access capability and driver development and management framework.
System service layer
The system service layer is the core capability collection of HarmonyOS, which provides services to applications through the framework layer. This layer consists of the following parts:
System Basic Capability Subsystem Set: Provides basic capabilities for the operation, scheduling, and migration of distributed applications on HarmonyOS multi-device. It consists of distributed soft bus, distributed data management, distributed It consists of subsystems such as task scheduling, Ark multilingual runtime, public base library, multi-mode input, graphics, security, and AI. Among them, the Ark runtime provides C/C++/JS multi-language runtime and basic system class libraries, and also provides Runtime.
Basic software service subsystem set: provides public and general software services for HarmonyOS, consisting of subsystems such as event notification, telephone, multimedia, DFX, MSDP&DV, etc.
Enhanced software service subsystem set: Provide HarmonyOS with differentiated capability-enhanced software services for different devices, consisting of subsystems such as smart screen dedicated services, wearable dedicated services, and IoT dedicated services.
Hardware service subsystem set: provides hardware services for HarmonyOS, and is composed of subsystems such as location services, biometric identification, wearable hardware services, and IoT proprietary hardware services.
According to the deployment environment of different equipment forms, the interior of the basic software service subsystem set, enhanced software service subsystem set, and hardware service subsystem set can be tailored according to the granularity of the subsystem, and the interior of each subsystem can be tailored according to the granularity of the function.
Framework layer
The framework layer provides HarmonyOS applications with multilingual user program frameworks such as Java/C/C++/JS and Ability frameworks, as well as multilingual framework APIs open to the public for various software and hardware services; at the same time, it provides C/C++/JS and other multi-language framework APIs are supported. The APIs supported by different devices are related to the degree of system componentization and tailoring.
Application layer
The application layer includes system applications and third-party non-system applications. HarmonyOS applications consist of one or more FA (Feature Ability) or PA (Particle Ability). Among them, FA has a UI interface, which provides the ability to interact with users; while PA has no UI interface, which provides the ability to run tasks in the background and a unified data access abstraction. Applications developed based on FA/PA can realize specific business functions, support cross-device scheduling and distribution, and provide users with a consistent and efficient application experience.
System Security
On distributed terminals equipped with HarmonyOS, it can be guaranteed that "the right people use the right data through the right equipment".
The "right person" is guaranteed through "distributed multi-terminal collaborative identity authentication".
Ensure "correct equipment" by "building a trusted operating environment on distributed terminals".
Through "distributed data in the process of cross-terminal flow, classification and hierarchical management of data" to ensure "correct use of data".
Correct Devices
In the distributed terminal scenario, only by ensuring that the devices used by users are safe and reliable can user data be effectively protected on virtual terminals and user privacy leaks can be avoided.
Secure Boot ensures that the system firmware and applications running on each virtual device at the source are intact and untampered. Through secure boot, the image packages of various device manufacturers are not easy to be illegally replaced with malicious programs, thereby protecting user data and privacy.
The Trusted Execution Environment provides a hardware-based Trusted Execution Environment (TEE, Trusted Execution Environment) to protect the storage and processing of users' personal sensitive data and ensure that data is not leaked. Due to the different security capabilities of distributed terminal hardware, it is necessary to use high-security equipment for storage and processing of users' sensitive personal data. HarmonyOS uses a mathematically provable formally developed and verified TEE microkernel, which has achieved a certification rating of CC EAL5+ for commercial OS kernels.
Device certificate authentication supports presetting device certificates for devices with a trusted execution environment to prove their security capabilities to other virtual terminals. For devices with a TEE environment, the pre-installed PKI (Public Key Infrastructure) device certificate provides proof of device identity to ensure that the device is legally manufactured. The device certificate is preset on the production line, and the private key of the device certificate is written and safely stored in the TEE environment of the device, and is only used in the TEE. When the user's sensitive data (such as keys, encrypted biometrics, etc.) must be transmitted, a secure channel will be established from the TEE of one device to the TEE of another device after the device certificate is used for security environment verification. Realize secure transmission, as shown in the figure below.
insert image description here

Use data correctly
In the distributed terminal scenario, it is necessary to ensure that users can use data correctly. HarmonyOS protects the entire life cycle of data generation, storage, use, transmission, and destruction, so as to ensure that personal data and privacy, as well as system confidential data (such as keys) are not leaked.
Data generation: According to the laws, regulations and standards of the country or organization where the data is located, the data is classified and graded, and the corresponding protection level is set according to the classification. The data of each protection level needs to provide different strengths of security protection according to the corresponding security policy in the entire life cycle of storage, use, and transmission from the beginning of generation. The access control system of the virtual hyperterminal supports access control policies based on labels, ensuring that data can only be stored, used and transmitted between virtual terminals that can provide sufficient security protection.
Data storage: HarmonyOS protects the data by distinguishing the security level of the data and storing them in partitions with different security protection capabilities, and provides the seamless flow of cross-device keys in the whole life cycle and cross-device key access control capabilities to support distribution Collaborative identity authentication, distributed data sharing and other services.
Data usage: HarmonyOS provides a trusted execution environment for devices through hardware. The user's personal sensitive data is only used in the trusted execution environment of the distributed virtual terminal to ensure the security and privacy of user data.
Data transmission: In order to ensure the safe transfer of data between virtual hyperterminals, each device needs to be correct and trustworthy, and a trust relationship has been established (multiple devices establish a pairing relationship through a HUAWEI ID), and after verifying the trust relationship, a secure The connection channel, according to the rules of data flow, transmits data securely. When communicating between devices, it is necessary to authenticate the devices based on their identity credentials, and on this basis, establish a secure encrypted transmission channel.
Data Destruction: Destroying the key means destroying the data. The storage of data in the virtual terminal is based on the key. When destroying data, only the corresponding key needs to be destroyed to complete the data destruction.

2. Subsystem architecture

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

3. Key technologies

Four major technical features of Huawei Hongmeng OS
  The original design of Hongmeng OS is to meet the high-standard connection requirements of the full-scenario smart experience. For this reason, Huawei has proposed a system solution with four major characteristics.

  1. For the first time, the distributed architecture is used in the terminal OS to achieve seamless cross-terminal collaborative experience
      The "distributed OS architecture" and "distributed soft bus technology" of Hongmeng OS through the public communication platform, distributed data management, distributed capacity scheduling and virtual The four peripheral capabilities shield the application developers from the difficulty of implementing the underlying technology of the corresponding distributed applications, enabling developers to focus on their own business logic, developing cross-terminal distributed applications like developing the same terminal, and enabling end consumers to enjoy Powerful cross-terminal business collaboration capabilities bring seamless experience to various usage scenarios.
  2. Deterministic delay engine and high-performance IPC technology to achieve natural smoothness of the system.
      Hongmeng OS solves the problem of insufficient performance of existing systems by using two major technologies of deterministic delay engine and high-performance IPC. Determining the delay engine can assign the task execution priority and time limit in the system before the task is executed for scheduling processing. Task resources with high priority will be guaranteed to be scheduled first, and the application response delay will be reduced by 25.7%. The compact structure of the Hongmeng microkernel greatly improves the performance of IPC (inter-process communication), and the process communication efficiency is increased by 5 times compared with the existing system.
  3. Based on the micro-kernel architecture to reshape the trusted security of terminal equipment
      Harmony OS adopts a brand-new micro-kernel design, which has stronger security features and low latency. The basic idea of ​​microkernel design is to simplify kernel functions, implement as many system services as possible in user mode outside the kernel, and add mutual security protection at the same time. The microkernel only provides the most basic services, such as multi-process scheduling and multi-process communication.
      Hongmeng OS applies microkernel technology to Trusted Execution Environment (TEE), and reshapes trusted security through formal methods. Formal method is an effective means to use mathematical methods to verify the correctness of the system from the source without loopholes. Traditional verification methods such as functional verification and simulated attacks can only be verified in selected limited scenarios, while formal methods can verify all software running paths through data models. For the first time, Hongmeng OS uses a formal method for terminal TEE, which significantly improves the security level. At the same time, since the code size of the Hongmeng OS microkernel is only one-thousandth of that of the Linux macrokernel, its chances of being attacked are also greatly reduced.
  4. A unified IDE supports one-time development, multi-
    device deployment, and realizes ecological sharing across terminals Visual programming, so that developers can efficiently build multi-terminal automatic running App based on the same project, realize real one-time development, multi-terminal deployment, and realize shared ecology among cross-device. The Huawei Ark Compiler is the first static compiler that replaces the Android virtual machine mode, allowing developers to compile high-level languages ​​into machine code at one time in the development environment. In addition, the Ark compiler will support multi-language unified compilation in the future, which can greatly improve development efficiency.

4. References

Through the following materials, you can further understand:
1) The difference between microkernel and macrokernel, why Hongmeng chooses microkernel;
2) The principle and function of Ark compiler, and the core technical problems it solves.

The development history of HarmonyOS Hongmeng operating system: microkernel, Ark compiler, IOT ecology, etc.
2019-08-19 18:49:28

The original author: Yi Smart Internet of Things Xiaobian
Introduction
Last week, Huawei released the microkernel-based full-scenario distributed Hongmeng operating system at the developer conference, and announced the open source of the Ark compiler. From a technical point of view, the operating system is an important carrier for managing and allocating hardware resources and realizing application software functions. The high gold content of technology determines its status as the "top of the pyramid". From an ecological point of view, operating system manufacturers are the leaders of the corresponding industrial ecology. The launch of the Hongmeng operating system is of self-evident significance to Huawei and to my country's independent and controllable process.
Introduction to the full text
• Seven years of accumulation, to develop "Hongmeng"
• 1. The "brain" in the ICT field, whoever wins the system wins the world
• 2. LiteOS, the early prototype of Hongmeng, has already reflected Huawei's efforts in IoT
• Two core elements: microkernel, Ark Compiler
• 1. Hongmeng microkernel is designed for the Internet of Things from the bottom level
• 2. Ark compiler is the key to Hongmeng's success
• Apple in the 5G+IoT era
• Hongmeng will improve Huawei's IoT ecosystem and catalyze the industrial process


The original text comes from: Internet of Things Think Tank
Last week, Huawei released the microkernel-based full-scenario distributed Hongmeng operating system at the developer conference, and announced the open source of the Ark compiler. From a technical point of view, the operating system is an important carrier for managing and allocating hardware resources and realizing application software functions. The high gold content of technology determines its status as the "top of the pyramid". From an ecological point of view, operating system manufacturers are the leaders of the corresponding industrial ecology. The launch of the Hongmeng operating system is of self-evident significance to Huawei and to my country's independent and controllable process.
For the intelligent internal reference of this issue, we recommend Shenwan Hongyuan's research report "Panoramic Deconstruction of Huawei Hongmeng OS", which comprehensively analyzes the development process of Hongmeng OS, technical characteristics and Huawei's ambition in the "5G+IoT" era.
insert image description here

Seven years of accumulation, to develop "Hongmeng"
1. The "brain" in the ICT field, whoever wins the system wins the world
The operating system (OS, Operating System) is the "brain" that manages computer hardware and software resources. Common ICT systems include hardware and software, and software can be divided into operating system software and application software. Among them, the operating system is an important layer between hardware and application software, and is an important carrier for managing and allocating hardware resources and realizing application software functions.
The operating system plays an important role in the ICT field, and its role can be proved from two aspects: technology and ecology: From a
technical perspective, the operating system plays an important role in the process of program operation. Generally speaking, the operation of a software program requires four elements: programming language, compilation system, operating system, and instruction set. Rough understanding: 1) The programming language is the basis of programming tools, including common C, C++, Java, C#, etc.; 2) The function of the compilation system is to "translate" the written programming language into a binary code that the machine can recognize; ③The operating system is the "brain" for scheduling resources and executing programs; ④The instruction set determines how the program is executed.
The following analogy can be made: hardware is equivalent to infrastructure resources such as highways and railways, software is equivalent to drivers/passengers, and operating systems are equivalent to various types of vehicles. Cars, trains and other means of transportation can travel with the help of infrastructure such as roads and railways, and drivers/passengers can reach different destinations on the means of transport. The operating system is connected to the hardware downwards, so that the existence of hardware resources has practical significance, and at the same time carries various application programs upwards to realize various application functions; the compilation system plays the role of a steering wheel or a navigator during the running of the program , to convert the driver's (software) operation (program instruction) into the displacement of the vehicle (machine language).
insert image description here

▲The operating system plays an important role in the process of program operation
From an ecological point of view, summarizing the history of Win-tel and China's independent control, operating system manufacturers are at the core of the ICT industry chain. Under the Win-tel alliance, Microsoft's stock price has repeatedly hit new highs with the release of Win95, WinXP and other versions. In the 1980s, Microsoft and Intel formed the Win-tel alliance, making the Windows system paired with x86 Intel processors the absolute mainstream in the PC field. "pattern. The release of Win95 in 1995 pioneered the concept of "desktop", making the human-computer interaction interface more friendly; the release of Windows XP further consolidated Microsoft's leading position in the field of operating systems.
insert image description here

▲Win-tel development history
Although the chip is the underlying core of the ICT ecology, the huge application ecology behind Windows determines that Microsoft has a higher say in chip manufacturers. Microsoft announced in 2018 that the Win10 operating system has 35 million applications, over 175 million software versions, and supports 16 million hardware/driver combinations. Microsoft has accumulated a large number of developers for more than 30 years and has a huge application base, so it has a certain say in the choice of chip architecture. In addition to x86, Microsoft has launched a new generation of operating systems for the ARM architecture, and chip manufacturers other than Intel will benefit from the expansion of the Win ecosystem.
In addition, the self-controllability of the ICT field is not only reflected in the hardware layer represented by chips, but also requires the operating system to drive ecological sustainability. "The short board of the basic software is mainly in the operating system, and the short board of the chip is mainly in the fields of EDA (electronic design automation) design tools." Innovation and investment at the chip level has always been the focus of industry and capital, but continuous R&D requires commercial use and operating system to drive application software to advance simultaneously. Without the reinvestment of cash flow in the commercial stage, innovation at the chip level will be difficult to continue to iterate.
insert image description here

▲A number of commercial operating systems have appeared in China, and they have begun to take shape

2. LiteOS, the early prototype of Hongmeng, has already reflected Huawei's efforts in IoT.
Although the timing of the disclosure of Huawei's "Hongmeng" concept was affected by the external environment, it has actually accumulated a lot of commercial experience. The timing of the release of Hongmeng operating system is of great significance, but it is not a process of "starting from scratch". Apps are the prototype of Hongmeng OS.
insert image description here

▲ As early as 2012, Huawei began to develop LiteOS, an IoT operating system called
LiteOS, to solve the three major pain points of IoT application cost, connection, and security, reflecting that Huawei has explored the IoT field in the early days.
(1) Low cost and low power consumption. The Internet of Things requires access to a large number of terminals, and most edge devices are miniaturized and mobile, so there are higher requirements for battery life and unit cost. The LiteOS kernel is less than 10k, and at the same time, through the OpenCPU architecture of MCU and communication module, it can significantly reduce the terminal volume and terminal cost. And ultra-low power consumption, even a 5th battery can work for 5 years.
(2) Various connections. IoT terminals require different forms of network connections in different scenarios, especially after entering the 5G era, there are strict requirements on the connection performance and compatibility of the system. Strong connection expansion performance, supports 6LoWPAN, WiFi, BTE, Zigbee and other protocols, and self-organizing network, self-discovery, and interoperability between devices can meet the different connection requirements of IoT applications.
(3) Security. IoT edge computing requires "cloud" + "device" collaboration, and data leakage after interconnection has become a major hidden danger in the IoT system. LiteOS implements two-way authentication, differential upgrade, DTLS/DTLS+ and other mechanisms with a very small kernel.
insert image description here

▲Many features of LiteOS indicate that the system is specially designed for the Internet of Things.
In the future, the mature commercial LiteOS will be gradually integrated into the Hongmeng operating system, gradually enhancing the multi-terminal development capabilities of the Hongmeng ecosystem. Before Hongmeng, Huawei had formed an IoT "three-piece set" system of HiLink (connection standard) + LiteOS (operating system) + chip (computing power). Under this system, Huawei's 2C shipments of smart homes, smartphones, watch bracelets and other equipment have exceeded 200 million pieces, and 2B's shipments of water and electricity meters, cameras, bicycles and other equipment have exceeded 100 million pieces. It has a mature and stable commercial solution. The further combination of LiteOS and Hongmeng will form a powerful synergy in the IoT field.
insert image description here

▲Huawei has formed an IoT "three-piece" system of HiLink+LiteOS+ chips
insert image description here

Two core elements: Microkernel and Ark Compiler
Hongmeng was born for multiple terminals (such as edge computing IoT, servers, etc.) from the beginning of design. The microkernel and Ark compiler are the two core elements of the Hongmeng operating system ecosystem.
The microkernel is a structural form of the operating system, which realizes the modularization of various functions of the system, is more flexible, easy to expand, easy to maintain and update iterations; the compiler can be regarded as a "translation" between humans and machines, translating human programming languages Comprehensible and executable for computers is a bridge for communication between humans and computers.
insert image description here

▲Microkernel and Ark Compiler are the two core elements of the Hongmeng ecosystem
Huawei's 10-year evolution in the layout of the compiler and system kernel has laid a solid foundation for the Hongmeng operating system and its entry into the Internet of Things.
insert image description here

▲Huawei's 10-year layout of multi-terminal systems paves the way for entering the Internet of Things

1. The Hongmeng microkernel is designed for the Internet of Things from the bottom.
The microkernel corresponds to the macrokernel and is a structural form of the operating system. The core functions of the operating system include file system, memory and I/O device management, CPU scheduling, etc. The macro kernel means that the operating system "packages and integrates" all the above functions into the kernel, and the coupling between different functional modules is high, so It has the advantage of high efficiency, and the representative system includes Linux, Unix, etc.). The microkernel divides the system into small functional modules. Only the most core scheduling and memory management functions are kept in the kernel. Drivers, file systems, etc. are connected to the kernel in the form of "external modules". The corresponding advantage is that it is easy to expand , easy to maintain and update, high stability, representative systems include Windows, Mac OS X, etc.
The microkernel is more suitable for complex program functions, and can be more flexibly ported to different hardware platforms. The microkernel only retains the most basic functions in the kernel of the operating system, which greatly reduces the difficulty of kernel development; distributed thinking isolates non-core programs and modules from the kernel, so when a single program fails, it will not affect the system The overall function; at the same time, the microkernel is easier to transplant than the macrokernel, and the development and update cycle can be shortened.
Following the first part, the following analogy can also be made: if the operating system is compared to vehicles such as vehicles, then different kernel structures are equivalent to different customization methods of vehicles. The macrokernel is equivalent to a commercial vehicle, while the microkernel is similar to supporting deeply customized cars. During the driving process, although the overall operation efficiency of commercial vehicles is high, if a certain part fails, it needs special personnel and spare parts of the same type to repair; while many modules of customized vehicles are very replaceable, and can be easily replaced by Modified to drive in different road conditions (different hardware environment).
insert image description here

▲The structure of the microkernel is flatter and more flexible than the macrokernel.
The Hongmeng microkernel is designed for the Internet of Things from the bottom up. It can be seen from the above that the biggest feature of the microkernel is to only retain the most core functions in the kernel. Therefore, for Hongmeng: the connection is better in real time (response delay is reduced by 25.7%, and the delay fluctuation rate is reduced by 55.6%). Delay scenarios are especially suitable for IoT fields such as industrial control and intelligent transportation; fault isolation can be achieved to ensure the stability and security of the system to the greatest extent, and it can better meet the requirements of the Internet of Everything in the 5G ultra-multi-connection scenario.
The Hongmeng microkernel embodies the characteristics of distribution and solves the pain points of IoT ecological collaboration. At present, the existing operating system basically only corresponds to a certain kind of hardware, such as Windows corresponds to x86 PC, iOS corresponds to Apple mobile phone, etc. However, the number of terminal types in the IoT era has greatly expanded, and it is difficult to develop operating systems or applications for each type of hardware. The ecology of different hardware terminals cannot be shared and coordinated, and development efficiency is low. And Hongmeng has achieved hardware decoupling, which can be flexibly deployed for different devices (such as smart screens, wearable devices, car machines, speakers, mobile phones, etc.). At the same time, the innovative distributed soft bus enables hardware with different functions to cooperate with each other.
For example: Traditional cameras, TVs, audio and other devices were originally independent of each other; but under Hongmeng's distributed soft bus, these devices are "virtualized" into camera modules, display modules, and external speaker modules, and become an organic whole , users can call various functions on demand without additional settings, and the hardware terminals form mutual coordination.
insert image description here

▲ In the future, the microkernel-based Hongmeng operating system will be widely used in the IoT field
. The microkernel is the evolution direction of the IoT operating system. The efficiency and security of the Hongmeng microkernel are industry-leading. In a general microkernel system, because processes such as drivers and file systems are external, the communication between modules needs to be "bridged" by the kernel, so the efficiency is often lower than that of a macrokernel. However, the Hongmeng microkernel has highly optimized inter-process communication, making Hongmeng 3 to 5 times more efficient than QNX and Fuchisia. In addition, since the number of codes in the microkernel is far less than that in the macrokernel, Hongmeng can perform sufficient "formal" security verification on each line of code, significantly improving kernel security.
2. The Ark compiler is the key to Hongmeng's success.
The Ark compiler was first announced by Huawei at the P30 series mobile phone conference in April 2019, but it has been accumulated for ten years and is positioned as a multi-terminal system. Huawei said earlier that the Ark compiler will greatly improve the operating efficiency of the Android system on the mobile phone, and the development of the compiler is actually to assist the Hongmeng operating system in a deeper layout of edge computing, servers and other fields.
For traditional compilers, compilation time and cross-language compilation are the bottlenecks that restrict the execution efficiency of applications. The execution of the application program needs to be converted from bytecode to machine code. Programmers use the above-mentioned programming languages ​​such as C, C++, Java, and C# when programming, but the execution logic of the hardware is based on 0 and 1 binary. Therefore, in order for the hardware to "understand" instructions, a compiler is required to translate "programming language" into "machine language".
(1) Compilation time point: According to the different working time points of the compiler, the compilation methods can be divided into two types, but there is still room for improvement in execution efficiency. One is "translate while executing", the program calls a certain command, and the compiler translates it into binary code in real time (earlier versions of Android use this solution, and the program execution efficiency is low); the other is to introduce high-performance virtual Machine (ART in the Android system, that is, Android Run Time), the code is translated in advance when the program is installed or the system is idle, which further improves the efficiency of program execution, but the new problem is that the program installation time is long.
(2) Cross-language compilation: Programs are often written in different languages, which has a great impact on compilation efficiency. For example, applications developed in multiple languages ​​such as Java and C/C++ need to use a common interface to coordinate different codes (ie, Java Native Interface, JNI) at runtime. The common interface needs to occupy hardware resources, and the coordination of different codes is inherently inefficient, so the execution efficiency of cross-language applications under traditional compilers is low.
Ark Compiler's solution to the above two bottlenecks is to advance the compilation process to the developer. Under the Android system, the compilation of some complex dynamic semantics still needs to be completed by the virtual machine. The Ark Compiler development team conducted large-scale data modeling by sorting out the dynamic semantics of Java, especially in cross-language compilation, which greatly improved the accuracy of dynamic semantic analysis; in addition, Huawei designed a set of dynamic semantics with core patents. The semantic matching mechanism effectively reduces the overhead of runtime dynamic semantics. The end result is that the Ark compiler can compile Java code into machine language before the application program is executed, greatly releasing hardware resources, which is especially important for multi-terminal, especially IoT edge computing.
The Ark compiler is friendly to developers and helps to form a good ecology. In the past, Android and other systems avoided compiling in the developer link. One of the reasons is to reduce the difficulty of development. Developers only need to complete the code writing without considering how to compile across languages. However, under the Ark plan, the compilation process is advanced to the development stage, which does not increase the burden on developers. On the contrary, developers can also optimize code through Ark preset algorithms, and can also develop code optimization algorithms by themselves. In the future, code optimization may even be migrated to the cloud . A friendly development environment is an important factor for Hongmeng to build a good ecosystem.
For the Ark compiler, it can also be compared as follows: In the past, the ART virtual machine with the Android system was equivalent to an experienced driver driving a traditional manual transmission car; while the Ark compiler with the Hongmeng operating system was equivalent to a car equipped with L4 level automatic driving. Vehicles, vehicle driving can be flexibly adjusted at any time according to vehicle conditions and road conditions to ensure the best ride experience for all passengers.
Compatibility with Java, C, C++ and other languages ​​enhances Hongmeng's immediate combat power, and cooperates with its own hardware architecture such as Kirin and Kunpeng to form a software and hardware structure similar to Win-tel.
insert image description here

▲Huawei IoT has formed a chip family similar to the x86 field.
Therefore, considering the two major elements of the microkernel and the Ark compiler, Hongmeng was designed for the Internet of Things, not just the mobile phone operating system as the main position. On the one hand, for Huawei's mature mobile phone business, it is easy to build a system, but it is difficult to build an ecosystem. At present, Android and Apple have built an almost unbreakable ecosystem. It is a resource for Huawei to continue to use Android when conditions permit. save.
To further explain in a more general way: For different programs written by developers, the Hongmeng operating system can be executed smoothly only after being processed by the Ark compiler; and Hongmeng operating system under the microkernel can be ported to different platforms. Such system features are naturally suitable for massive terminals and applications in the Internet of Things era.
insert image description here

Apple in the 5G+IoT Era
Apple was once an emerging giant growing up in the 3G and 4G mobile Internet era. Looking back on Apple's rise, it shows its advantages in three aspects: ecology, hardware, first-mover advantage + continuous innovation.
1. Ecology. Before Apple, Microsoft released the Windows CE operating system that can run on mobile phones in 1996; Symbian released the Symbian S60 operating system in 2001, which was once supported by many mobile phone manufacturers such as Nokia, Samsung, Sony Ericsson, Motorola, and Siemens. However, because the symbian system is not friendly to developers and the kernel is bloated, after the advent of the 3G era, Apple seized the opportunity of the mobile Internet to launch iOS and build an AppStore with high-quality applications. The strong developer ecosystem has continuously enhanced the vitality of Apple.
2. Hardware. Compared with the previous mobile phone brands, Apple has a complete hardware industry chain, and has strong bargaining power upstream and downstream, and has launched Macbook, iPod, iPad and other products in addition to mobile phones, constantly expanding the hardware "capability circle". On the basis of a high-quality ecology, a tight hardware industry chain can improve the company's profitability on the one hand, and on the other hand, the collaboration between software and hardware has greatly improved the user experience of the solution itself.
3. First-mover advantage + continuous innovation. After forming a moat through a virtuous cycle of ecology + software and hardware collaboration, Apple has continued to look forward to new technologies and new applications in the field of mobile devices, and can continue to iterate, gradually controlling the development direction of the industry, and eventually becoming a giant in the mobile Internet era.
However, as the C-end mobile Internet dividend peaked, Apple's growth in the 5G+IoT era was weak. With the evolution of technology, Apple has also exposed some problems in recent years: the ecology is not as open source as Android; the core hardware is subject to external constraints (such as baseband relying on Qualcomm and Intel); follow-up innovation is weak (the new iPhone is hard to say success). In the 5G+IoT era, other ICT manufacturers are beginning to face new opportunities.
Under the new blue ocean of the industrial Internet, "Huawei is to the Internet of Things" can be compared to "Apple is to the mobile Internet". ecology. Hongmeng and Ark Compiler will be open source, embracing a large number of developers. Taking the mobile terminal as an example, the Ark Compiler cooperates with more than 40 high-quality apps to significantly optimize the fluency of the Android operating system. In the broader IoT field, the Ark compiler supports multi-language unified compilation, and also supports mixed programming, realizing "one-time programming, multi-terminal use", which greatly reduces the burden on developers (for example, for a certain application, the code only needs to be completed once , it can be adapted to various terminals such as mobile phones, TVs, and cars). Therefore, with the help of the Ark compiler, Hongmeng will build a complete IoT ecosystem.

hardware. Huawei has strong ICT hardware genes and has launched a full-stack software and hardware solution from underlying hardware to middleware, operating system, to compilation tools and application software. Analogous to the Apple industry chain, Huawei has basically formed self-developed core hardware links, such as the newly released front-end Ascend 310 + back-end Kunpeng 920 security software and hardware standardized solutions, and self-developed full-stack Taishan servers based on Kunpeng 920 The software and hardware systems are replaced by domestically produced products in Shandong Mobile BSS. Therefore, compared with pure software such as Google Fushcia, Hongmeng has hardware advantages (Apple's acquisition of Intel's 5G baseband department in July 2019 also reflects the importance of self-developed chips to the system ecology).
insert image description here

▲Including network chips, Huawei HiSilicon has formed a full range of chipset platforms
insert image description here

▲Huawei's full-stack software and hardware have been applied in the core system of operator CRM.
First-mover advantage + continuous innovation. LiteOS, the predecessor of Hongmeng, has already been launched, and has commercial experience and first-mover advantages. The foundation of the Internet of Things is the network, and Huawei has a deep accumulation in the 5G field. For example, it released the first commercial 5G multimode terminal chip Balong 5000 and the first 5G commercial terminal Huawei 5G CPE Pro in early 2019. Balong 5000 achieves a peak download rate of 4.6Gbps in the Sub-6GHz frequency band and 6.5Gbps in the millimeter wave frequency band, and supports SA and NSA networking, which has fully met the commercial needs of different stages of the future 5G industry. Compared with the industry benchmark Qualcomm X50 Has taken the lead. The first-mover advantage and continuous innovation of Huawei's 5G technology are the guarantee for Hongmeng's success as an IoT multi-terminal operating system.
insert image description here

▲Huawei's 5G statement ranks first among all manufacturers in the number of patents.
The operating system means the application platform and traffic entrance. From the above three aspects of ecology, hardware, first-mover advantage + continuous innovation, having an operating system will help Huawei have a stronger voice in the field of IoT, and will grow into a 5G+IoT giant along Apple's path in the mobile Internet era.
insert image description here

Hongmeng will improve Huawei's IoT ecology and catalyze the industrial process.
IoT is an important layout of Huawei in the era of industrial Internet of Things. Huawei mainly focuses on the infrastructure field. The connection of massive low-cost terminal equipment needs to ensure that the connection is manageable and controllable, and the entire network is continuously covered, as well as the end-side (terminal), transmission, and cloud security. Huawei has been cultivating ICT infrastructure for many years, and its full-stack software and hardware ensure the stability of IoT solutions. According to Huawei's 2018 Fully Connected Conference, the number of Huawei's IoT connections exceeds 200 million, with a monthly increase of 6 million connections, and the average daily API calls exceed 130 million. The maturity of the solution is high.
The Hongmeng operating system and Huawei's "cloud + terminal" chip form a powerful synergy, forming a killer application. Huawei's high-quality network equipment is the foundation of IoT connections, and a large amount of data can be obtained through connections, but only through intelligent analysis can a killer application be formed. Huawei already has Ascend, Kunpeng, Kirin and other chips on the cloud side and end test, with powerful computing power, combined with the efficient and flexible execution capabilities of the Hongmeng operating system, it will cultivate a large number of high-value applications.
Internet of vehicles, smart city, and industry are the three major application directions of Huawei's IoT. At present, the three major applications have different maturity levels. The Hongmeng operating system is expected to play a catalytic role in the three major areas.
insert image description here

▲Huawei has cultivated the Internet of Vehicles, smart city, and industry in the three IoT directions
of the Internet of Vehicles: the rapidly emerging IoT scene. At present, the Internet of Vehicles is more about realizing the active collaborative communication between vehicles and roads, gradually realizing the transition from assisted driving to automatic driving, and greatly reducing costs. Based on C-V2X, Huawei already has a complete car networking hardware system, including chips, OBU boxes, RSUs to realize roadside perception equipment, and V2X servers for cloud data collection and data processing. We expect the pre-installation and after-installation markets of future terminals, positioning and maps (Huawei has obtained Class-A surveying and mapping qualifications, and the future of Hongmeng + Balong 5000 chips + high-precision maps has room for imagination), back-end data processing (Hongmeng + Taishan server + The combination of powerful computing power of Kunpeng chips) will be an important industry direction.
Smart city: relatively mature, transitioning from the Internet to the Internet of Things. Smart city is the embodiment of city-level network access, NB-IoT wide coverage, low cost and low power consumption. We expect future expansion directions to include smart parks (Hongmeng + Huawei HoloSens based on Kunpeng/Shengteng in the security field), smart homes (Hongmeng + Honor Smart Screen based on Honghu 818 chip), etc.
Industry: 5G offers new opportunities. One of the pain points of the Industrial Internet lies in network connections, and the second pain point lies in industry Knowhow. The problem of network connection will be solved after the promotion of 5G commercialization and network slicing. Huawei will be the core supplier of network infrastructure; for the industry Knowhow, Hongmeng emphasizes building an ecological circle, and has the characteristics of developer friendliness, which is conducive to cultivating customers in different vertical industries and gain experience. In addition, Huawei has launched the "HUAWEI CLOUD EI Agent" for various industries. HUAWEI CLOUD has more than 1 million developers and enterprise users4, initially forming a benign ecosystem.
In summary, the launch of the Hongmeng operating system will have a positive effect on Huawei's business segments and promote the progress of the IoT industry. It is expected that many companies in the Huawei industry chain will benefit.
Wisdom believes that Ren Zhengfei, the founder of Huawei, introduced the Hongmeng operating system in detail in an interview with French media. He said that the processing delay of the Hongmeng system is less than 5 milliseconds, which will perfectly adapt to the Internet of Things and can also be applied to autonomous driving. Now, as Huawei officially released the Hongmeng system at the Global Developers Conference, the mystery of the Hongmeng operating system has also been lifted. As a distributed operating system with a microkernel oriented to all scenarios, Hongmeng seems to have been prepared for the Internet of Things at the beginning of its birth. However, the most important thing for the success of an operating system is the establishment of an ecosystem. In the future, if Huawei wants to To live up to expectations, build a strong ecosystem in the 5G Internet of Everything era, and become the "Apple" in the 5G+IoT era, we still need to redouble our efforts.

For more information about me, please refer to : Harmony OS high-quality data collection, which is being continuously updated

Guess you like

Origin blog.csdn.net/qq_31765191/article/details/108948348