Task execution method, electronic device, and computer-readable storage medium
By setting a preset slice duration for the service processes of the Android system, controlling the duration of their execution of client tasks, and releasing the process after the duration is reached, the problem of low memory usage efficiency is solved, achieving more efficient memory management and system operation.
Patent Information
- Application Number
- CN202310268176.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2043-03-16
AI Technical Summary
The current Android system has low memory utilization efficiency and poor real-time performance in manual memory resource management, resulting in low system operating efficiency.
By allocating preset slice durations to service processes, the execution of client tasks by service processes is controlled, and service processes are released when the preset slice duration is reached. This allows for fine-grained control over memory allocation and release, preventing a single client task from occupying system memory for an extended period.
It improves the efficiency of system memory utilization, avoids single client tasks occupying memory for a long time, and enhances the real-time performance of system operation and the immediacy of memory management.
Smart Images

Figure CN116166442B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, and in particular, to a task execution method, an electronic device and a computer readable storage medium. BACKGROUND
[0002] At present, an Andriod system has become a universally adopted operating system. Generally, each application program under the operating system needs to occupy the memory of the Andriod system in a running process. In the running process of the application program, when any interface is opened and executed, all data of the interface is stored into the memory. The memory occupied by the interface of the application program in the Andriod system is a kind of stack cumulative memory management mode, and the memory occupied by the application program will be continuously increased along with the accumulation of the number of opened interfaces. In order to efficiently utilize the valuable memory resource and improve the performance of the program, the memory resource still needs to be manually managed, and the memory needs to be applied and released at a proper time.
[0003] However, the instantaneity of the manual management of the memory resource is poor, and in order to keep a good running environment for the Andriod system in real time, an automatic memory usage method with strong real-time performance is still needed. However, the system memory usage efficiency in the Andriod system in the prior art is low. SUMMARY
[0004] The purposes of the present application include, for example, providing a task execution method, an electronic device and a computer readable storage medium, which can improve the usage efficiency of the system memory.
[0005] Embodiments of the present application can be implemented as follows:
[0006] In a first aspect, the present application provides a task execution method, comprising: creating a client task according to a task request sent by a client; allocating a service process to the client task, controlling the service process to execute the client task; when the time length of the service process executing the client task reaches a preset slice time length, releasing the service process, and allocating the service process to another client task.
[0007] In a second aspect, the present application provides an electronic device, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the task execution method according to any one of the preceding embodiments.
[0008] In a third aspect, the present application provides a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the task execution method in any of the preceding embodiments.
[0009] Compared with the prior art, in the task execution method, the electronic device and the computer readable storage medium provided by the embodiments of the present application, after the context information data receives the task request sent by the client, the corresponding client task is created according to the task request, and a service process is allocated to the client task. During the process of controlling the service process to execute the client task, the system memory is applied to support the normal operation of the service process according to the demand of the client task. When the duration of the service process executing the client task reaches the preset slice duration, the service process is released. At this time, the system memory applied by the service process for executing the client task is released after the service process is released. Then, the service process is allocated to another client task. The service process applies the system memory according to the demand of another client task and executes another client task again. The maximum duration of the service process executing a single client task is controlled by the preset slice duration. The system memory occupied during the process of executing the client task cannot be released for a long time due to the long occupation of the service process by a single client task. The application and release of the system memory are fine controlled. The use efficiency of the system memory is improved.
[0010] In an optional embodiment, before the service process is released, the method further includes: in response to the client task not being executed completely, transferring service data stored in the private memory of the service process to the public memory.
[0011] In an optional embodiment, the transferring of the service data stored in the private memory of the service process to the public memory includes: transferring the service data to the context buffer and the large page buffer of the public memory.
[0012] In an optional embodiment, after the service data is transferred to the context buffer and the large page buffer of the public memory, the method further includes: judging whether the remaining capacity of the context buffer and the large page buffer is lower than a preset capacity; if the remaining capacity of the context buffer and the large page buffer is lower than the preset capacity, transferring at least part of the data stored in the context buffer and the large page buffer to the context file and the large page file of the swap memory.
[0013] In an optional embodiment, the controlling the service process to execute the client task comprises: dividing context memory in the private memory, extracting context information from the client task; judging whether the context memory is sufficient to store the context information data; if the context memory is not sufficient to store the context information data, allocating extended memory for the service process, the extended memory being located in the public memory, storing the context information data in the extended memory and the context memory; if the context memory is sufficient to store the context information data, storing the context information data in the context memory.
[0014] In an optional embodiment, after the allocating the extended memory for the service process, the method further comprises: judging whether the context memory and the extended memory are sufficient to store the context information data; if the context memory and the extended memory are not sufficient to store the context information data, allocating at least part of heap memory for the service process, the heap memory being located in the private memory, storing the context information data in the context memory, the extended memory and the heap memory.
[0015] In an optional embodiment, before the controlling the service process to execute the client task, the method further comprises: judging whether target service data related to the client task exists in the public memory; if the target service data exists in the public memory, transferring the target service data to the private memory of the service process.
[0016] In an optional embodiment, the method further comprises: presetting a service process pool, the service process pool being used to store the service process; presetting a client task pool, the client task pool being used to store the client task; the ratio of the maximum storage capacity of the service process pool to the maximum storage capacity of the client task pool being greater than 8% and less than 12%. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without paying creative labor on the basis of these drawings.
[0018] Figure 1 a flowchart of the task execution method provided by the first embodiment of the present application;
[0019] Figure 2 a flowchart of the task execution method provided by the second embodiment of the present application;
[0020] Figure 3 A structural schematic diagram of an electronic device provided by the third embodiment of the present application is shown in the figure.
[0021] Figure 4 A structural schematic diagram of an electronic device provided by the fourth embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0022] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0023] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.
[0024] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0025] In the description of the present application, it should be noted that if the terms "upper", "lower", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship when the product of the present application is usually placed, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, therefore, it cannot be understood as a limitation on the present application.
[0026] In addition, if the terms "first", "second" and the like appear, they are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0027] It should be noted that the features in the embodiments of the present application can be combined with each other without conflict.
[0028] The first embodiment of the present application provides a task execution method applied to an electronic device, specifically as shown in the figure, comprising the following steps: Figure 1
[0029] Step S101: creating a client task according to the task request sent by the client.
[0030] Specifically, in the embodiment, the electronic device runs a listener program, and the listener program can create a client task according to a received task request after receiving a task request sent by a client.
[0031] Step S102: allocating a service process to the client task, and controlling the service process to execute the client task.
[0032] Specifically, in the embodiment, the service process is pre-created when the electronic device is initialized and stored in the storage space of the electronic device, and the electronic device calls the pre-created service process from the storage space after creating the client task, allocates the service process to the client task, and then controls the service process to execute the client task. The pre-set service process is stored in the storage space of the electronic device, and can be directly called after the client task is created, without creating the service process in real time, so as to improve the allocation rate of the service process and the overall task execution efficiency. It can be understood that the pre-created service process is pre-created when the electronic device is initialized and stored in the storage space of the electronic device, which is only a specific example in the embodiment and does not constitute a limitation. In other embodiments of the application, the service process can also be created in real time after the client task is created, and the specific settings can be flexibly made according to actual needs.
[0033] Further, in this step, the service process executes the client task in one-to-one, that is, in the process of executing one client task, the service process no longer executes other client tasks.
[0034] The service process applies a memory region in the memory as private memory according to the requirement of the client task in the process of being assigned to execute the client task, each service process has its own independent private memory, and the private memory corresponds to public memory, the public memory is a memory region common to all service processes. For the private memory, the private memory can be divided into context memory, large page memory, stack memory, and heap memory according to different functions; for the public memory, the public memory is divided into context buffer region, large page buffer region, and extension memory region according to different functions. The context memory saves the related information of the client task; the large page memory saves the large object data used by the client task, which can be pictures, audio and video stream files, binary files, etc.; the stack memory is used to store some temporarily used variables, which are used for a short time and can be released immediately after use; the heap memory stores the same information as the extension memory in the public memory, and is used only when the extension memory in the public memory is exhausted, that is, the heap memory is allocated and released as needed, that is, the heap memory is not pre-allocated when the service program starts, and the heap memory is allocated only when the extension memory is used up and still needs memory. That is, the extension memory is a pre-allocated memory in the public memory, and the heap memory is allocated only when the extension memory is used up and still needs memory. The size of the extension memory can be set by the system parameter extend_all, that is, the memory size of the extension memory is set by setting the value of the system parameter extend_all. At the same time, when the heap memory is used up, it is also released by the program.
[0035] In the embodiment, when the service process executes a client task, the order of memory allocation is as follows. First, the context memory is divided in the private memory, and then the context information data is extracted from the client task. The context information data can include: account information associated with the client task, parameter information transmitted in and out, intermediate data information of the execution process, and other information data. Then, it is judged whether the context memory is sufficient to store the context information data, if the context memory is not sufficient to store the context information data, the extension memory is allocated to the service process, the extension memory is located in the public memory, and the context information data is stored in the extension memory and the context memory; if the context memory is sufficient to store the context information data, the context information data is stored in the context memory.
[0036] It can be understood that the foregoing is only an example of the use of memory by the service process when executing a client task in the embodiment, and does not constitute a limitation, in other embodiments of the application, the service process can also use other methods to use the memory, which can be flexibly set according to actual needs.
[0037] For example, in an embodiment of the present application, the initial part of the context memory in the private memory can also be used by the service process to store the context information data of the client task. When the initial part of the context memory is insufficient to store the context information data of the client task, the service process uses the extended memory in the public memory to store the context information data of the client task. If the initial part of the context memory in the private memory and the extended memory in the public memory are still insufficient to store the context information data of the client task, the service process uses the remaining part of the context memory in the private memory. If the context memory in the private memory and the extended memory in the public memory are still insufficient to store the context information data of the client task, the service process uses the heap memory of the private memory. If the heap memory of the private memory is still insufficient to store the context information data of the client task, the service process directly terminates the execution of the current client task and releases all the previously applied memories. At this time, the service process is released by the current client task after terminating the execution of the current client task and can be allocated to execute other client tasks. Saving the context memory allocated to the client task in the extended memory of the public memory instead of swapping to the physical file of the operating system can effectively improve the task execution efficiency.
[0038] Further, in an embodiment of the present application, before the service process executes the client task, it is determined whether the target service data related to the client task exists in the public memory. If the target service data exists in the public memory, the target service data is stored in the private memory of the service process. The target service data is the service data stored in the public memory by the last service process for executing the client task.
[0039] Step S103: Releasing the service process when the duration of the service process executing the client task reaches the preset slicing duration.
[0040] Specifically, in order to avoid that a single client task occupies a certain service process for a long time, in the embodiment, the preset slicing duration is set for each service process. The preset slicing duration limits the maximum single running duration of a client task in a certain service process. Once the duration of the service process executing a certain client task reaches the preset slicing duration, the service process stops executing the client task and is released to the storage space of the electronic device to wait for the next task allocation.
[0041] Further, in some embodiments of the present application, the duration of the preset slicing duration can be set by the system parameter time-slicing, that is, the size of the preset slicing duration is set by adjusting the system parameter time-slicing in advance.
[0042] Further, in some embodiments of the present application, if the user does not adjust the system parameter time-slicing to set the size of the preset slice duration, the system sets the preset slice duration as a system default duration, which can be 10 milliseconds for example. It can be understood that the system default duration of 10 milliseconds is only a specific example in the embodiments of the present application, and in other embodiments of the present application, the system default duration can also be 5 milliseconds, 12 milliseconds, 18 milliseconds or other values.
[0043] Preferably, in the present embodiment, when the service process executes the client task for a duration reaching the preset slice duration, before releasing the service process, if the client task has not been executed completely, the service data stored in the private memory will be transferred to the public memory, wherein the service data includes all data generated by executing the current client task and all data required for continuing to execute the current client task. Before releasing the service process, transferring the service data stored in the private memory to the public memory facilitates the current client task to be continued to be executed by other service processes subsequently. If the client task has been executed completely, the private memory is released completely and the client task is ended.
[0044] Specifically, in an embodiment of the present application, transferring the service data stored in the private memory to the public memory specifically means transferring the service data to the context buffer and the large page buffer of the public memory. Specifically, the data stored in the context memory of the private memory is saved to the context buffer of the public memory, and the data stored in the large page memory of the private memory is saved to the large page buffer of the public memory. In this way, when other service processes continue to process the current client task subsequently, the data stored in the large page buffer of the public memory can be quickly transferred to the large page memory of the private memory, and the data stored in the context buffer of the public memory can be quickly transferred to the context memory of the private memory, which facilitates the processing of the service processes on the client task and improves the efficiency of the task execution method as a whole.
[0045] Preferably, in an embodiment of the present application, after the service data is stored in the context buffer and the large page buffer of the public memory, it is further determined whether the remaining capacity of the context buffer and the large page buffer is lower than a preset capacity. If the remaining capacity of the context buffer and the large page buffer is lower than the preset capacity, at least part of the data stored in the context buffer and the large page buffer is stored in the context file and the large page file of the swap memory. The swap memory is a memory space corresponding to the physical memory, and the physical memory and the swap memory are physical storage spaces arranged in parallel in the electronic device. The physical memory is provided by a ram chip in the electronic device, and the swap memory is provided by a flash memory. The public memory and the private memory are different storage areas in the physical memory, and the context file and the large page file are stored in the swap memory. The preset capacity is a preset minimum value of the remaining capacity of the context buffer and the large page buffer. When the remaining capacity of the context buffer and the large page buffer is less than the preset capacity, the context buffer and the large page buffer can not continue to store new service data. At this time, at least part of the data stored in the context buffer and the large page buffer is stored in the context file and the large page file of the swap memory, and the storage space in the context buffer and the large page buffer is released, so as to facilitate other service processes to store service data in the context buffer and the large page buffer.
[0046] Further, in an embodiment of the present application, the total size of the extended memory quota available to a single client task is controlled by the parameter context_extend_quota. The initial value of the context memory of a single client task is controlled by the parameter context_init. In some embodiments of the present application, if the user does not adjust the system parameter context_init to set the initial value of the context memory, the system sets the initial value of the context memory as a system default size, which can be 512 KB, for example. It can be understood that the system default size of 512 KB is only a specific example in an embodiment of the present application, and in other embodiments of the present application, the system default size can also be 256 KB, 1028 KB, 2056 KB, or other values. The maximum value of the context memory of a single client task is controlled by the parameter context_all. The size of the context file is set by the parameter max_context_file_size, and the size of the large page file is set by the parameter max_largepage_file_size.
[0047] It can be understood that the foregoing is only an example of the case that the duration of the service process executing the client task reaches the preset slice duration and the client task is not executed completely, and in other embodiments of the present application, if the client task is executed completely before the preset slice duration of the service process is exhausted, the service process directly releases all the memory previously applied and is released into the storage space of the electronic device to wait for the next task allocation.
[0048] Step S104: allocating the service process to another client task.
[0049] Compared with the prior art, in the task execution method provided by the embodiment one of the present application, after receiving the task request sent by the client, the corresponding client task is created according to the task request, and the service process is allocated to the client task, and in the process of controlling the service process to execute the client task, the system memory is applied according to the demand of the client task to support the normal operation of the service process, and when the duration of the service process executing the client task reaches the preset slice duration, the service process is released, at this time, the system memory applied by the service process for executing the client task is released after the service process is released, then the service process is allocated to another client task, and the service process applies the system memory according to the demand of another client task and executes another client task; the maximum duration of the service process executing a single client task is controlled by the preset slice duration, which avoids the single client task occupying the service process for a long time and occupying the system memory for a long time in the process of executing the client task, and the application and release of the system memory are fine controlled, and the use efficiency of the system memory is improved.
[0050] The embodiment two of the present application provides a task execution method, and specific steps are as shown in Figure 2 The embodiment two of the present application provides a task execution method, and specific steps are as shown in
[0051] Step S201: presetting a service process pool.
[0052] Specifically, in this step, the service process pool is a storage area divided from the memory of the electronic device, and the service process pool is used to store the service process. After the service process is created, the service process is stored in the service process pool, and when the service process is allocated to execute the client task, the service process is first called out from the service process pool, and when the service process is released under the condition that the client task is executed and the duration of executing the client task reaches the preset slice duration, the service process is stored in the service process pool again.
[0053] Step S202: presetting a client task pool.
[0054] Specifically, in the present step, the client task pool is a piece of storage area divided from the memory of the electronic device, and the client task pool is used to store the client task. After the client task is created, the client task is stored in the client task pool. When the client task is assigned to the service process, the client task is first called out from the client task pool, and when the service process executes the client task to the preset slice duration, the client task is stored in the client task pool again.
[0055] In the present step, the ratio of the maximum storage capacity of the service process pool to the maximum storage capacity of the client task pool is greater than 8% and less than 12%.
[0056] Step S203: creating a client task according to the task request sent by the client.
[0057] Step S204: assigning a service process to the client task, and controlling the service process to execute the client task.
[0058] Step S205: releasing the service process when the duration of the service process executing the client task reaches the preset slice duration.
[0059] Step S206: assigning the service process to another client task.
[0060] It can be understood that steps S203 to S206 in the present embodiment are substantially the same as steps S101 to S104 in the first embodiment, and specific descriptions can be referred to the foregoing embodiments, which will not be described here.
[0061] Compared with the prior art, the task execution method provided by the second embodiment of the present application retains all the technical features of the first embodiment, and therefore has all the technical effects of the first embodiment. In addition, in the second embodiment of the present application, the preset service process pool is used to store the service process, the preset client task pool is used to store the client task, and the ratio of the maximum storage capacity of the service process pool to the maximum storage capacity of the client task pool is greater than 8% and less than 12%, so that a small amount of service processes can serve a large number of client tasks.
[0062] Specifically, in order to execute the task execution method provided in the foregoing embodiments, the third embodiment of the present application provides an electronic device, and the specific structure is as follows Figure 3As shown, a listener program S1 runs in the electronic device, the listener program S1 can create customer tasks 1, 2, 3, 4…n according to the received task request after receiving the task request sent by the client, the customer tasks 1, 2, 3, 4…n are stored in a customer task pool S2 after being created, a service process pool S3 is arranged in the electronic device, and service processes 1, 2…m are stored in the service process pool S3, the service processes 1, 2…m are pre-created and stored in the service process pool S3 when the electronic device is initialized, the pre-created service processes 1, 2…m are called out from the service process pool S3 after the customer tasks 1, 2, 3, 4…n are created, the service processes 1, 2…m are allocated to the customer tasks 1, 2, 3, 4…n, and then the service processes are controlled to execute the customer tasks. In the process of executing the customer tasks by the service processes, data interaction is performed with the private memory S4, the public memory S5 and the exchange memory S6 in the electronic device. As described in the foregoing embodiments, the private memory S4 includes context memory, large page memory, stack memory and heap memory, the public memory S5 includes context buffer area, large page buffer area and extended memory area, and the exchange memory S6 includes context file and large page file.
[0063] Embodiment four of the present application relates to an electronic device, such as Figure 4 As shown, at least one processor 401 and a memory 402 connected with the at least one processor 401 are included, the memory 402 stores instructions executable by the at least one processor 401, and the instructions are executed by the at least one processor 401 to enable the at least one processor 401 to perform the task execution method in each of the above embodiments.
[0064] The memory and the processor are connected in a bus manner, the bus can include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage stabilizers and power management circuits together, which are well known in the art, and therefore, they will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements such as multiple receivers and transmitters, which provide units for communicating with various other devices on the transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives data and transmits the data to the processor.
[0065] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management and other control functions. And the memory can be used to store the data used by the processor during execution.
[0066] Embodiment five of the present application relates to a computer readable storage medium storing a computer program. The computer program is executed by a processor to implement the above method embodiments.
[0067] That is, a person skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by a program instructing related hardware, the program is stored in a storage medium, and includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the various embodiments of the method of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0068] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A task execution method characterized by, The method comprises: creating a client task according to a task request sent by a client; allocating a service process for the client task, and controlling the service process to execute the client task; when the service process executes the client task for a preset slice duration, releasing the service process and allocating the service process to another client task; wherein, before the service process is released, the method further comprises: in response to the client task not being executed completely, transferring service data stored in a private memory of the service process to a public memory; the transferring of the service data stored in the private memory of the service process to the public memory comprises: transferring the service data to a context buffer and a large page buffer of the public memory; after the service data is transferred to the context buffer and the large page buffer of the public memory, the method further comprises: judging whether remaining capacities of the context buffer and the large page buffer are lower than a preset capacity; if the remaining capacities of the context buffer and the large page buffer are lower than the preset capacity, transferring at least part of data stored in the context buffer and the large page buffer to a context file and a large page file of a swap memory.
2. The task execution method according to claim 1, wherein the controlling of the service process to execute the client task comprises: dividing a context memory in the private memory, and extracting context information data from the client task; judging whether the context memory is sufficient to store the context information data; if the context memory is not sufficient to store the context information data, allocating an extended memory for the service process, the extended memory being located in the public memory, and storing the context information data into the extended memory and the context memory; if the context memory is sufficient to store the context information data, storing the context information data into the context memory.
3. The task execution method according to claim 2, wherein after the extended memory is allocated for the service process, the method further comprises: judging whether the context memory and the extended memory are sufficient to store the context information data; if the context memory and the extended memory are not sufficient to store the context information data, allocating at least part of heap memory for the service process, the heap memory being located in the private memory, and storing the context information data into the context memory, the extended memory and the heap memory.
4. The task execution method according to claim 1, wherein before the service process is controlled to execute the client task, the method further comprises: judging whether target service data related to the client task exists in a public memory; if the target service data exists in the public memory, transferring the target service data to a private memory of the service process.
5. The task execution method according to claim 1, wherein the method further comprises: presetting a service process pool, the service process pool being used to store the service process; presetting a client task pool, the client task pool being used to store the client task; a ratio of a maximum storage capacity of the service process pool to a maximum storage capacity of the client task pool is greater than 8% and less than 12%.
6. An electronic device, comprising: The system comprises: at least one processor; and a memory in communication connection with the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the task execution method in any one of claims 1 to 5.
7. A computer readable storage medium storing a computer program, wherein the computer program comprises program instructions configured to cause a processor to perform the method according to any one of claims 1 to 6. The computer program is executed by the processor to implement the task execution method in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for carrying out recycling treatment to course in application program
CN105468438A
Application rapid booting method and terminal
CN106844033A
Memory space management method and memory space management device
CN115543600A