harmony 鸿蒙Process Model Overview (Stage Model)

  • 2023-02-03
  • 浏览 (719)

Process Model Overview (Stage Model)

The OpenHarmony process model is shown below.

  • All UIAbility, ServiceExtensionAbility, and DataShareExtensionAbility components of an application (with the same bundle name) run in the same process, which is Main process in green in the figure.
  • All ExtensionAbility components of the same type (except ServiceExtensionAbility and DataShareExtensionAbility) of an application (with the same bundle name) run in an independent process, such as FormExtensionAbility process, InputMethodExtensionAbility process, and other ExtensionAbility process in blue in the figure.
  • WebView has an independent render process, which is Render process in yellow in the figure.

Figure 1 Process model

process-model

NOTE

  • You can create ServiceExtensionAbility and DataShareExtensionAbility only for system applications.
  • To view information about all running processes, run the hdc shell command to enter the shell CLI of the device, and run the ps -ef command.

A system application can apply for multi-process permissions (as shown in the following figure) and configure a custom process for an HAP. UIAbility, DataShareExtensionAbility, and ServiceExtensionAbility in the HAP run in the custom process. Different HAPs run in different processes by configuring different process names.

Figure 2 Multi-process

multi-process

OpenHarmony provides two inter-process communication (IPC) mechanisms.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Application Models

harmony 鸿蒙Using Explicit Want to Start an Application Component

harmony 鸿蒙Using Implicit Want to Open a Website

harmony 鸿蒙AbilityStage Component Container

harmony 鸿蒙Accessing a DataAbility

harmony 鸿蒙Accessing a DataShareExtensionAbility from the FA Model

harmony 鸿蒙AccessibilityExtensionAbility

harmony 鸿蒙Common action and entities Values

harmony 鸿蒙API Switching Overview

harmony 鸿蒙Switching of app and deviceConfig

0  赞