Method, device and computer program product for managing processes

By detecting the message queue attribute information in the task processing system, dynamically adjusting the number of processes, the problem of insufficient or overloading of resource use in different environments of the task processing system is solved, and the system performance optimization and stability is achieved.

CN112764892BActive Publication Date: 2025-01-17EMC IP HLDG CO LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201911001829.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-21
Publication Date
2025-01-17
Estimated Expiration
2039-10-21

AI Technical Summary

Technical Problem

Existing task processing systems have difficulty determining the maximum number of parallel processes they actually allow in different hardware and solution environments, resulting in waste of resources or system crashes.

Method used

By detecting tasks to be executed in the task processing system, determine attribute information related to message queue execution, such as read speed and speed change rate, dynamically adjust the number of processes to maximize resource usage, and avoid system crashes.

Benefits of technology

It realizes dynamically adjusting the number of processes according to the system's current processing capabilities, maximizing resource usage, maintaining good performance, and avoiding task processing system crashes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112764892B_ABST
    Figure CN112764892B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to methods, devices, and computer program products for managing processes. A method for managing processes is proposed, comprising: in response to detecting a task to be executed in a task processing system, determining attribute information related to the execution of a message queue in the task processing system; and based on the attribute information, determining allocation information for a process for executing the task. Through the embodiments of the present disclosure, the number of processes can be dynamically adjusted according to the current processing capacity of the task processing system, thereby maximizing the use of resources of the task processing system while avoiding the crash of the task processing system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure generally relate to the field of information processing, and more particularly to methods, devices, and computer program products for managing processes. Background Art

[0002] Massive / multiple parallel processing (MPP) systems, such as data protection systems, are capable of backing up a large number of devices simultaneously. However, the maximum number of parallel processes actually allowed by the system is affected by various factors, such as CPU, memory, disk input and output (IO), IO throughput, resource processors, network latency, the size of the data to be processed, the type distribution of the data to be processed, other processes running on the server, external system synchronization, and many more factors. Therefore, it is difficult to determine the maximum number of parallel processes actually allowed for a task processing system (e.g., a backup system) running on different hardware / solution environments of users.

[0003] In current task processing systems, the only solution for managing the number of parallel processes is to set a default maximum number of processes (also known as a hard-coded "magic number"), which is obtained through testing experience and cannot be applied to different deployment environments of users. There is currently no solution to this problem. Summary of the invention

[0004] Embodiments of the present disclosure provide a method, an apparatus, and a computer program product for managing a process.

[0005] In a first aspect of the present disclosure, a method for managing processes is provided. The method comprises: in response to detecting a task to be executed in a task processing system, determining attribute information related to execution of a message queue in the task processing system; and based on the attribute information, determining allocation information for a process for executing the task.

[0006] In a second aspect of the present disclosure, a device for managing processes is provided. The device includes: at least one processing unit; at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the at least one processing unit executes the instructions, the device performs an action, the action including: in response to detecting a task to be executed in a task processing system, determining attribute information related to execution of a message queue in the task processing system; and based on the attribute information, determining allocation information for a process for executing the task.

[0007] In a third aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored in a non-transient computer storage medium and includes machine executable instructions. The machine executable instructions, when executed by a device, cause the device to perform any step of the method described in the first aspect of the present disclosure.

[0008] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.

[0010] Figure 1 A block diagram illustrating an example task processing system in which embodiments of the present disclosure can be implemented;

[0011] Figure 2 A flowchart illustrating an example method for managing a process according to an embodiment of the present disclosure is shown;

[0012] Figure 3 A flowchart illustrating an example method for determining a speed at which a message queue is read according to an embodiment of the present disclosure;

[0013] Figure 4 A flowchart showing an example method for determining a rate of change of a speed at which a message queue is read according to an embodiment of the present disclosure is shown;

[0014] Figure 5A-5C A schematic diagram showing a curve of a speed at which a message queue is read and a speed change rate according to an embodiment of the present disclosure; and

[0015] Figure 6 A schematic block diagram of an example device that can be used to implement embodiments of the present disclosure is shown.

[0016] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0017] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0018] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0019] As mentioned above, the maximum number of parallel processes actually allowed by the task processing system is affected by various factors, such as CPU, memory, disk IO, IO throughput, resource processors, network latency, the size of the data to be processed, the type distribution of the data to be processed, other processes running on the server, external system synchronization, and many other factors. Therefore, it is difficult to determine the maximum number of parallel processes actually allowed for a task processing system (e.g., a backup system) running on different hardware / solution environments of the user.

