System Service Lifecycle Control for Low-Resource Electronic Devices
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The increasing number of system services in electronic devices leads to resource occupation, causing freezing of foreground applications due to the lack of effective mechanisms for system services to actively stop running.
Innovation Solution
A system service control method where the system service actively requests to stop running when its reference count falls below a threshold, managed by a system service management module, releasing resources and reducing occupation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If system services continuously run to provide various services for users, then service availability is improved, but resource occupation increases causing freezing of foreground applications
Solution Approach 1:
The patent implements dynamic service management where system services can transition between running and stopped states based on reference counts. Services are dynamically started when needed and stopped when no longer required, converting the static resident service model into a dynamic one that adapts to actual usage conditions.
Solution Approach 2:
The patent introduces reference count as a control parameter to manage service lifecycle. When the reference count drops below a threshold, the service automatically stops running. This parameter-based control mechanism allows the system to adjust service states based on actual demand, resolving the contradiction between availability and resource consumption.
2Quantity of substance
If system services are stopped to release resources, then resource occupation is reduced, but service availability decreases
Solution Approach 1:
The patent implements a feedback mechanism where the service requester monitors the reference count of system services. When the reference count falls below the threshold, the requester triggers the service to stop running. This feedback loop ensures services are stopped only when actually needed, maintaining availability while reducing resource occupation.
Solution Approach 2:
The system service automatically manages its own lifecycle by monitoring its reference count and stopping when the count is below the threshold. This self-service mechanism eliminates the need for manual service management while ensuring resources are released when services are no longer needed, balancing availability and resource usage.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
This application provides a system service control method, an electronic device, and a readable storage medium. A system service management module receives a running stop request from a system service; in response to the running stop request, the system service management module determines a first node corresponding to the system service and a second node corresponding to the first node; the system service management module deletes the second node; the system service management module updates a reference count of the first node based on a quantity of deleted second nodes; and the system service updates a reference count of the system service and stops running when the reference count of the system service is less than a count threshold. In this application, the system service may actively request to stop running, to reduce occupation of a resource of the electronic device by the system service, and increase an available resource of the electronic device.