Detailed comparison: What is the difference between Hongmeng and Android? Hongmeng development starts here

HarmonyOS is a new generation of smart terminal operating system, which provides a unified language for the intelligence, interconnection and collaboration of different devices. Bring a simple, smooth, continuous, safe and reliable full-scene interactive experience.

Huawei Hongmeng OS (English: huaweiHarmonyOS, HongmengOS). On August 9, 2019, Huawei held the Huawei Developer Conference in Dongguan and officially released the operating system Hongmeng OS.

system location

HarmonyOS is a brand new distributed operating system for the Internet of Everything era.

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 multiple terminal devices such as mobile phones, tablets, smart wearables, smart screens, and cars. Provide full-scenario (mobile office, sports and health, social communication, media entertainment, etc.) business capabilities.

HarmonyOS has three major features:

  • The devices equipped with this operating system are integrated at the system level to form a super terminal, so that the hardware capabilities of the devices can be expanded elastically, and hardware mutual assistance and resource sharing between devices can be realized .

    For consumers, HarmonyOS can integrate the capabilities of various terminals in life scenarios, realize fast connection, mutual assistance, and resource sharing between different terminal devices, match suitable devices, and provide a smooth full-scenario experience.

  • For developers, realize one-time development and multi-terminal deployment .

    For application developers, HarmonyOS uses a variety of distributed technologies to make application development independent of the differences in the form of different terminal devices, so that developers can focus on upper-level business logic and develop applications more conveniently and efficiently.

  • A set of operating systems can meet the needs of devices with different capabilities, achieving a unified OS and flexible deployment .

    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.

HarmonyOS provides APIs that support multiple development languages ​​for developers to develop applications. Supported development languages ​​include Java, XML (Extensible Markup Language), C/C++, JS (JavaScript), CSS (Cascading Style Sheets) and HML (HarmonyOS Markup Language).

Technology Architecture

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 as follows.

kernel layer

  • 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, Kernel Abstract 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: The hardware driver framework (HDF) is the foundation of the HarmonyOS hardware ecological openness, providing unified peripheral access capabilities and a driver development and management framework.

System service layer

The system service layer is a collection of core capabilities of HarmonyOS, which provides services to applications through the framework layer. This layer consists of the following parts:

  • System Basic Capabilities Subsystem Set: Provides basic capabilities for the operation, scheduling, and migration of distributed applications on HarmonyOS multi-device, including distributed soft bus, distributed data management, distributed task scheduling, and Ark multilingual runtime , public basic library, multi-mode input, graphics, security, AI and other subsystems. 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 (Design For X), MSDP & DV .
  • 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.

frame layer

The framework layer provides Java/C/C++/JS and other multi-language user program frameworks and Ability frameworks for HarmonyOS application development, and two UI frameworks (including the Java UI framework for the Java language and the JS UI framework for the JS language) , as well as a multilingual framework API open to the outside world for various software and hardware services. According to the degree of componentization and tailoring of the system, the APIs supported by HarmonyOS devices will also vary.

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. The background data access required by FA for user interaction also needs to be supported by the corresponding PA. 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.

The difference between Hongmeng OS and Android

1. What is the difference between the Hongmeng system and the Android system? Is it also created based on a virtual machine like Android?

1. Android and Hongmeng mobile phone operating systems are basically developed based on Linux, but the architectures of the two are different:

The Android system is designed based on the macro kernel of linux: the macro kernel contains most of the functions and modules of the operating system, and these functions and modules have the highest authority. As long as a module fails, the entire system will crash. This is also the case of the Android system. easy to crash. The advantage is that the difficulty of system development is low. (And now, Huawei's newly developed Ark compiler is to solve this problem. Any android software compiled by the compiler can directly communicate with the bottom layer of the system. The Hongmeng system plus compiler will replace the virtual machine.) Android uses Java Written in language that is easy to learn. But it has a disadvantage: it cannot directly communicate with the bottom layer of the system, and must run through a virtual machine. To put it bluntly, the virtual machine is equivalent to the transmitter: first, the Android application is installed on the virtual machine, and then transferred from the virtual machine to the bottom of the machine. If there is a problem with the virtual machine, the system will be stuck. Moreover, the Ark compiler in the Hongmeng system is designed to solve this problem. Any android software compiled by the compiler can directly communicate with the bottom layer of the system. The Hongmeng system plus the compiler will replace the virtual machine .

The Hongmeng operating system is a microkernel design: the microkernel only includes the necessary functional modules of the operating system (task management, memory allocation, etc.) and has the highest authority at the core, while other modules do not have the highest authority, which means that other modules have problems. There is no hindrance to the operation of the entire system. The development of the microkernel is very difficult, but the stability of the system is very high. According to some information released by Huawei, we can infer that the Hongmeng system is written in C and C++, that is, the app is written directly in machine language, and the ART virtual machine of the Android system is canceled, and it is directly compiled into binary machine code. The advantage of this is that There is no need for transfer, and the execution speed is fast; but this kind of operation also has some disadvantages, that is, there must be a large number of static solutions and the memory space requirement is higher.

It is reported that the Hongmeng system runs 60% faster than Google's Android system. Why is it so much faster? There are two reasons for this:

First; Google's Android system is developed based on Linux, and Huawei's "Hongmeng" system is also developed based on Linux, and a lot of optimizations have been made to Linux. Previously, Huawei launched a self-developed EROFS super file system, which was only developed based on the Huawei Ark compiler. In terms of application, the performance of the Android system can be improved several times. The Huawei Hongmeng system, which integrates EROFS and the Ark compiler at the bottom, is naturally much faster than the Android system.

Second: Android system programmers use JAVA high-level language to write APP, and package it into APK to Android system. Since the Android system cannot read the JAVA high-level language, it must be understood (converted into machine language) with the help of real-time translation (JAVA virtual machine). Because of the extra step of "translation", the fluency of the Android system has always been inferior to Apple's iOS. The Ark compiler uniformly replaces the instructions with a machine language that the Android system can understand before packaging the APK, which means that the step of "translation" is omitted, and the efficiency is naturally higher.

2. The scope of use of Hongmeng system and Android system is different:

First: The Android system is suitable for mobile phones, while the Hongmeng system is more compatible with devices. It also supports smart home devices such as smart phones, smart wearable devices, computers, and TVs, forming a seamless and unified operating system that is compatible with all The Android application adapts to the current era of 5G and Internet of Things.

3. After years of development of the Android system, the software ecology is very complete, and the Hongmeng system is not yet an ecology. It is not difficult for Huawei to launch the Hongmeng operating system. Compared with launching the operating system, it is more difficult to gather developers to continue to develop various high-quality applications for this operating system, so that this operating system can have real value and then grow stronger , forming a virtuous circle among system developers, hardware manufacturers, developers and users. To allow developers to develop applications for the Hongmeng operating system, what is needed is real policy incentives, profit guidance, and relying on feelings, etc. cannot be solved and is not sustainable. This is a major problem that Huawei needs to solve after launching the Hongmeng OS!

3. How is the security of the Hongmeng system? Can the privacy issues of domestic Android software be changed?

Above we talked about the difference between Hongmeng and Android systems and mentioned two concepts: microkernel (Hongmeng) and macrokernel (Android). The Hongmeng operating system uses a microkernel, which is naturally root-free, and fine-grained permission control improves system security from the source. The Android system has Root permissions, and the user can fully control the Android system after Root. Hongmeng does not have the option of Root. At the same time, according to the official Weibo news of Huawei Terminal Company,

Guess you like

Origin blog.csdn.net/MYBOYER/article/details/118214464