[0020] In current task processing systems, the solution for managing the number of parallel processes is simply to set a default maximum number of processes (also known as a hard-coded "magic number"), which is obtained through testing experience. When deploying task processing systems in different environments of users, the default maximum number of processes may not be applicable to the customer's environment, which will cause serious problems. On the one hand, if the default maximum number of processes set is lower than the number of processes that the task processing system can actually run, the system's resources are wasted and may not meet the user's task processing needs. On the other hand, if the default maximum number of processes is higher than the capacity that the task processing system can carry, when tasks flow in and the resources occupied by the parallel task processing processes exceed the system capacity, the task processing system will be suspended due to insufficient computing resources. This may lead to more serious system crashes. For example, the task processing system hangs or crashes due to processing too many tasks at a specified time point. There is currently no solution to solve this problem.

[0021] The embodiments of the present disclosure provide a solution for managing processes to solve one or more of the above problems and other potential problems. The solution can dynamically adjust the number of processes according to the current processing capacity of the system, thereby maximizing the use of resources of the task processing system, maintaining good performance, and avoiding the crash of the task processing system.

[0022] Figure 1 1 shows a block diagram of an example task processing system 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, the task processing system 100 includes a process management device 110 and one or more running task execution devices 120-1 to 120-3 (collectively referred to as running task execution devices 120), and the task processing system 100 also includes a task execution device to be run 130. The various methods according to the embodiments of the present disclosure can be implemented at the process management device 110.

[0023] like Figure 1 As shown, the process management device 110 has allocated several running processes 140-1 to 140-3 (collectively referred to as running processes 140) to serve the running task execution device 120 (for example, to back up the data on the task execution device 120). When the process management device 110 detects that there is a task 160 to be executed in the task waiting queue 150, it can determine whether to allocate the process 170 to execute the task 160 on the task execution device 130 according to the attribute information related to the execution of the message queue 180. The message queue 180 can contain multiple messages 190-1 to 190-3 (collectively referred to as messages 190).

[0024] It should be understood that the structure of the task processing system 100 is described only for exemplary purposes, and does not imply any limitation on the scope of the present disclosure. For example, the embodiments of the present disclosure may also be applied to systems different from the task processing system 100. It should be understood that the specific numbers of the above-mentioned devices, processes, messages, and tasks are given only for illustrative purposes, and do not imply any limitation on the scope of the present disclosure.

[0025] In some embodiments, the task may be, for example, a backup task, which may be a task generated according to a predetermined policy that specifies when to perform a backup on which device or devices. The process management device 110 may be, for example, a computer, a virtual machine, a server, etc., and the present disclosure is not limited in this respect. The task execution device 120 is a device on which the task is to be performed. For example, a device that stores data, assets, etc. to be protected and to be backed up. The task execution device 120 may be, for example, a computer, a virtual machine, a server, etc., and the present disclosure is not limited in this respect. The process management device 110 and the task execution device 120 communicate with each other via a network, and the network may be, for example, the Internet, an intranet, etc.

[0026] Figure 2 2 is a flowchart of an example method 200 for managing a process according to an embodiment of the present disclosure. For example, the method 200 may be performed as follows: Figure 1 The method 200 is performed by the process management device 110 shown in the figure. It should be understood that the method 200 can also be performed by other devices, and the scope of the present disclosure is not limited in this respect. It should also be understood that the method 200 can also include additional actions not shown and / or can omit the actions shown, and the scope of the present disclosure is not limited in this respect.

[0027] The following combination Figure 1 and Figure 2 The method 200 will be described in detail.

[0028] At 210, the process management device 110 detects whether there is a task 160 to be executed in the task processing system 100. In some embodiments, the process management device 110 may periodically detect whether there is a task 160 to be executed in the task waiting queue 150 in the task processing system 110, and the task 160 to be executed may be placed in the waiting queue 150 according to a policy or a schedule. Alternatively or additionally, in other embodiments, the process management device 110 may receive a notification when the task 160 to be executed is generated. Additionally, in still other embodiments, the process management device 110 may receive a notification when the running process 140 is released, thereby detecting whether there is a task 160 to be executed in the waiting queue 150 at this time.

[0029] If the process management device 110 detects a task 160 to be executed, the process management device 110 determines attribute information related to the execution of the message queue 180 in the task processing system 100 at 220 .

