• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Process Model (Stage Model)
2
3
4The OpenHarmony process model is shown below.
5
6
7- All UIAbility, ServiceExtensionAbility, and DataShareExtensionAbility components of an application (with the same bundle name) run in an independent process, which is **Main process** in green in the figure.
8
9- The ExtensionAbility components of the same type (except ServiceExtensionAbility and DataShareExtensionAbility) of an application (with the same bundle name) run in an independent process, which is **FormExtensionAbility process**, **InputMethodExtensionAbility process**, and other **ExtensionAbility process** in blue in the figure.
10
11- WebView has an independent rendering process, which is **Render process** in yellow in the figure.
12
13  **Figure 1** Process model
14![process-model](figures/process-model.png)
15
16> NOTE
17>
18> - You can create ServiceExtensionAbility and DataShareExtensionAbility only for system applications.
19> - 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.
20
21A 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.
22
23**Figure 2** Multi-process
24![multi-process](figures/multi-process.png)
25
26
27OpenHarmony provides two inter-process communication (IPC) mechanisms.
28
29
30- [Common Events](common-event-overview.md): This mechanism is used in one-to-many communication scenarios. Multiple subscribers may receive events at the same time.
31
32- [Background Services](background-services.md): This mechanism is implemented through [ServiceExtensionAbility](serviceextensionability.md).
33