Task scheduling method, device, electronic device and storage medium
By applying for a sub-token pool from the main token pool in the server and stealing unowned tokens, it solves the problem of server resource scheduling in clinical research, achieves efficient execution of task queues and rational utilization of resources, and avoids waste of resources and service Not available.
Patent Information
- Application Number
- CN202210508667.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-05-10
AI Technical Summary
In clinical research, servers may cause resource waste or service unavailability when processing low-frequency peak services. It is difficult for existing technology to effectively schedule resources to deal with this situation.
By applying for a sub-token pool from the main token pool of the server, and stealing unowned tokens from the main token pool when the sub-token pool is empty, to execute sub-tasks of the task queue, ensuring that the task queue can efficiently utilize server resources. , to avoid resource waste and service unavailability.
It achieves efficient execution of task queues, rationally utilizes server resources, avoids resource waste and service unavailability, and improves server task execution efficiency.
Smart Images

Figure CN114896040B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer data processing technology, and specifically relates to a task scheduling method, device, electronic device and storage medium. Background Art
[0002] The process of clinical research is accompanied by a large amount of logic for subject migration, reporting, and report export. The frequency of this part of the business is low, but it usually occurs in a concentrated manner, which puts a lot of pressure on the server in a short period of time. If a large number of servers are prepared to provide services for this type of business, there may be a waste of resources; if too few servers are prepared, the service may be unavailable during business peaks.
[0003] The information disclosed in this background technology section is only intended to increase the understanding of the overall background of the application and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0004] The purpose of the present application is to provide a task scheduling method, which is used to solve the problem that improper server configuration quantity may cause resource waste or service unavailability.
[0005] To achieve the above object, the present application provides a task scheduling method, the method comprising:
[0006] Applying for a sub-token pool of the current task queue from the main token pool of the server, wherein the server executes the sub-task of the current task queue in response to the token in the sub-token pool;
[0007] When the sub-token pool is empty, an ownerless token is stolen from the main token pool for the server to execute the subtask of the current task queue, wherein the ownerless token is a token in the main token pool that is not marked to a sub-token pool.
[0008] In one or more embodiments of the present application, applying for a sub-token pool of the current task queue from the main token pool of the server specifically includes:
[0009] Determine whether the number of unowned tokens in the master token pool is less than the number of token applications in the current task queue; if so,
[0010] The ownerless tokens in the main token pool are marked to the sub-token pool.
[0011] In one or more embodiments of the present application, when the number of tokens in the sub-token pool is less than the application amount of the current task queue, the method further includes:
[0012] Determine whether there is a newly added unowned token in the master token pool; if so,
[0013] The newly added ownerless tokens in the main token pool are marked to the sub-token pool until the number of tokens marked to the sub-token pool is equal to the token application amount of the current task queue.
[0014] In one or more embodiments of the present application, at least when the sub-token pool is empty, stealing an unowned token from the main token pool for the server to execute the subtask of the current task queue specifically includes:
[0015] When the sub-token pool is empty, determine whether there is an ownerless token in the main token pool; if so,
[0016] Based on the current sub-token pool application status of the main token pool, steal unowned tokens from the main token pool.
[0017] In one or more embodiments of the present application, based on the current application status of the sub-token pool of the main token pool, stealing the ownerless token from the main token pool specifically includes:
[0018] When the number of unowned tokens in the current main token pool is greater than the number of token applications in the sub-token pool, unowned tokens are stolen from the main token pool.
[0019] In one or more embodiments of the present application, the method further includes:
[0020] Determine the size of the sub-token pool corresponding to the task queue based on the priority and / or task size of the current task queue; and / or,
[0021] The initial number of tokens in the main token pool is equal to the number of subtasks that can be processed in parallel by the server.
[0022] In one or more embodiments of the present application, the method further includes:
[0023] After all subtasks of the current task queue are executed, the ownership of the sub-token pool is returned to the main token pool.
[0024] In one or more embodiments of the present application, after any subtask in the current task queue is executed, the method further includes:
[0025] According to the ownership of the token corresponding to the executed subtask, the corresponding token is returned to the sub-token pool or the main token pool.
[0026] The present application also provides a task scheduling device, the task scheduling device comprising:
[0027] An application module, used for applying for a sub-token pool of a current task queue from a main token pool of a server, wherein the server executes a sub-task of the current task queue in response to a token in the sub-token pool;
[0028] A stealing module is used to steal an ownerless token from the main token pool when the sub-token pool is empty, so that the server can execute the subtask of the current task queue, wherein the ownerless token is a token in the main token pool that is not marked to the sub-token pool.
[0029] The present application also provides an electronic device, including:
[0030] at least one processor; and
[0031] A memory storing instructions, which, when executed by the at least one processor, enables the at least one processor to execute the task scheduling method as described above.
[0032] The present application also provides a machine-readable storage medium storing executable instructions, which, when executed, enable the machine to execute the task scheduling method as described above.
[0033] Compared with the prior art, according to the task scheduling method of the present application, by applying for a sub-token pool for the current task queue, the server can respond to the tokens in the sub-token pool to execute the sub-tasks of the current task queue; when the sub-token pool is empty, it can also steal unowned tokens from the main token pool so that the server can execute the sub-tasks of the current task queue; in this way, no task queue will occupy all server resources and cause other task queues to be locked, and each task queue can decide whether to steal the unowned tokens in the main token pool according to the execution status of its own sub-tasks, so as to reasonably utilize the idle resources of the server and maximize the task execution efficiency of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a schematic diagram of a server processing a single task queue in scenario 1 provided in this application;
[0035] Figure 2 It is a schematic diagram of a server processing multiple task queues in scenario 1 provided in this application;
[0036] Figure 3 This is a schematic diagram of a server processing a single task queue in scenario 2 provided by this application;
[0037] Figure 4 It is a schematic diagram of a server processing multiple task queues in scenario 2 provided by this application;
[0038] Figure 5is a flowchart of a task scheduling method according to an embodiment of the present application;
[0039] Figure 6 is a timing diagram of a task scheduling method according to an embodiment of the present application;
[0040] Figure 7 A module diagram of a task scheduling device according to an embodiment of the present application;
[0041] Figure 8 It is a hardware structure diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] The present application will be described in detail below in conjunction with the various embodiments shown in the accompanying drawings. However, these embodiments do not limit the present application, and any structural, methodological, or functional changes made by a person of ordinary skill in the art based on these embodiments are all within the scope of protection of the present application.
[0043] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] Currently, servers are usually controlled by the dynamic consumption of message queues (MQ). The server here can also be a virtual server (such as a server instance), which contains basic components such as CPU, operating system, network configuration, disk, etc. The functions of these components can be realized by actual physical resources.
[0045] A server can include n execution units (workers) at the same time. A task queue will contain multiple subtasks, and each execution unit in the server can only execute one subtask in the task queue at the same time.
[0046] If the number of subtasks to be executed in the task queue is greater than n, the server will execute the first n subtasks in the task queue at the beginning; then, when any subtask is completed, the server will read the next subtask in the task queue and configure it to the idle execution unit at this time, and repeat this process until all subtasks in the task queue are executed.
[0047] Ginseng Figure 1 and Figure 2 In scenario 1, the server can execute each task queue in order at full speed. For example, if the number of subtasks in task queue 1 is greater than the number of execution units n in the server, the server will use all the execution units for consumption of task queue 1; at this time, if task queue 2 arrives, since the subtasks in task queue 1 have not been completed, task queue 2 needs to wait until the number of concurrent subtasks in task queue 1 is less than n before it can be executed by the server.
[0048] Ginseng Figure 3 and Figure 4 In scenario 2, the server can assign a specified execution unit to each task queue. For example, when task queue 1 arrives, the server will assign execution units 1 to m to task queue 1, and task queue 1 can only use execution units 1 to m to execute its subtasks; similarly, when task queue 2 arrives, the server will assign execution units m+1 to m+k to task queue 2, and task queue 2 can only use execution units m+1 to m+k to execute its subtasks.
[0049] It can be seen that in scenario 1, the server has been running at full speed with high efficiency, but if tasks burst out in a concentrated manner, some task queues may be blocked; in scenario 2, the server is equally friendly to each task queue, but if the number of subtasks in the task queue is small, the server resources will not be fully utilized and the execution efficiency of the task queue will not be high.
[0050] With reference Figure 5 and Figure 6 , introduces an embodiment of the task scheduling method of the present application. In this embodiment, the method includes:
[0051] S11. Apply for the sub-token pool of the current task queue from the main token pool of the server.
[0052] Each server is configured with a corresponding main token pool, which stores a set number of tokens. The token is the "credential" for calling the server to execute a subtask in the task queue. Therefore, the number of tokens in the main token pool can be determined by the number of subtasks that the server can process in parallel.
[0053] In one embodiment, the initial number of tokens in the main token pool is equal to the number of subtasks that the server can process in parallel. For example, if the server includes n execution units, indicating that the server can process n subtasks in parallel, then n tokens can be configured for the main token pool of the server.
[0054] When a current task queue applies for server execution, a sub-token pool corresponding to the current task queue is applied from the main token pool in the server. The sub-token pool is exclusive to the current task queue. That is, for the sub-token pool, the corresponding task queue has the highest scheduling right for the tokens therein.
[0055] The size of the sub-token pool can be determined based on the priority and / or task size of the current task queue, for example: the number of token applications in the sub-token pool = α*task queue priority + β*task queue size, where α is the sub-token number impact factor associated with the task queue priority, and β is the sub-token number impact factor associated with the task queue size.
[0056] In a specific implementation, the corresponding number of unowned tokens in the main token pool may be marked according to the token application amount of the current task queue, and the mark is uniquely corresponding to the current task queue, and the collection of these marked tokens can be regarded as the sub-token pool of the task queue. Unowned tokens are tokens in the main token pool that are not marked to the sub-token pool, and these tokens do not belong exclusively to any sub-token pool, so unowned tokens can be marked to the applied sub-token pool or called by other possible operation requests.
[0057] When applying for a sub-token pool of the current task queue from the main token pool, it is necessary to consider whether the number of unowned tokens in the main token pool is sufficient. Therefore, it is first necessary to determine whether the number of unowned tokens in the main token pool is less than the token application amount of the current task queue. If not, it means that there are sufficient unowned tokens in the main token pool, and the corresponding number of unowned tokens in the main token pool can be directly marked to the sub-token pool.
[0058] If the number of unowned tokens in the main token pool is less than the token application amount of the current task queue, it means that the number of unowned tokens in the main token pool cannot meet the needs of the sub-token pool, and the unowned tokens in the main token pool will be marked to the sub-token pool first. In this case, the subtasks in the task queue can first use the existing tokens in the sub-token to apply for server resources. At the same time, it will continue to determine whether there are new unowned tokens in the main token pool. If so, the newly added unowned tokens in the main token pool will continue to be marked to the sub-token pool until the number of tokens marked to the sub-token pool is equal to the token application amount of the current task queue.
[0059] In an exemplary task queue execution process, a token may be issued from the sub-token pool for each sub-task currently applied for execution, and the execution unit in the server responds to these tokens and executes the assigned sub-task.
[0060] S12. When the sub-token pool is empty, steal an ownerless token from the main token pool for the server to execute the subtask of the current task queue.
[0061] The sub-token pool is empty, which proves that there are no unused tokens in the current task queue. In this scenario, the tokens in the sub-token pool have been fully occupied by the sub-tasks being executed in the current task queue.
[0062] From the user's perspective, they can usually only feel the execution speed and progress of the entire task queue, and are not sensitive to the execution of specific subtasks in the task queue. Correspondingly, in this scenario, the current task queue already has subtasks being executed or completed, and the user can also perceive that the task queue is being executed. The attempt to steal the ownerless token from the main token pool is to further improve the execution efficiency of the current task queue.
[0063] Specifically, when the sub-token pool is empty, it is determined whether there are any ownerless tokens in the main token pool; if so, based on the sub-token pool application status of the current main token pool, the ownerless tokens are stolen from the main token pool.
[0064] For server, during business peak period, it may need to execute multiple task queues simultaneously. For embodiment of the present application, each task queue, before execution, will apply for corresponding sub-token pool. In some scenes, when a task queue needs to steal ownerless token from main token pool, another or more task queues may apply for sub-token pool from main token pool.
[0065] In such a scenario, from the perspective of user perception, if the priority of the task queue to steal the ownerless token from the main token pool is higher than the priority of the task queue to apply for the sub-token pool from the main token pool, two situations may occur:
[0066] Case 1
[0067] If the current task queue steals all the unowned tokens from the main token pool, the user will feel that the new task queue is locked.
[0068] Case 2
[0069] The current task queue steals some unowned tokens from the main token pool, but the number of unowned tokens remaining in the main token pool is less than the number of token applications from the new task queue. At this time, the user will feel that the execution efficiency of the new task queue is not up to expectations.
[0070] Obviously, by considering the application status of the sub-token pool of the main token pool, the rationality of the server's scheduling of the task queue can be optimized in the above scenario. In a specific embodiment, when the number of unowned tokens in the current main token pool is greater than the number of token applications in the sub-token pool, the unowned token can be stolen from the main token pool. Correspondingly, when the number of unowned tokens in the current main token pool is less than or equal to the number of token applications in the sub-token pool, the unowned token can be abandoned from the main token pool.
[0071] In one embodiment, the ownerless tokens stolen from the main token pool may not be marked with respect to the task queue, which means that the stolen tokens are only "temporary tokens" that can be used by the task queue, but do not belong to the task queue. These temporary tokens still "belong" to the main token pool.
[0072] In the above embodiments, the token when the subtask is executed in the current task queue may be from the sub-token pool, or it may be stolen from the main token pool. After any subtask is completed, it is necessary to return the corresponding token to the sub-token pool or the main token pool according to the ownership of the corresponding token of the completed subtask.
[0073] After all subtasks of the current task queue are executed, the ownership of the sub-token pool can be returned to the main token pool. Similarly, the mark of the token associated with the task queue in the sub-token pool can be erased to restore the ownerless identity of the token in the sub-token pool.
[0074] The above exemplary embodiment is to take the sub-token pool of current task queue as empty, and steal the ownerless token of main token pool as example.In some alternative embodiments, more reference indexes can also be considered, thereby decide whether to steal behavior.For example, the quantity of remaining subtasks in current task queue, the token occupancy of current server main token pool, the execution time of current task queue etc. can be calculated, and no more details are given here.
[0075] Ginseng Figure 7 , an embodiment of the task scheduling device of the present application is introduced. In this embodiment, the task scheduling device includes an application module 21 and a stealing module 22.
[0076] The application module 21 is used to apply for a sub-token pool of the current task queue from the server's main token pool, wherein the server responds to the tokens in the sub-token pool to execute the sub-tasks of the current task queue; the stealing module 22 is used to steal unowned tokens from the main token pool when the sub-token pool is empty, so that the server can execute the sub-tasks of the current task queue, wherein the unowned tokens are tokens in the main token pool that are not marked to the sub-token pool.
[0077] In one embodiment, the application module 21 is specifically used to determine whether the number of unowned tokens in the main token pool is less than the token application amount of the current task queue; if so, the unowned tokens in the main token pool are marked to the sub-token pool.
[0078] In one embodiment, when the number of tokens in the sub-token pool is less than the application amount of the current task queue, the application module 21 is also used to determine whether there are any newly added unowned tokens in the main token pool; if so, the newly added unowned tokens in the main token pool are marked to the sub-token pool until the number of tokens marked to the sub-token pool is equal to the token application amount of the current task queue.
[0079] In one embodiment, the stealing module 22 is specifically used to determine whether there are any unowned tokens in the main token pool when the sub-token pool is empty; if so, steal the unowned tokens from the main token pool based on the sub-token pool application status of the current main token pool.
[0080] In one embodiment, the stealing module 22 is specifically configured to steal unowned tokens from the main token pool when the number of unowned tokens in the current main token pool is greater than the number of token applications in the sub-token pool.
[0081] In one embodiment, the application module 21 is further used to determine the sub-token pool size corresponding to the task queue based on the priority and / or task size of the current task queue.
[0082] In one embodiment, the initial number of tokens in the main token pool is equal to the number of subtasks that can be processed in parallel by the server.
[0083] In one embodiment, the application module 21 is further configured to return the ownership of the sub-token pool to the main token pool after all sub-tasks in the current task queue are executed.
[0084] In one embodiment, after any subtask of the current task queue is executed, the application module 21 and the stealing module 22 are further used to return the corresponding token to the sub-token pool or the main token pool according to the ownership of the token corresponding to the executed subtask.
[0085] As above Figures 1 to 6 , describes the task scheduling method according to the embodiment of this specification. The details mentioned in the above description of the method embodiment are also applicable to the task scheduling device of the embodiment of this specification. The above task scheduling device can be implemented by hardware, or by software, or a combination of hardware and software.
[0086] Figure 8 FIG. 1 shows a hardware structure diagram of an electronic device according to an embodiment of the present specification. Figure 8As shown, the electronic device 30 may include at least one processor 31, a memory 32 (e.g., a non-volatile memory), a memory 33, and a communication interface 34, and the at least one processor 31, the memory 32, the memory 33, and the communication interface 34 are connected together via a bus 35. At least one processor 31 executes at least one computer-readable instruction stored or encoded in the memory 32.
[0087] It should be understood that the computer executable instructions stored in the memory 32, when executed, cause at least one processor 31 to perform the above combined operations in various embodiments of the present specification. Figures 1 to 6 Describes the various operations and functions.
[0088] In the embodiments of the present specification, the electronic device 30 may include, but is not limited to, personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile electronic devices, smart phones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable electronic devices, consumer electronic devices, and the like.
[0089] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-Figure 6 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.
[0090] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute part of this specification.
[0091] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communication network.
[0092] Those skilled in the art should understand that the various embodiments disclosed above can be modified and altered in various ways without departing from the essence of the invention. Therefore, the protection scope of this specification should be defined by the appended claims.
[0093] It should be noted that not all steps and units in the above-mentioned processes and system structure diagrams are necessary, and some steps or units can be ignored according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some units may be implemented by the same physical client, or some units may be implemented by multiple physical clients, or some components in multiple independent devices may be implemented together.
[0094] In the above embodiments, the hardware unit or module can be realized by mechanical or electrical means. For example, a hardware unit, module or processor can include permanent dedicated circuit or logic (such as special processor, FPGA or ASIC) to complete the corresponding operation. The hardware unit or processor can also include programmable logic or circuit (such as general-purpose processor or other programmable processor), which can be temporarily set by software to complete the corresponding operation. Specific implementation (mechanical method or dedicated permanent circuit or temporary circuit) can be determined based on cost and time consideration.
[0095] The specific embodiments described above in conjunction with the accompanying drawings describe exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of protection of the claims. The term "exemplary" used throughout this specification means "used as an example, instance or illustration" and does not mean "preferred" or "having advantages" over other embodiments. For the purpose of providing an understanding of the described technology, the specific embodiments include specific details. However, these technologies can be implemented without these specific details. In some instances, in order to avoid making the concepts of the described embodiments difficult to understand, well-known structures and devices are shown in block diagram form.
[0096] The above description of the present disclosure is provided to enable any person of ordinary skill in the art to implement or use the present disclosure. Various modifications to the present disclosure will be apparent to those of ordinary skill in the art, and the general principles corresponding to the present disclosure may be applied to other variations without departing from the scope of protection of the present disclosure. Therefore, the present disclosure is not limited to the examples and designs described herein, but is consistent with the widest range of principles and novel features disclosed herein.
Claims
1. A task scheduling method, characterized in that: The method comprises: Apply for a sub-token pool of the current task queue from the main token pool of the server, wherein the server responds to the tokens in the sub-token pool to execute the subtasks of the current task queue, and the number of tokens in the main token pool is determined according to the number of subtasks that the server can process in parallel; When the sub-token pool is empty, an unowned token is stolen from the main token pool for the server to execute the subtask of the current task queue, wherein the unowned token is a token in the main token pool that is not marked to the sub-token pool, and the unowned token stolen from the main token pool is not marked with respect to the task queue, and the unowned token does not belong to the current task queue.
2. The task scheduling method according to claim 1, characterized in that: Apply for the sub-token pool of the current task queue from the server's main token pool, including: Determine whether the number of unowned tokens in the master token pool is less than the number of token applications in the current task queue; if so, The ownerless tokens in the main token pool are marked to the sub-token pool.
3. The task scheduling method according to claim 2, characterized in that: When the number of tokens in the sub-token pool is less than the application amount of the current task queue, the method further includes: Determine whether there is a newly added unowned token in the master token pool; if so, The newly added ownerless tokens in the main token pool are marked to the sub-token pool until the number of tokens marked to the sub-token pool is equal to the token application amount of the current task queue.
4. The task scheduling method according to claim 1, characterized in that: At least when the sub-token pool is empty, stealing an ownerless token from the main token pool for the server to execute the subtask of the current task queue, specifically comprising: When the sub-token pool is empty, determine whether there is an ownerless token in the main token pool; if so, Based on the current sub-token pool application status of the main token pool, steal unowned tokens from the main token pool.
5. The task scheduling method according to claim 4, characterized in that: Based on the current application status of the sub-token pool of the main token pool, stealing the ownerless token from the main token pool specifically includes: When the number of unowned tokens in the current main token pool is greater than the number of token applications in the sub-token pool, unowned tokens are stolen from the main token pool.
6. The task scheduling method according to claim 1, characterized in that: The method further comprises: Determine the size of the sub-token pool corresponding to the task queue based on the priority and / or task size of the current task queue; and / or, The initial number of tokens in the main token pool is equal to the number of subtasks that can be processed in parallel by the server.
7. The task scheduling method according to claim 1, characterized in that: The method further comprises: After all subtasks of the current task queue are executed, the ownership of the sub-token pool is returned to the main token pool.
8. The task scheduling method according to any one of claims 1 to 7, characterized in that: After any subtask in the current task queue is executed, the method further includes: According to the ownership of the token corresponding to the executed subtask, the corresponding token is returned to the sub-token pool or the main token pool.
9. A task scheduling device, characterized in that: The task scheduling device comprises: An application module, used for applying for a sub-token pool of a current task queue from a main token pool of a server, wherein the server executes a sub-task of the current task queue in response to a token in the sub-token pool, and the number of tokens in the main token pool is determined according to the number of sub-tasks that the server can process in parallel; A stealing module is used to steal an unowned token from the main token pool when the sub-token pool is empty, so that the server can execute the sub-task of the current task queue, wherein the unowned token is a token in the main token pool that has not been marked to the sub-token pool, and the unowned token stolen from the main token pool is not marked with the task queue, and the unowned token does not belong to the current task queue.
10. An electronic device comprising: at least one processor; as well as A memory storing instructions, which, when executed by the at least one processor, enables the at least one processor to execute the task scheduling method according to any one of claims 1 to 8.
11. A machine-readable storage medium storing executable instructions, wherein when the instructions are executed, the machine executes the task scheduling method according to any one of claims 1 to 8.