[0030] In some embodiments, the message queue 180 may be in the process management device 110. Alternatively, in other embodiments, the message queue 180 may also be in other devices (not shown) in the task processing system 100. In some embodiments, the process management device 110 needs to use almost the same computing resources for processing each message 190, and is independent of any characteristics of the task itself. Additionally, in other embodiments, the message 190 may be information sent by the task execution device 120 to the process management device 110 indicating the status of the task being executed or the task that has been completed. Additionally, in some other embodiments, the process management device 110 may update the status and progress of the task being executed, synchronize the message to an external system, save the task that has been completed to a database, etc. based on the information read from the message 190.

[0031] In some embodiments, the attribute information related to the execution of the message queue 180 can be the speed at which the message queue 180 is read. As mentioned above, the process / thread 140 for executing a task requires various resources and is very complex, so it is difficult to directly measure the resource consumption of the process. However, the processing for each message 190 is almost the same and consumes almost the same computing resources. Therefore, the reading speed of the message queue 180 can indicate the processing performance of the task processing system 100 to the task.

[0032] Additionally or alternatively, in some other embodiments, the attribute information may be a rate of change of the speed at which the message queue 180 is read, which may indicate whether the speed at which the message queue 180 is read is accelerating or decelerating. How to determine the speed at which the message queue 180 is read and the rate of change of the speed will be described below. Figure 3 and Figure 4 Describe in detail respectively.

[0033] Additionally or alternatively, in some other embodiments, the attribute information may be the total number of messages 190 in the message queue 180 , and the total number may indicate whether there are any stuck messages in the message queue 180 .

[0034] At 230 , the process management device 110 determines allocation information for the process 170 for executing the task to be executed according to the attribute information.

[0035] In some embodiments, the process management device 110 can compare the speed at which the message queue 180 is read with a predetermined speed threshold. If the speed at which the message queue 180 is read is greater than the predetermined speed threshold, it means that the process management device 110 can carry more processes. The process management device 110 can then determine to assign a process 170 to the task.

[0036] Additionally or alternatively, in other embodiments, the process management device 110 may compare the speed change rate of the message queue 180 being read with a predetermined change rate threshold. If the speed change rate is greater than the predetermined change rate threshold, it means that the speed at which the message queue 180 is read is accelerating. Then, even if the speed at which the message queue 180 is read is not greater than the predetermined speed threshold, the process management device 110 may determine to assign the process 170 to the task. On the contrary, if the speed at which the message queue 180 is read is not greater than the predetermined speed threshold, and the speed change rate is not greater than the predetermined change rate threshold, it means that the speed at which the message queue 180 is read is slowing down, and the task processing system 100 is close to the maximum number of parallel processes that it can execute. Executing more tasks will not only not increase the overall processing speed, but will also reduce the processing speed of all tasks due to system crashes. Therefore, the process management device 110 may determine not to assign the process 170 to the task until the task being executed is completed and the running process 140 is released.

[0037] Additionally or alternatively, in some other embodiments, the process management device 110 may determine whether the total number of messages 190 in the message queue 180 is less than a predetermined number threshold. If the total number is less than the predetermined number threshold, it means that the message queue 180 maintains a good reading speed and the message 190 is not retained in the message queue 180. The process management device 110 can directly determine to assign the process 170 to the task.

[0038] Additionally, in some embodiments, the process management device 110 may periodically update the predetermined speed threshold mentioned above. Specifically, the process management device 110 may average multiple speeds at which the message queue 180 is read over a period of time as the predetermined speed threshold. Additionally or alternatively, in some other embodiments, in order to reduce the amount of calculation, the process management device 110 may calculate a new predetermined speed threshold based on the current predetermined speed threshold and the determined new speed each time a new speed at which the message queue 180 is read is determined. For example, the new predetermined speed threshold may be calculated using the following formula:

[0039] v0 new =(v0 old *N+v) / (N+1) (1)

[0040] where v0 old is the current predetermined speed threshold, N is the value that determines v0 old is the number of speeds used, and v is the new speed determined.

[0041] Additionally, in some embodiments, the update interval of the predetermined speed threshold can be optimized based on the difference between the current predetermined speed threshold and the new predetermined speed threshold. For example, if the new predetermined speed threshold is more than 5% different from the current predetermined speed threshold, the next update interval will be half of the current interval. Conversely, if the difference is less than 5%, the next update interval will be doubled. In this way, the cost of repeating the update in the user's system will eventually be minimized. It should be understood that the value of the difference is given for exemplary purposes only and does not imply any limitation on the scope of the present disclosure. The present disclosure is not limited in this respect.

