• 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
20A 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.
21
22**Figure 2** Multi-process
23![multi-process](figures/multi-process.png)
24
25
26OpenHarmony provides two inter-process communication (IPC) mechanisms.
27
28
29- [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.
30
31- [Background Services](background-services.md): This mechanism is implemented through [ServiceExtensionAbility](serviceextensionability.md).
32