Comparative analysis of Hongmeng OS, Android and Fuchsia

The basic data source of this article: https://blog.csdn.net/gxc19971128/article/details/104953294, some modifications have been made.

1. Comparison of three operating systems
For the three operating systems of Android, Harmony, and Fuchsia, the following three aspects will be compared:

1.1 Application scenarios:
a. The scope of application of Harmony OS is greater than that of Android OS. It can be used not only on mobile phones and computers, but also on smart devices such as smart watches, bracelets, smart screens, smart speakers, and routers. It will also be used in the future Applied to headsets, VR glasses, etc.;
b. Android OS can only be used on smartphones;
c. Fuchsia OS is not only for smartphones or tablet computers, but also for various smart embedded devices such as smart homes and mobile terminals. The equipment, in terms of concept, is similar to Huawei's Hongmeng system.
1.2 Features:
1) Compared with Android, Harmony OS has the following features:
a. Distributed architecture is used for terminal OS for the first time to realize seamless collaborative experience across terminals.
b. Harmony OS has a deterministic delay engine and a high-performance internal processing and communication system to make it run smoothly and have high performance, which is 40%~60% faster than Android OS.
c. Because of its microkernel, Harmony OS has higher security than Android OS. The code size of Harmony OS microkernel is only one-thousandth of that of Linux macrokernel, and its attack probability is also greatly reduced.
d. The unified system IDE supports developers to deploy applications to different devices with only one development. The Huawei Ark compiler used by Harmony OS is the first static compiler that replaces the Android virtual machine mode. Developers compile the high-level language to machine code in one go in the development environment. In addition, the Ark compiler will support multi-language unified compilation in the future, which can greatly improve development efficiency.

2) Android OS is open source, supported by powerful software developers, and has good software compatibility.

3) Compared with the current Android, the Fuchsia OS system has greatly reduced hardware requirements such as storage and memory. It can be seen that this is a system for household appliances oriented to the Internet of Things.

1.3 Kernel mechanism:
First, Harmony OS is based on the microkernel, Android OS follows the Linux macrokernel scheduling mechanism, and Fuchsia OS is based on the new kernel of the microkernel Magenta (later renamed Zircon). Harmony OS is oriented to all scenarios, and can meet the requirements of smooth experience in all scenarios, architecture-level trustworthy security, seamless collaboration across terminals, and multi-terminal deployment at one time. Android OS follows the Linux macro kernel scheduling mechanism, which is a fair scheduling for server loads. mode, it is difficult to guarantee user experience.
2. Fuchsia OS structure:

Four-layer structure
The first and bottom layer
is the cornerstone of Fuchsia OS, the Zircon kernel. Last year's news was called Magenta, but it was later changed to the name Zircon. This is a new kernel designed by Google. It mainly processes Communication between hardware access and software.
For students who don't know much about the role of the kernel, in short, Zircon is to Fuchsia, just like Linux is to Android. The Linux kernel drives multiple operating systems, and many operating systems are built on top of it, such as Ubuntu, Android, Manjaro, ArchLinux, Debian, Red Hat, SUSE and even Chrome OS, so we can also boldly predict that if Fuchsia OS develops well in the future , the Zircon kernel has also proven to be useful, so it is very likely that more operating systems will adopt this new kernel.
The second layer
is also directly built on Zircon called Garnet. Garnet contains various low-level functions required by various operating systems, including drivers for hardware (network, graphics, etc.) and software installation. The most exciting things at this layer are Escher (the graphics renderer), Amber (an updater for Fuchsia), and Xi Core, which is the underlying engine for the Xi text and code editor (which was released earlier this year).
The third layer,
Peridot, is the next layer and mainly deals with Fuchsia's modular application design. The other two main components of Peridot are directly used for modules. Ledger saves your location in apps/modules across devices and syncs to your Google account. Maxwell is a more complex topic that needs more in-depth research, but Maxwell is very likely to be the finishing touch for Fuchsia to fully display its magic. It can be revealed in advance that the power of Maxwell includes Kronk, which is also well known Google Assistant.
The fourth layer
, Topaz, is the top layer of the Layer Cake, and it is also the layer that has the greatest direct impact on developers and users. Topaz offers Flutter support, and with Flutter support, a variety of gorgeous apps that can help flesh out fully functional apps for everyday use. For example, the most impressive right now is of course the Armadillo UI, which is the main user interface and home screen of Fuchsia.
As an analogy, the Topaz layer can be found in Android, which will be your must-have apps, such as contacts, music, file manager and text editor Xi (the visual front end in Topaz is connected to Garnet's backend). Even if you don't have what you need, you can install it simply and conveniently.
3. Android OS structure
Android is divided into four layers, from the high level to the low level are the application program layer, the application program framework layer, the system runtime layer and the Linux kernel layer.
insert image description here

4. Hongmeng OS architecture

insert image description here

5. Similarities and differences between microkernel and macrokernel:
insert image description here

The following information comes from: The development history of the HarmonyOS Hongmeng operating system: microkernel, Ark compiler, IOT ecology, etc. (http://www.openpcba.com/web/contents/get?id=3752) The
microkernel corresponds to the macrokernel , 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).
▲ 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.

▲ 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.

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/108976886