[0042] In the above exemplary embodiment, by utilizing attribute information related to the execution of the message queue to determine whether to assign a process to a task, the number of processes can be dynamically adjusted according to the current processing capacity of the task processing system, thereby maximizing the use of resources of the task processing system and maintaining good processing performance while avoiding the crash of the task processing system.

[0043] Figure 3 1 shows a flow chart of an example method 300 for determining the speed at which a message queue is read according to an embodiment of the present disclosure. For example, the method 300 may be performed as follows: Figure 1 It should be understood that method 300 may also be performed by other devices, and the scope of the present disclosure is not limited in this respect. It should also be understood that method 300 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect.

[0044] At 310 , the process management device 110 determines the number of messages 190 that have been read from the message queue 180 within a predetermined period of time.

[0045] In some embodiments, the process management device 110 may record the length of the message queue 180 at this time, that is, the number of messages to be read in the message queue 180, each time the message 190 in the message queue 180 is read. Then, the process management device 110 may obtain the lengths of the message queue 180 recorded in a predetermined time period when a task 160 to be executed is detected as described in relation to 210, and then the process management device 110 may calculate the number of messages 190 read in the predetermined time period according to the change in the length of the message queue 180.

[0046] In addition, as mentioned in description 230, in some embodiments, if the process management device 110 determines that there is a length less than a predetermined number threshold among the lengths of the acquired message queue 180, it means that the message queue 180 maintains a good reading speed and the message 190 is not stuck in the message queue. The process management device 110 can directly determine to allocate the process 170 to execute the detected task 160 to be executed, without determining the number of messages 190 read from the message queue 180 within the predetermined time period.

[0047] At 320 , the process management device 110 determines the speed at which the message queue 180 is read based on the predetermined time period and number.

[0048] It is easy to understand that according to the predetermined time period and the number of messages read in the predetermined time period, the speed at which the message queue 180 is read can be obtained. For example, assuming that the predetermined time period is T and the number of messages read in the predetermined time period is M, the speed V at which the message queue 180 is read is determined to be V=M / T.

[0049] Alternatively or additionally, in other embodiments, the process management device 110 may determine multiple speeds at which the message queue 180 is read, and then determine an average speed based on the multiple speeds determined. For example, assuming that the predetermined time period is Ts, the process management device 110 may divide Ts into n time periods, represented by T1, T2, ..., Tn, respectively, and then calculate the speeds V1, V2, ..., Vn corresponding to the n time periods according to the method for calculating the speed mentioned above. The n speeds are averaged as the speed at which the message queue 180 is read.

[0050] Additionally, in some other embodiments, in order to improve computing efficiency, the process management device 110 can store the calculated speed and reuse the stored speed each time a task 160 to be executed is detected, and only calculate the speed at which the message queue is read after the previous detection.

[0051] In the above exemplary embodiments, by determining the speed at which the message queue is read, it is possible to indirectly measure the current resource consumption of the system.

[0052] Figure 4 4 is a flowchart of an example method 400 for determining a rate of change of a speed at which a message queue is read according to an embodiment of the present disclosure. For example, the method 400 may be performed as follows: Figure 1 The process management device 110 shown in FIG. 4 is executed. It should be understood that the method 400 can also be executed by other devices, and the scope of the present disclosure is not limited in this respect. It should also be understood that the method 400 can also include additional actions not shown and / or can omit the actions shown, and the scope of the present disclosure is not limited in this respect.

[0053] At 410, the process management device 110 obtains multiple speeds at which the message queue 180 is read. The multiple speeds correspond to different time periods, and each speed can be obtained through various implementations, such as using various methods similar to those described above with respect to 320. No further description is given here.

[0054] At 420, the process management device 110 determines the rate of change of the speed at which the message queue 180 is read according to the multiple speeds. In some embodiments, a linear fitting method can be used to determine the rate of change of the speed. For example, assuming that the predetermined time period is Ts, and the determined n speeds are V1, V2, ..., Vn, the linear fitting of the n speed samples can be calculated using the following formula:

[0055] f(x)=β0+β1x (2)

[0056] Where β0 and β1 are regression coefficients; x represents the index of the speed sample, i.e., 1, 2, ..., n; f(x) represents the determined n speeds, i.e., V1, V2, ..., Vn. Substituting x and f(x) into formula (2), the resulting β1 is the speed change rate. It should be understood that the linear fitting method for determining the speed change rate is described only for exemplary purposes and does not imply any limitation on the scope of the present disclosure. For example, the speed change rate may also be determined by other methods, and the present disclosure is not limited in this respect.

