NEWS

新闻

了解openKylin最新资讯,关注社区和产品动态。

NEWS

Learn about the latest news.

openKylin's "level freezing" mechanism makes the system experience smoother!

2023-02-22 15:33:43

In a traditional Linux operating system, the life cycle of an application process is mainly directly controlled by the application itself. However, system resources (including CPU, I/O, storage, etc.) are limited. When we run a large number of I/O-intensive or CPU-intensive applications, the system often freezes or even "fake crashes". This greatly affects the user's operating experience. To this end, we have designed a "level freeze" mechanism in the openKylin operating system to control the application life cycle.

What is the "level freeze" mechanism?

The "level freezing" mechanism refers to the "leveling" processing of applications in different states in the operating system, and "freezing" the user's unoperated applications in a special way, thereby releasing system resources (such as CPU, disk I/O, etc.) , memory, etc.), give priority to ensuring the resource allocation of the user's current operating application, and improve the user experience.

"Grade Freeze" Mechanism Grade Classification

In the openKylin operating system, we divide applications into the following levels:

1. Focus application

Indicates the application currently in operation. Under normal circumstances, there is no resource restriction on it, and its fluency is fully guaranteed.

2. Foreground application

Only exists in the state of PC mode, indicating that the application that is currently running is not minimized but has not gained focus.

3. Background application

In PC mode, it refers to the application whose window is minimized and whose duration is ≤30 minutes, or the duration of the foreground application is ≥30 minutes;In tablet mode, it refers to an application process that is not currently open and lasts ≤ 30 minutes .

4. Cache application

Refers to applications that are in an invisible state and last for >30 minutes.

5. Hibernate apps

Applications that are frozen and put into the swap partition.

Among them, the state timing transitions of applications at all levels are shown in the figure below

Based on the above application classification , open Kylin realizes the following features :

1. Single instance startup _

In the tablet mode, the application starts as a single instance, and the startup status of each application is recorded, which is implemented uniformly by the system interface, without the need for separate adaptation of the application.

2. Real -time control of background resources

For background applications , when the remaining system resources reach our predetermined threshold , corresponding resource regulation is performed according to system policies and user settings , thereby reducing _ power consumption of the system , increasing the foreground shouldFluency used .

3. Application - level hibernation

Under certain conditions , the application will be completely frozen to save CPU and memory resources .

4. Multimedia protocol extension support

For multimedia applications such as audio and video , the background pause / play function is realized , allowing users to control entertainment more flexibly .

openKylin's "level freezing" mechanism can not only further improve system performance, provide users with a smoother use environment, but also bring a new optimization and innovation idea to domestic operating systems. Next, openKylin will continue to invest in the research and development and optimization of the "level freezing" mechanism to help the rapid development of domestic operating systems.

The openKylin community aims to take "co-creation" as the core, on the basis of open source, voluntariness, equality, and collaboration, to build a partner ecosystem with enterprises in an open source and open way, and to jointly create a top-level desktop operating system community. Promote the prosperity and development of Linux open source technology and its software and hardware ecology.

The first batch of council member units in the community include Kylin Software, Puhua Basic Software, Zhongke Fangde, Kylin Principal, Meditation Software, Yiming Software, ZTE New Fulcrum, Yuanxin Technology, China Electronics 32, Jide System, Beijing Lin Zhuo, Advanced Operating System Innovation Center and other 13 industry colleagues and industry organizations.