[0057] Table 1 below shows the speed and speed change rate at which the message queue is read and the allocation information determined therefrom in some embodiments.

[0058] Table 1

[0059] <![CDATA[v / v0]]> <![CDATA[β1]]> Whether to allocate a process >1 any yes <=1 >0 yes <=1 <=0 no

[0060] Wherein v is the speed at which the message queue described above in relation to 320 is read, and v0 is the predetermined speed threshold. β1 is the speed change rate at which the message queue described above in relation to 420 is read. Table 1 shows that when the speed at which the message queue is read is greater than the predetermined speed threshold, the process management device 110 determines to allocate a process to the task; when the speed at which the message queue is read is less than or equal to the predetermined speed threshold, whether to allocate a process is determined based on whether the speed change rate is greater than 0 or less than or equal to 0.

[0061] In the above exemplary embodiments, by determining the rate of change of the speed at which the message queue is read, the current actual processing capacity of the system can be better determined together with the speed at which the message queue is read.

[0062] Figure 5A-5CSchematic diagrams respectively show curves of the speed at which a message queue is read and the speed change rate according to an embodiment of the present disclosure.

[0063] like Figure 5A-5C As shown, the predetermined speed threshold is represented by curve 540. Figure 4 Linear fit curves for the described velocities are represented by 550, 560, and 570, respectively. Figure 5A The situation that the speed is less than the predetermined speed threshold and the speed is slowing down is shown. In this case, the process management device 110 will determine not to allocate the process 170 for the task. Figure 5B The case where the speed is less than the predetermined speed threshold and the speed is uniform is shown. In this case, the process management device 110 will also determine not to allocate the process 170 for the task. Figure 5C The situation where the speed is less than the predetermined speed threshold and the speed is increasing is shown. In this case, the process management device 110 will determine to allocate the process 170 to the task.

[0064] Figure 6 Schematic block diagram of an example device 600 that can be used to implement embodiments of the present disclosure is shown. Figure 1 The process management device 110 shown may be implemented by the device 600. Figure 6 As shown, the device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 602 or computer program instructions loaded from a storage unit 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0065] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0066] The various processes and processing described above, such as methods 200, 300, and 400, may be performed by the processing device 601. For example, in some embodiments, the methods 200, 300, and 400 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the CPU 601, one or more actions of the methods 200, 300, and 400 described above may be performed.

[0067] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0068] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination of the above. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0069] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0070] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0071] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0072] These computer-readable program instructions can be provided to a processing device of a general-purpose computer, a special-purpose computer or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing device of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0073] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0074] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0075] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for managing a process, comprising: detecting a task to be executed at a task processing system including a message queue and a plurality of task execution devices, wherein the message queue is populated with messages read corresponding to states of running tasks being executed by the plurality of task execution devices; as well as For each of a plurality of consecutive predetermined time periods, determining the number of messages in the message queue that are read within the corresponding predetermined time period, so as to calculate the speed at which the message queue corresponding to the corresponding predetermined time period is read; determining a rate of change of a speed at which the message queue is read based on each speed corresponding to each predetermined time period; as well as In response to determining that the rate of change of the speed at which the message queue is read is greater than a predetermined threshold of the rate of change of the speed at which the message queue is read, a process is allocated on a task execution device among the plurality of task execution devices to execute the task, and the task is executed on the process.

2. The method according to claim 1, further comprising: A total number of the messages in the message queue is determined.

3. An electronic device, comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform actions, the actions comprising: detecting a task to be executed at a task processing system including a message queue and a plurality of task execution devices, wherein the message queue is populated with messages read corresponding to states of running tasks being executed by the plurality of task execution devices; and For each of a plurality of consecutive predetermined time periods, determining the number of messages in the message queue that are read within the corresponding predetermined time period, so as to calculate the speed at which the message queue corresponding to the corresponding predetermined time period is read; Determining a rate of change of a speed at which the message queue is read based on each speed corresponding to each predetermined time period; and In response to determining that the rate of change of the speed at which the message queue is read is greater than a predetermined threshold of the rate of change of the speed at which the message queue is read, a process is allocated on a task execution device among the plurality of task execution devices to execute the task, and the task is executed on the process.

4. The apparatus of claim 3, wherein the actions further comprise: A total number of the messages in the message queue is determined.

5. A computer program product tangibly stored in a non-transitory computer storage medium and comprising machine executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1-2.

Citation Information

Patent Citations

  • A method and apparatus for configuring messages of a message queue

    CN109240836A

  • Task scheduling

    US20170109203A1