Method and apparatus for scheduling and assigning tasks to computing resources
The Lagrangian relaxation method addresses the complex task scheduling and synchronization challenges in edge computing by optimizing resource allocation and synchronization, enhancing the efficiency and reliability of edge computing systems for real-time applications.
Patent Information
- Application Number
- US19/136376
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2026-11-26
AI Technical Summary
The challenge of efficiently scheduling and synchronizing computational tasks in edge computing environments, particularly for autonomous vehicles, is exacerbated by high computation load, real-time requirements, hardware constraints, and unpredictable runtime variations, leading to potential violations of synchronization and real-time constraints.
A method and apparatus utilizing Lagrangian relaxation to optimize task scheduling and synchronization across multiple edge workers, decoupling multimachine scheduling into single-machine problems and relaxing constraints to simplify the NP-hard problem, ensuring precise synchronization and resource allocation.
The proposed solution enhances the efficiency and reliability of edge computing systems by maximizing the weighted number of admitted tasks, reducing latency, and improving the quality of service for ultra-reliable low-latency applications.
Smart Images

Figure US20260377225A1-D00000_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to task scheduling and assignment to computing resources.BACKGROUND
[0002] The emergence of the mobile edge computing (MEC) paradigm in recent years has amplified the applicability of artificial intelligence / machine learning (AI / ML) technology via various new possible use cases. The massive MEC servers deployed closer to the user devices (UD), coinciding with the rise of the internet of things (IoT) ecosystem, can elevate the quality of service (QoS) if sufficiently (intelligently / smartly) utilized. Establishing a network of these perceptive computing devices will allow the users to experience more effective and reliable service in various use cases (e.g., health, informatics, robotics, autonomous driving, etc.). Indeed, this abundance of resources interconnected through state-of-the-art fifth generation (5G) communication technologies create a need for an agile framework to administer the execution of offloaded workload.
[0003] Parallelism in the world of computation is an active area of research that studies the utilization of the available computational power by decomposing a computation task into parallelizable subtasks. These subtasks are supposed to run in different computing resources to mitigate the computation time overhead. The parallelized computational mode has been adopted at various computational levels, starting from the very computational cycles to the instructions level and reaching the highest software level (i.e., multithreading computation). Edge computing, as a new paradigm, is no exception in the possibility of leveraging parallelism to amplify performance. Parallelized computing also widens the applicability of artificial intelligence by allowing the agents to perceive and process data synchronously. This compelling information perception and processing will boost the gathered information's accuracy and simplify the data cleaning and aggregation.
[0004] The edge computing applications may also benefit from parallelized computing to reduce the latency which is critical in ultra-reliable low latency communications (URLLC) use cases such as autonomous driving and mission critical applications. Parallel computing, when successful, enhances the edge computing application quality of experience and quality of service.SUMMARY
[0005] There is provided a computer implemented method for scheduling and assigning tasks to computing resources. The method comprises receiving a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight. The method comprises receiving computing resources specifications. The method comprises using Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications. The method comprises preparing a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
[0006] There is provided an apparatus comprising processing circuits and a memory. The memory contains instructions executable by the processing circuits whereby the apparatus is operative to execute a scheduler to schedule and assign tasks to computing resources. The apparatus is operative to receive a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight. The apparatus is operative to receive computing resources specifications. The apparatus is operative to use Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications. The apparatus is operative to prepare a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
[0007] There is provided a non-transitory computer readable media having stored thereon instructions for scheduling and assigning tasks to computing resources. The instructions comprise receiving a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight. The instructions comprise receiving computing resources specifications. The instructions comprise using Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications. The instructions comprise preparing a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
[0008] The method, apparatus and non-transitory computer readable media provided herein present improvements to the way scheduling of tasks, including synchronized tasks operate.BRIEF DESCRIPTION OF THE DRAWINGS
[0009] FIG. 1 is a schematic illustration of a mobile edge computing system comprising compute resources (edge servers), IoT devices, workers and the proposed scheduler embedded inside a controller.
[0010] FIG. 2 is a block diagram of an example system architecture for the controller of FIG. 1.
[0011] FIG. 3 is a schematic illustration of a typical timeline for the system.
[0012] FIG. 4 is a schematic illustration of a typical scenario for the running system, showing component roles.
[0013] FIG. 5 illustrates an example instance of a scheduling problem.
[0014] FIG. 6 is a flowchart of a Lagrangian relaxation used to solve the NP-Hard problem.
[0015] FIG. 7 is a flowchart of a relaxed model solution.
[0016] FIG. 8 illustrates the pseudocode of Algorithm 1.
[0017] FIG. 9 illustrates the pseudocode of Algorithm 2.
[0018] FIG. 10 illustrates the pseudocode of Algorithm 3.
[0019] FIG. 11 illustrates the latest points of a task in two different scenarios.
[0020] FIG. 12 illustrates the pseudocode of Algorithm 4.
[0021] FIG. 13 illustrates an execution example of the relaxed model solution.
[0022] FIG. 14 is a graph illustrating the evolution of the Lagrangian relaxation running over an instance of the problem.
[0023] FIG. 15 is a graph illustrating the admission rate of the solution of FIG. 6, in term of tasks average computational requirement.
[0024] FIG. 16 is a graph illustration the computation time of the solution of FIG. 6, in term of the tasks average computational requirement.
[0025] FIG. 17 is a graph illustrating the admission rate of the solution of FIG. 6, in terms of average workers speed.
[0026] FIG. 18 is a graph illustrating the computation time of the solution of FIG. 6, in terms of average workers speed.
[0027] FIG. 19 is a graph illustrating the admission rate of the solution of FIG. 6, in terms of the impact of the different task types.
[0028] FIG. 20 is a graph illustrating the computation time of the solution of FIG. 6, in terms of the Impact of the different task types.
[0029] FIG. 21 is a table illustrating Simplex Implemented in C (CPLEX) performance, showing situations where objectives are not feasible and the workload cannot be executed.
[0030] FIG. 22 is a table showing that the results of the solution of FIG. 6, the Lagrangian relaxation has much lower elapsed time and low memory usage compared to the CPLEX shown in FIG. 21.
[0031] FIG. 23 is a schematic illustration of a mobile edge computing system comprising compute resources (edge servers), IoT devices, workers and the proposed scheduler deployed within a cloud-based implementation as a service leveraged by 5G.
[0032] FIG. 24 is a flowchart of a method for scheduling and assigning tasks to computing resources.
[0033] FIG. 25 is a schematic illustration of a hardware in which steps and / or method described herein can be executed.
[0034] FIG. 26 is a schematic illustration of a virtualization environment in which the methods and apparatuses described herein can be deployed.DETAILED DESCRIPTION
[0035] Various features will now be described with reference to the drawings to fully convey the scope of the disclosure to those skilled in the art.
[0036] Sequences of actions or functions may be used within this disclosure. It should be recognized that some functions or actions, in some contexts, could be performed by specialized circuits, by program instructions being executed by one or more processors, or by a combination of both.
[0037] Further, computer readable carrier or carrier wave may contain an appropriate set of computer instructions that would cause a processor to carry out the techniques described herein.
[0038] The functions / actions described herein may occur out of the order noted in the sequence of actions or simultaneously. Furthermore, in some illustrations, some blocks, functions or actions may be optional and may or may not be executed; these are generally illustrated with dashed lines.
[0039] At least some aspects of the techniques described herein may be implemented using artificial intelligence, which comprises a variety of techniques as would be apparent to a person skilled in the art, including machine learning techniques. Machine learning techniques include Neural Network (NN), or Artificial Neural Network (ANN), and both terms may be used interchangeably herein. In some contexts, an Artificial Neural Network could include biological portions.
[0040] Cognitive edge computing (CEC) is the idea of bringing the machine learning (AI / ML) models and algorithms usually deployed on the cloud to the edge computing servers. Distributing these AI / ML engines among various edge computing servers allows AI / ML to be more dedicated to applications or use cases hence being more effective. This distributed computational model provides the opportunity to execute computational processes that require a high level of parallelism. A typical example of such processes is parallelized learning methods. This parallelism makes it possible to reach a computation speedup that most real-time applications usually demand. Another example is analyzing data acquired from several sensors (identical or different) perceived from the same object / incident to provide a more authenticated outcome.
[0041] In FIG. 1, a global overview of the mobile edge computing system 100 is depicted. Available computing resources are handled by the workers. These workers could be located either in the edge servers 30 (edge cloud), or inside the devices 25 with high capacity. IoT devices 20 request tasks computation from the controller 5, at various speed. The controller then orchestrated the requests and use the available compute resources via a scheduler 10. The scheduler must perform smartly to maximize the edge computing application performance, considering the access network state and the available resource of the workers. This is where the solution proposed herein is integrated.
[0042] In addition to their need for a high computation speed, these processes exhibit the necessity of precise synchronization among their computing components. For instance, consider a distributed deep learning algorithm; its agents build different parts of the neural network by processing the same data portion and interacting continuously. It will lose some accuracy in its outcome if the agents are not synchronized to process the same part of the dataset.
[0043] As another example, several IoT devices may collect longitudinal data streams from a particular incident, the comparison of their analysis outcome will be meaningless if the data collection / analysis is not coincident.
[0044] In edge computing paradigm, especially edge-based AI / ML systems, the precision of time synchronization is therefore necessary during data acquisition and aggregation. Such precision is suitable to achieve time-aligned data capture among edge devices (sensing and actuation). Synchronization is also required in distributed and federated AI / ML as the speed of convergence and model accuracy are synchronization scheme dependent.
[0045] Trend toward software defined vehicle is enabling an important breakthrough for autonomous, connected, electric vehicles. In fact, as vehicles are getting smarter and more automated that means that they support increasing number of software functions and thus are becoming more sophisticated and complex. As those systems become more complex, safety and challenges also intensify. So, autonomous vehicles have rigorous real-time requirement and should react in less than 100 ms, also perceived as an end-to-end processing latency constraint.
[0046] MEC appears as an approach to provide additional computing power with low processing delay. Vehicles could offload their sensor data to a proximal edge server, such as a base station or roadside unit, for fast data processing. Despite the potential of MEC in allowing or enabling low latency computing, many challenges exist for MEC to support real-time and synchronous related computing services, such as safety.
[0047] They are four core properties of autonomous vehicles that impact synchronization and real-time requirements:
[0048] Data is forgotten fast: operation should only ingest fresh data and historical data are irrelevant as they will not contribute to making correct control decision in the present. Autonomous driving systems (ADS) rely on only stateless or quasi-stateless operation. There is a need for fault tolerant and synchronization strategy.
[0049] Computation is high-load and diverse: an ADS pipeline can contain hundreds of processing modules such as parallel processing of deep learning models together with large computer vision and planning algorithms, requiring a lot of operations per second. Such architecture enables a complex dataflow graph and defining time constraints is a big problem. Data processing in one node can be influenced by data processing in another node as they should be in synchronization. Therefore, it is recommended to address how the time constrains is affected by integrating a reliable and robust scheduling and synchronization scheme.
[0050] Runtime has high-variation and is unpredictable: Complex computation logic and data content can lead to high variation in runtime, and such a variation can be unpredictable. The complex logic could be an occasional burst of computation load: data may require much longer computation time and it is impossible to learn the true worst case during profiling. A robust task scheduling is required to ensure real-time in the physical world.
[0051] Hardware constrained: big data system relies on cluster of machines or servers in the cloud. Unfortunately, autonomous driving only has limited amount of hardware and highly relies on MEC. The trade-off in compute power versus network latency is an essential differentiation between edge computing and cloud computing.
[0052] Implication of the characteristic listed above: autonomous vehicles are exposed to potential real-time and synchronization constraint violation in the physical world. Edge computing is more suitable for such application that depends on short and predictable response time. However, current policies to deal with these violations are not sufficient. Integration of smart tasks scheduling, and synchronization algorithms is needed to make the edge computing systems or applications robust to any potential delay or failures.
[0053] Edge computing's core problem is the workers' resource allocation over the arriving workload. Providing a scalable yet adaptive solution for such a problem is important for an efficient edge system. Hence, the problem addressed here concerns scheduling three types of computational tasks over several edge workers available on the network. The three types of workloads are batch tasks, real-time tasks, and synchronized tasks. A batch task is a workload that does not exhibit any time sensitivity. The second type, real-time task, has a lifetime withing which the system should execute it. A parallel synchronized task contains several subtasks that should be conducted in parallel, synchronously.
[0054] Eventually, the abovementioned requirements intensify the challenges of building an efficient system to operate edge cloud (EC) network of resources. Edge cloud systems usually target to run real-time applications accompanied by stringent deadlines. Allocating resources to such a workload is challenging. Not to mention that these applications might demand a high level of parallelism, hence more intricate scheduling problems. To synchronize several computational tasks, there is a need to provide an adaptive schedule capable of maintaining the timing among the synchronized tasks, given the different configurations of the EC servers (different hardware architecture, different operating systems, etc.). In addition, a precise synchronization mandates an ameliorated resource allocation technique that tolerates any source of disturbances in the EC servers (i.e., operating system interruptions, computational failures, wireless communication noise, etc.).
[0055] The requirement for accurate tasks or workload orchestration when deploying an edge computing application or framework is essential for URLLC, massive machine-type communications (mMTC) and mission critical application use cases where precision and low latency are highly recommended. An ideal edge computing framework should allow the ability to securely schedule tasks or workload over available edge computing workers. This deployed framework should also meet the synchronization deadline without impacting the system stability.
[0056] The problem of tasks orchestration and synchronization, where an edge computing cluster / network of workers collaborates and executes an edge computing application, is considered herein. Edge computing application's performance and reliability highly depend on task scheduling and synchronization accuracy. Without reliable tasks synchronization, the edge computing applications will achieve poor Quality-of-Experience (QoE). Without reliable and robust synchronization, the edge computing application's performance will decrease, and the application may not be deployable.
[0057] A robust synchronization and scheduling mechanism is proposed herein by exploiting / extrapolating a combination of Linear programing and Lagrangian relaxation (LR).
[0058] In the field of mathematical optimization, Lagrangian relaxation is a relaxation method which approximates a difficult problem of constrained optimization by a simpler problem. A solution to the relaxed problem is an approximate solution to the original problem, and provides useful information.
[0059] The method provided herein penalizes violations of inequality constraints using a Lagrange multiplier, which imposes a cost on violations. These added costs are used instead of the strict inequality constraints in the optimization. In practice, this relaxed problem can often be solved more easily than the original problem.
[0060] To achieve the above stated goal, the tasks ingested by the algorithm proposed herein are classified into three categories:
[0061] batch tasks that do not exhibit sensitivity to delay,
[0062] real-time tasks that are delay-sensitive, and should be terminated within a time slot,
[0063] synchronized tasks consisting of several subtasks that are supposed to run in parallel and synchronously.
[0064] In the proposed solution, the algorithm receives the workload specifications and produces a plan for each involved worker. The plan is then mapped into a scheduling of a given set of tasks, non-preemptively, on the set of workers, to maximize the weighted number of admitted tasks. Given the complexity of such problem, (NP hard, combination of multiple scheduling sets or constrains) two major concepts have been elaborated to obtain a manageable, reliable and robust scheduling plan:
[0065] the constraint on multiple machines schedule problem is decoupled into multiple independent constrains on single machine schedule problem, and
[0066] the constraint on tasks overlapping (two tasks execution cannot overlap) is decomposed into two separated constraints, which allows to schedule a portion of task instead of a “whole task” together.
[0067] The two concepts introduced in this proposal extrapolate the following techniques to derive the solution of workload assignment problem in edge computing system:
[0068] modeling the problem as an integer linear program and derive a decomposition technique to simplify the problem; indeed, the decomposed problem obtained is an NP-hard and is practically not solvable,
[0069] introducing a relaxation method based on the well-known LR technique; the LR is introduced to reduce the dimensionality of the problem decomposed above by finding a set of constraints so that, if relaxed, will turn the problem into an easy-to-solve one.
[0070] Finally, simulations demonstrate how the proposed approach can be deployed into a framework to maximize the workers computational capacity utilization, as depicted in FIG. 1. In FIG. 1, the Access Network medium is assumed to be 5G and the controller 5 is a component of the edge computing infrastructure.
[0071] Several advantages can be obtained with the proposed solution. The solution is effective as it implements a sophisticated discrete optimization technique to solve the scheduling problem that scales, even with more significant problem instances (i.e., a high number of computational tasks). This improves the quality of service and gives the chance to ultra-reliable-low-latency applications to take advantage of the deployed edge resources. The scheduling solution can be implemented as a lightweight C++ program deployable easily over any computer system. The proposed solution achieves faster resolution (low latency) and uses less memory compared to the standard CPLEX approach.
[0072] The scheduling solution is configurable and can be altered to stop within a specific time deadline, several iterations, an optimality gap, or any other convergence criterion. The designer can also adjust the parameters considered to characterize the load (the received tasks), so a variant objective can be optimized (e.g., giving a particular class of tasks a higher priority) or a challenge raised by the surrounding environment can be tackled. For example, if a device is initiating redundant tasks that are meaningless to recompute, the system is smart enough to note that and minimize the importance of this device's tasks.
[0073] The solution is scalable, as an edge system can contain any number of workers (which may vary with time). Hence, the solution can handle a variable number of workers. The proposed solution can be generalized to any type of mobile edge computing application. The solution is adaptable, the core tasks scheduler can be reconfigured via various parameters. As explained earlier, the long-term optimizer's role is to reconfigure the tasks scheduler by changing these parameters according to the nature of the workload, the device and the workers conditions. The solution is also fault tolerant. A separate agent for fault-tolerance, that observes the scheduler performance, can be provided to alter a tasks filtration procedure and improve the system reliability.
[0074] FIG. 1 illustrates a system 100 in which an adaptive scheduler 10, embedded inside a controller 5, that receives requests from multiple sources 20, 25 to offload tasks over the available edge cloud servers 30 and possibly also to more powerful IoT devices 25. The goal of the scheduler is to maximize the weighted number of admitted tasks. Each task has its own weight wi. It is assumed that, on average, the batch tasks have a lower weight than the other two kinds.
[0075] FIG. 2 shows the architecture of the proposed solution. The system is deployed around several processing blocks: the Scheduler 10, the monitor agent 40, the request receiving agent 50, the validation and filter agent 60, the long-term optimizer70 and the delivery agent 80 that transmits execution unit to the workers 25, 30. Detail on each component and how they interact are provided below.
[0076] The scheduler 10 is the main component of the system 100. The scheduler receives the tasks metadata originating from devices 20, 25 (IoT devices, autonomous vehicles, etc.) and builds a plan for each worker 25, 30 to execute a set of the received tasks.
[0077] A task to be computed encapsulates the computational load, offloaded by an application running locally on the IoT device. Several reasons make an application offload such a task. One reason could be the IoT device is incapable of handling the task due to limited capabilities. Offloading a task to be computed can also reduce the IoT device's power consumption. Some tasks computations might require information that is unavailable or impossible to perceive by the local IoT device; offloading the task to a worker capable of acquiring this information is a practical solution.
[0078] The computation tasks can be of any form or kind. A generic model can be adopted that can encode the computational tasks considered. A cluster of EC servers established to supply applications that require high computation speed and / or collaboration with other entities to accomplish a given computational task is also considered. The tasks can take one of the following three models.
[0079] Real-time tasks: this model should get executed between its release time and a deadline. An example of such a task is an autonomous driving application. Such a URLLC application is very delay-sensitive and usually requires execution to be accomplished before a certain deadline.
[0080] Parallelized synchronized tasks: the subtasks should be in sync to some extent. The minimum number of subtasks is two. Parallelized machine learning is a typical example of such a task. These tasks require synchronization among the data perception and analysis.
[0081] Batch tasks: each task consists of one subtask with no deadline. Any computational workload that can tolerate a delay in execution belongs to this task type. An example is the object recognition task in a picture offloaded from a mobile device that lacks the tools required to do the computation.
[0082] To model the importance of each task, it is assumed that each task is accompanied by a weight. The higher the weight, the more critical the task is. Further, weights may also be used as an indication if a task is realizable or not.
[0083] The filter and validation agent 60 is the agent that receives the tasks, estimates their parameters (e.g., their importance) and filters them if it finds that, with higher probability, the scheduler will reject them. This filtration process can help the device initiate the task to find an alternative plan for its task quickly rather than waiting for the scheduler to decline it after a relatively long-time. Such precautions are important for time-sensitive applications such as autonomous driving agents. The filtration also boosts the scheduler performance by reducing the solution space size by removing unnecessary overhead caused by a hard-schedule workload.
[0084] The long-term optimizer 70 provides adaptability to the changes in the environment to the system. The long-term agent observes the scheduler performance, the filtered tasks and their specifications, and the workers condition, to:
[0085] update the scheduler configuration, e.g., the number of iterations and initial values,
[0086] access the workers condition, e.g., available / unavailable and their fault-rate, and
[0087] update the filtering parameters, e.g., what patterns in the task's specifications should the agent consider while filtering the tasks.
[0088] The monitoring agent 40 and the request receiving agent 50 ingest the workers status and the workload requests respectively. The monitoring agent uploads the workers status to the long-term optimizer while the request receiving agent routes the workload request to the validation agent.
[0089] The delivery agent 80 is used to dispatch the scheduling plan to the workers 25, 30 so that each worker can handle its assigned computation tasks.
[0090] FIG. 3 shows the timeline of the system. The time horizon can be decomposed into several overlapping periods. Each period consists of 3 stages: the listening stage, the scheduling stage and the execution stage.
[0091] It should be noted that the execution stages time of the periods coincide or overlap, which means that the scheduler should consider the existence of pre-admitted tasks in the timeline while scheduling the new arrivals. The listening stage is when the controller 5 receives the requests from the IoT devices to offload computational tasks. The figure shows that the listening and the scheduling stages are running continuously. The components responsible for these two stages are different: the controller 5 does the listening and the scheduler 10 does the scheduling.
[0092] In FIG. 4, the role of each component in the system is illustrated. The role of the controller 5 is to receive the requests, apply filtration, then send the remaining tasks to the scheduler. FIG. 4 shows the scheduling of a synchronized task (Sync. Task 1), composed of sub tasks (Subtasks 1-3) each composed of steps (S1 to S4), which execute at synchronized times on different workers (W1 to W3). The figure shows that real-time tasks Ri and batch tasks Bi can be scheduled between the steps of synchronized tasks (Si) and that it is not necessary to wait for all the steps of the synchronized tasks to get executed to execute other tasks.
[0093] FIG. 5 illustrates example instances of the scheduling problem. It shows the specifications required to describe each task type (see the dotted rectangle labeled Tasks on the left) as well as the outcome of the scheduler (see the dotted rectangle labeled Plans on the right). In the task specification, for each task, w corresponds to a weight corresponding to the importance of the task, c corresponds to computation requirements (cycles), r corresponds to the task release time, d corresponds to the task's deadline, sub corresponds to the number of subtasks and steps correspond to the number of steps per subtask. The scheduler generates a plan for each worker, for which specifications are provided to the scheduler (see the dotted rectangle labeled Workers at the bottom), and also taking into account a duration of task execution. This plan is a chronologically ordered list of tasks that will get accomplished by the worker. Each task (listed in the worker plans) has its own start time and end time. It should be noted that further or different specifications for the tasks and workers could be provided.Problem Definition and Modeling
[0094] The first level of the system is supposed to schedule the received tasks in the current epoch efficiently. The following is the problem definition:
[0095] Given three sets of tasks: real-time tasks Ir, synchronized tasks Is, and batch tasks Ib, and a set of servers J, each task in Ir has a computation requirement and should start after its release time and finish before its deadline. A task in the set Is has a release time, a deadline, and a set of subtasks. Each subtask has a set of steps. All steps have exact computational requirements (number of cycles). All subtasks belonging to the same synchronization tasks have the same number of steps. The steps with the same position belonging to different subtasks of one synchronization task should start simultaneously. One server / worker should execute all steps from the same subtask. All subtasks should finish execution before their synchronized task deadline and after their release time. Batch tasks can only be described by their computation requirements. Every task has its weight depicting its importance. The problem is to schedule the given set of tasks non-pre-emptively on the set of servers / workers to maximize the weighted number of admitted tasks.
[0096] Since the problem is NP-hard, it is efficient to model it as an integer linear program in order to propose a decomposition technique to simplify the problem. In the following, the objective of the program and its constraints will be described. Table 1 below shows the symbols used in the problem formulation.TABLE 1Symbols used in Formulating the ProblemSymbolExplanationa) ParametersISet of tasks (real-time, synchronous and batch)ĪBatch tasks, real-time tasks and synchronizedtasks stepsJSet of workersIrSet of real-time tasksIsSet of synchronous tasksIbSet of batch taskswiTask i ∈ I weightcp[i, j]Computation time of task i ∈ I at worker j ∈ JriRelease time of task i ∈ IdiDeadline of task i ∈ Iorder[i″]The order of step i″, where i″ is used asan index for stepsTTime frameuiThe number of workers assigned to a task, ui isa positive numberb) Variablesxij ∈ {0, 1}1 if task i ∈ I is assigned to worker j ∈ Jxi ∈ {0, 1}1 if task i ∈ Is is scheduledst[i]∈ RThe execution start time of task i ∈Īyijk1 if task i ∈Ī is the kth task scheduledover worker j ∈ J
[0097] The objective is to maximize the weighted number of admitted tasks. This is done by solving:max∑i∈Iwixi.(1)
[0098] The constraints are listed next, in (2) to (11).
[0099] A task can be served by only one server:∑j∈Jxij=xi ∀i∈ Irb,∀j∈J,(2)∑j∈Jxij=Uixi ∀i∈Is,∀j∈J.(3)
[0100] A task execution should be done before its deadline:st[i]+∑k∈Jcp[i,j]·xij≤di ∀i ∈I_.(4)
[0101] A task execution should start after its release time:st[i]≥ri.(5)
[0102] Steps that belongs to the same task and that have the same order should start at the same time:st[i1″]=st[i2″] ∀ i1″,i2″∈ S[i]:i∈Is∧order( i1″)=order( i2″).(6)
[0103] All steps of a synchronized task, if scheduled, should be executed:xi″j=xij ∀i″∈ S[i]:i ∈ Is.(7)
[0104] A task cannot be assigned an order in a server unless it is assigned to this server:∑k≤<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[LeftBracketingBar]"< / annotation>< / semantics>I<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[RightBracketingBar]"< / annotation>< / semantics>yijk=xij ∀i∈I_,∀j∈J.(8)
[0105] Two tasks execution cannot overlap:∑i1∈I_(st[i]+c[i,j])yijk≤∑i2∈I_st[i]yij(k+1)+T (1-∑i2∈I_yij(k+1)\ big ) ∀j∈J∀k
[0106] A task cannot be assigned an order unless the previous order is assigned:∑i∈I_yijk≤∑i∈I_yij(k-1) ∀j∈J 1≤k≤<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[LeftBracketingBar]"< / annotation>< / semantics>I_<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[RightBracketingBar]"< / annotation>< / semantics>.(10)
[0107] All the steps of one subtask should be executed by one server:xi1″j=xi2″j ∀i1″,i2″∈SS[i′]∀i′∈S[i] ∀i∈Is ∀j∈J.(11)
[0108] The problem defined above, with its numerous constraints, is intricate (NP-hard), and finding an optimal solution is practically impossible.
[0109] Hence, a relaxation method based on the well-known LR technique is proposed herein. The principal idea is to find a set of constraints of the problem that, if relaxed, will turn the problem into an easy-to-solve one. Instead of explicitly forcing these constraints while finding a solution, the technique punishes the solver when violating a constraint by the penalty value of the corresponding dual variable. LR repetitively solves the relaxed problem with new dual values.
[0110] Each iteration constructs a feasible solution from the relaxed problem solutions. Then, it updates the dual values using these two solutions' objectives and the relaxed constraints' direction. This method of updating the dual variables is called the Sub-Gradient Descent (SGD) method (see FIG. 6).
[0111] By examining the problem, several factors can be found causing an untraceable one. First, it is a multimachine scheduling problem. The availability of several options for tasks schedule makes the solution space too huge to explore. Second, it is a 0-1 scheduling problem. A task is either scheduled or not. Such a constraint makes the problem NP-hard even with the single-machine version. Third, the synchronized subtasks must be scheduled in parallel over several machines. This workers' dependency introduces another complication to the problem to resolve.
[0112] The constraints that impose these three challenges are then identified and relaxed. Constraint (2) is the constraint that forces the scheduling of a task on only one worker. Relaxing it will decouple the multimachine scheduling problem into several single-machine scheduling problems. Second, there is the 0-1 scheduling challenge. To relax this requirement, Constraint (8) is decomposed into two constraints.st[i,j]+cp[i,j]=end[i,j] ∀i∈I∀j∈J.(8′)∑i∈I_end[i,j]yijk≤∑i∈I_st[i]yij(k+1)+T (1-∑i∈I_yij(k+1)) ∀j∈J∀k≤<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[LeftBracketingBar]"< / annotation>< / semantics>I_<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[RightBracketingBar]"< / annotation>< / semantics>+1(8″)
[0113] Then, the “greater than” version of Constraint (8′) is relaxed. This relaxation allows the scheduling of a portion of the task.
[0114] Let λij be the dual variable of Constraint (8′), δi be the dual variable of constraint (2). Then the objective of the relaxed model can be written as follows:LRobj=∑i∈Iωixi+∑i∈I_∑j∈Jλij[end[i,j]-st[i,j]-cp[i,j]+∑i∈Iδi(∑j∈Jxij-uixi)(12)
[0115] FIG. 6 depicts the flowchart of the proposed algorithm 600.
[0116] In summary, the Lagrangian relaxation solves the relaxed equation using the dual variable λij, step 605, extracts a feasible solution, step 610, updates the dual variable, step 615, and repeats the process iteratively, solving the relaxed problem again with the updated dual variable.
[0117] As shown in FIG. 6, the algorithm starts with the optimization of the relaxed model, in the first stage, 605. The outcome of this stage is an infeasible solution to the original problem.
[0118] Turning to FIG. 7, a flowchart depicting the method 700 to solve the relaxed model problem, corresponding to step 605, is provided. In summary, the method 700 starts by calculating the residual of the task, step 705. When a dual variable is assigned e.g. to a task, the dual variable represents the importance of scheduling this task fully. Sometimes the sub gradient descent overestimates this dual variable, and sometimes it overestimates it. When the dual variable is underestimated, there is a residual. This residual can be added to the objective even when the task is not scheduled. When this calculation is done for synchronized tasks, all the sub-tasks need to be considered in the calculation.
[0119] Steps 710 to 740 are part of the main iteration of the method 700. Here, the dual variable λij is not assigned to a task, but to a pair task-worker. Because of the presence of tasks that need to be synchronized, because λij is assigned to a pair task-worker, because there is non-preemptive scheduling, and because the workers are different in speed, a data structure, a red-black tree, is considered that sorts all the pairs possible inside it, in terms of the dual variable λij. At step 710, all task-worker pairs are added to the red-black tree. Once the data structure is built, the tree is explored. A pair task-worker is popped, step 715, and a gain of adding this task to this worker is calculated, step 720. If the gain is positive, step 725, the task is added to the worker, step 730, regardless if the task was added to another worker or not, because the schedule of each worker is decoupled. At step 735, the release times and deadlines of the synchronized tasks are updated, to synchronize the sub tasks that belong to the same synchronized task. Each corresponding step in each sub task are thus aligned together. This ensures that synchronized tasks are in sync. This is done until the tree is empty, step 740, i.e. until there is no more pairs to pop.
[0120] Algorithm 1, in FIG. 8, also shows in detail an example implementation of the method of step 605.
[0121] In algorithm 1, lines 2-13 perform two operations.
[0122] Residual calculation: a task's residual is what remains from subtracting the task dual variable γi from its original weight.
[0123] Sorting task-worker pairs: the method sorts each pair of a task i and worker j by inserting them into a balanced binary tree. It sorts them according to their dual variable value λij.
[0124] It should be noted that this part handles the synchronized tasks (lines 8-13) separately from the batch and real-time tasks (lines 4-7). This separation is because the value used to identify the task order differs. In the case of a synchronized task, the average dual variables of all the steps of this synchronized task is calculated. The main iteration of the method is in lines 14-43. The loop condition is whether there is still a pair in the tree. In each iteration, the method pops a pair (line 15) and classifies the task, whether it is a batch / real-time or synchronized task. For the batch / real-time task, it sends the pair along with their corresponding dual variables to the function calculate_effectiveness (line 17). This function calculates the best cost-effectiveness for the current task if it is scheduled over the current worker. It also returns the amount possible to insert from the tasks to this worker, the start time, and the task order among the pre-scheduled tasks. This function is discussed in detail later. Then the method checks whether the effectiveness is positive or not (line 18). If positive, the method schedules the calculated amount of the task for this worker at the given location and start time (line 19). Then it updates the variables (lines 21-23). For synchronized tasks, it sums up the effectiveness of all the steps that belong to this task (lines 29-33), and if the total effectiveness is positive, it assigns the steps to the worker with their calculated locations, steps, and amounts (lines 37-44).
[0125] The function calculate_effectiveness is shown in Algorithm 2, FIG. 9. This function finds the best configuration of the given task in the given worker by, first, shifting all the tasks to their latest points (lines 2-3). The latest point of a task is the maximum point in the timeline at which the task can finish execution. This can be either its deadline or the start time of the task scheduled after it. Then, the function iterates over all the scheduled tasks in the current worker (lines 4-18). In each iteration, first, it shifts the current iteration task to its earliest point (line 5). This point is the opposite of the task latest point. It checks the amount of the task that can be scheduled before the current iteration task and calculates the effectiveness using the relaxed model objective (lines 8-13). At the end of the iteration, it checks if the current calculated effectiveness is the maximum one and updates the values accordingly (lines 14-18).
[0126] Algorithm 3, FIG. 10, shows the function that inserts a task to a worker, Add_Amount_At. The function follows the same logic as the function calculate_effectiveness. But, instead of calculating the effectiveness, it calculates the available space of the given location (lines 2-7) and checks whether it is possible to insert the required amount of the given task to this location or not (lines 8-11).
[0127] FIG. 11 shows an example of how the tasks can be rearranged according to Algorithm 1.
[0128] The second stage, 610, of FIG. 6, it to extract a feasible solution from the unfeasible one. This is achieved by checking two conditions:
[0129] a task is scheduled on a certain worker, and
[0130] the amount given to the task is not less that its required computation.
[0131] The method of feasible solution extraction is shown in algorithm 4, FIG. 12. It starts by examining the batch and real-time tasks (lines 2-11). If the scheduled amount is the same as the required one, it adds the weight of the current task to the objective and updates the feasible solution variables (lines 8-11). For the synchronized tasks (lines 12-30), the method goes through all the workers (lines 15-30) and checks whether all the steps of this task have been feasibly scheduled (lines 17-20). If all of them are feasible (line 21), it increments the counter of feasibly-scheduled subtasks and adds the current worker to a list (line 22-23).
[0132] The third stage, 615, in FIG. 6, updates the dual variable using the equation below and the sub-gradient descent algorithm.λt+1=λt+UBt-Objt<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[LeftBracketingBar]"< / annotation>< / semantics>S<semantics definitionURL="">❘<annotation encoding="Mathematica">"\[RightBracketingBar]"< / annotation>< / semantics>2S
[0133] It maps the difference between the two sides of the relaxed constraints. S is the subgradient vector. Its elements are the differences between the relaxed constraints right side and left side. UBt is the upper bound of the current iteration, Objt is the best objective found before or at iteration t and λt is the dual variables' values at iteration t.
[0134] FIG. 13 presents how the tasks are scheduled from iteration 1 to an iteration N+1 for a given worker.
[0135] Next, the performance of the algorithm in terms of different aspects is provided. The parameters mentioned in table 2 are used to generate the instances (unless otherwise specified). The instance sizes are described in terms of elemental tasks. An elemental task is either a batch task, a real-time task or a synchronized task's step.Simulation and Validation, Algorithm Convergence
[0136] FIG. 14 depicts the convergence of the proposed algorithm. The scheduling instance contains one hundred tasks, distributed as follows: forty real-time tasks, forty batch tasks, and twenty steps of synchronized tasks. This tasks distribution is fixed through all the results below unless mentioned otherwise. The FIG. 14 also shows that the proposed algorithm converges in less than one second.TABLE 2Parameters Values used During the Simulations,with reference to FIGS. 15 to 20ParameterNumber (average)Number of Tasks120Number of Batch Tasks40Number of Real Time Tasks40Number of Steps40Number of Synchronized Tasks10Batch Task Weight5Realtime Task Weight7.5Synchronized Task Weight20Realtime Task lifetime20Synchronized Tasks Lifetime100Number of Subtasks2Number of Step per Subtask4Number of Workers3Worker Speed5Computation Requirement10Algorithm Performance Vs Load Size
[0137] In FIG. 15, the impact of the tasks' average number of cycles on the admission rate is illustrated. In all the upcoming figures, the instance size are shown by the number of elemental tasks, which is the number of batch tasks, plus the number of real-time tasks and the number of steps of the synchronized tasks. Increasing the number of cycles per task leads to a reduction on the number of admitted tasks, as illustrated.
[0138] FIG. 16 shows the algorithm execution time in terms of the average number of computation cycles. Two modes of convergence were implemented in the algorithm. The first is when the upper and lower bounds are equal. The second is the number of iterations. In FIG. 16, the peak that each line reached in the middle of the chart is the point where the problem instance is the most challenging i.e., the algorithm has the greatest number of iterations to reach the best solution it can reach. This is because the size of the task is not very small to fit easily and not too big to reject easily. Before that, the algorithm converged faster because it could fit most of the tasks as they were small. While on the points after the peak, the algorithm converged faster because it found the solution space smaller since many tasks are too big to fit.Algorithm Performance Vs Computational Capacity
[0139] FIG. 17 and FIG. 18 show the variation of the objective and computation time of the algorithms by increasing the number of workers. FIG. 17 shows the impact of the average worker's speed on the admission rate. As the speed is increased, the scheduler could fit more of the tasks in the workers' timeline. For two workers, the line is converged to less than 100% because the average number of subtasks for the synchronized tasks is two and some of them have subtasks more than the number of workers, hence it is impossible to schedule them.
[0140] FIG. 18 shows the algorithm time in terms of the workers' average capacity. Like in FIG. 16, the curves do have a peak point. This point represents a similar point to the one in FIG. 16 (the most challenging instance).The Impact of Task Types
[0141] FIG. 19 and FIG. 20 show the effect of the task type's distribution on the algorithm performance. The percentage of a certain type of task (batch, real-time or synchronized) is varied in the problem instance to solve while the percentage of the other two is fixed. For example, at the point of 20% for the batch tasks line, the instances generated contain 20% batch tasks, 40% real-time tasks, and 40% synchronized tasks' steps. The FIG. 19 shows that the increase of the batch tasks percentage led to a better admission rate. That is because this kind of task has the most degree of freedom. It can be scheduled anywhere in the timeline. As more restrictions are added, scheduling the task becomes more difficult, that is why increasing the percentage of the real-time tasks led to a lower admission rate. Similar behavior can be concluded for the synchronized tasks.
[0142] FIG. 20 shows that the increase in the number of batch tasks affects the algorithm convergence speed tremendously. The solution space gets larger with the number of batch tasks. This causes the algorithm to find a better solution in most of the iterations. That is why it takes a longer time to converge.Algorithm Performance Against State of the Art: CPLEX
[0143] Standard CPLEX is a simplex algorithm (linear optimizer) that is written in C. It is a first practical method to solve a Linear Programming problem. To compare and evaluate the effectiveness of the solution proposed herein, it was compared to the reference CPLEX method. With the same workload setup as shown in table 3 below, the admission rate and the time of completion for each solution is characterized, using three workers.TABLE 3Tasks distribution for comparison: in total twenty-eighttasks are managed in this experiment, for three workers.Type of TaskNumberBatch Tasks8Real-Time Tasks8Synchronized Tasks2Subtasks3Steps2
[0144] The proposed solution and the CPLEX solution were implemented side-by-side to solve the same workload allocation problem where each try to solve a twenty-eight tasks instance.TABLE 4performance at a glance. Three workersare involved in this experiment.AlgorithmTasks AdmissionTypeRatesElapsed TimeSpeed-UpCPLEX100%3086seconds—Lagrangian100%0.001956seconds99.999%Relaxation
[0145] During the simulations, the CPLEX solution, while solving the twenty-eight tasks instance, encountered important memory usage. As summarized in table 4, the elapsed time shows how waiting time or latency is much higher compared to the proposed solution. Such drawback is particularly detrimental for URLLC and mMTC applications such as autonomous driving. Table 4 shows that the proposed solution can speed-up the workload allocation problem solving by around 99.9% compared with CPLEX. Indeed, it was observed that there is important latency with the CPLEX algorithm. Such large latency may be due to the waiting time. FIG. 21 shows the CPLEX performance. The header of FIGS. 21 and 22 is as explained next. Node is the node of the branch-and-cut tree currently being explored. Left indicate the nodes left to be explored. Objective represents the objective of the current solution. IInf is the number of integer-infeasible variables and special ordered lists. Best Integer is the best integer solution reached. Best Bound is the best upper bound reached for the solution. ItCnt records the cumulative iteration count of the algorithm solving the subproblems. Gap is the gap between the upper bound and best objective solution. Some situations can be observed where objectives are not feasible, meaning that the workload cannot be executed.
[0146] The solution proposed herein used the tasks classification to smartly distributed workload on each worker, as shown in FIG. 22.
[0147] Turning to FIG. 23, the proposed scheduling and synchronization solution can be implemented into the cloud as a service to assist edge computing application provider and to boost distributed computing and distributed AI / ML learning. Such proposal is suitable for use cases where a cluster of IoT devices work collaboratively to train a complex model. This solution can be deployed as a virtual tool for agility, reliability as a plug-in as it is agnostic to application. The proposed implementation can be leveraged as a premium service to provide enhanced service quality or extended quality of experience. The proposed solution could also be used as a service to boost distributed AI / ML model training where a cluster of trusted IoT device work collaboratively to train a complex model.
[0148] As a service, the proposal could be leased by the application providers, when latency and real-time constraints are required. Such deployment can only be supported by network allowing mMTC and URLLC use cases. Cloud-based approach may take place in trusted cloud environment where security and confidentiality are guaranteed.
[0149] The proposed cloud solution ensures efficient utilization of available compute resource in an edge computing system to maximize the edge computing application performance. This solution is deployed to maximize the weighted sum of requested tasks. Real-time and synchronous are essential for autonomous driving and collaborative AI / ML learning.
[0150] Referring to FIG. 24, there is provided a computer implemented method 2400 for scheduling and assigning tasks to computing resources. The method comprises receiving a list of tasks, step 2401, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight. The method comprises receiving computing resources specifications, step 2402. The method comprises using Lagrangian relaxation, step 2403, for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications. The method comprises preparing a plan, step 2404, for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
[0151] The tasks may be defined as such: the batch tasks are not time sensitive, the real-time tasks are time sensitive and need to be executed before expiry of a given lifetime, and the synchronous tasks contain subtasks that need to be executed in parallel, synchronously.
[0152] Each task of the list of tasks may have a computational load, a start time, and an end time. The weight may be indicative of how critical a task is, increasing weight indicating increasing criticality. The method may further comprise receiving a duration within which to schedule the list of tasks.
[0153] Using the Lagrangian relaxation may comprise, iteratively solving a relaxed equation using dual variables associated with task-worker pairs, to obtain a first solution; extracting a feasible solution from the first solution; and updating the dual variables. Solving the relaxed equation to obtain the first solution may comprises populating a tree with the dual variables associated with the task-worker pairs; and for each dual variable associated with a task-worker pair, computing a gain for adding the task to the worker and, if the gain is positive, adding the task to the worker.
[0154] Extracting the feasible solution from the first solution may comprise, for each worker, verifying that batch tasks and real-time tasks assigned to the worker can be handled according to the computing resources specifications; and for synchronized tasks, verifying that all steps of each synchronized task are scheduled synchronously among the workers.
[0155] The dual variables may be updated using Sub-Gradient Descent (SGD).
[0156] The relaxed equation may be defined as:LRobj=∑i∈Iωixi+∑i∈I_∑j∈Jλij[end[i,j]-st[i,j]-cp[i,j]+∑i∈Iδi(∑j∈Jxij-uixi)where LRobj is defined as a Lagrangian Relaxation objective, which corresponds to maximizing the weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications,
[0158] I is a set tasks,
[0159] J is a set of workers,
[0160] ωi is a weight of task i∈I,
[0161] xi∈{0,1} is 1 if task i∈Is is scheduled, Is is a set of synchronous tasks,
[0162] λij is the dual variable representing a task-worker,
[0163] end[i, j] is an execution end time of task i∈Ī, Ī being the list of batch tasks, real-time tasks and steps of synchronous tasks,
[0164] st[i, j] is an execution start time of task i∈Ī,
[0165] c[i, j] is a computation time of task i∈I at worker j∈J,
[0166] δi is a dual variable representing the fact that a task can only be served by a computing resource,
[0167] xij∈{0,1} is 1 if task i∈I is assigned to worker j∈J, and
[0168] ui is a number of workers assigned to a task.
[0169] It should be noted that methods and steps described herein are, generally, computer implemented methods and steps. The term computer may be interpreted as having different meanings, such as explained next, for example.
[0170] Referring to FIG. 25, there is provided an apparatus (HW) 2501, in which functions and steps described herein can be implemented.
[0171] The apparatus 2501 (which may go beyond what is illustrated in FIG. 25), may be a server, network node, edge node, radio base station, or other computing device which may be part of a cloud computing system, edge computing system, or which may be a standalone device. The apparatus may execute the steps and / or methods described herein to achieve task scheduling, including synchronized tasks, among multiple, possibly distributed, workers.
[0172] The apparatus 2501 comprises processing circuitry 2503 and memory 2505. The memory 2505 can contain instructions executable by the processing circuitry 2503 whereby functions and steps described herein may be executed to provide any of the relevant features and benefits disclosed herein.
[0173] The apparatus 2501 may also include non-transitory, persistent, machine-readable storage media 2507 having stored therein software and / or instruction 2509 executable by the processing circuitry 2503 to execute functions and steps described herein. The apparatus may also include network interface(s) and a power source.
[0174] The instructions 2509 may include a computer program for configuring the processing circuitry 2503. The computer program may be stored in a physical memory local to the device, which can be removable, or it could alternatively, or in part, be stored in the cloud. The computer program may also be embodied in a carrier such as an electronic signal, optical signal, radio signal, or computer readable storage medium.
[0175] Referring to FIG. 26, there is provided a virtualization environment 2600 in which functions and steps described herein can be implemented.
[0176] The virtualization environment 2600 (which may go beyond what is illustrated in FIG. 26), may comprise systems, networks, servers, nodes, devices, etc., that are in communication with each other either through wire or wirelessly, e.g. through a network interface component (NIC) comprising physical network interface(s). Some or all of the functions and steps described herein may be implemented as one or more virtual components (e.g., via one or more applications, components, functions, virtual machines, containers, etc.) executing on one or more physical apparatus in one or more networks, systems, environment, etc.
[0177] A virtualization environment provides hardware 2601 comprising processing circuitry 2603 and memory 2605. The memory 2605 can contain instructions executable by the processing circuitry 2603 whereby functions and steps described herein may be executed to provide any of the relevant features and benefits disclosed herein.
[0178] The hardware 2601 may also include non-transitory, persistent, machine-readable storage media 2607 having stored therein software and / or instruction 2609 executable by the processing circuitry 2603 to execute functions and steps described herein.
[0179] The instructions 2609 may include a computer program for configuring the processing circuitry 2603. The computer program may be stored in a removable memory, such as a portable compact disc, portable digital video disc, or other removable media. The computer program may be stored in a physical memory local to the hardware 2601, which can be removable, or it could alternatively, or in part, be stored in the cloud. The computer program may also be embodied in a carrier such as an electronic signal, optical signal, radio signal, or computer readable storage medium.
[0180] Referring to FIGS. 25 and 26, there is provided an apparatus 2501, 2601 comprising processing circuits 2503, 2603 and a memory 2505, 2605. The memory contains instructions executable by the processing circuits whereby the apparatus is operative to execute a scheduler to schedule and assign tasks to computing resources. The apparatus is operative to receive a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight. The apparatus is operative to receive computing resources specifications. The apparatus is operative to use Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications. The apparatus is operative to prepare a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
[0181] The tasks may be described as such: the batch tasks are not time sensitive, the real-time tasks are time sensitive and need to be executed before expiry of a given lifetime, and the synchronous tasks contain subtasks that need to be executed in parallel, synchronously.
[0182] Each task of the list of tasks may have a computational load, a start time, and an end time. The weight may be indicative of how critical a task is, increasing weight indicating increasing criticality. The apparatus may be further operative to receive a duration withing which to schedule the list of tasks.
[0183] The apparatus may be further operative to, iteratively, solve a relaxed equation using dual variables associated with task-worker pairs, to obtain a first solution; extract a feasible solution from the first solution; and update the dual variables.
[0184] The apparatus may be further operative to populate a tree with the dual variables associated with the task-worker pairs; and for each dual variable associated with a task-worker pair, compute a gain for adding the task to the worker and, if the gain is positive, add the task to the worker.
[0185] The apparatus may be further operative to verify that batch tasks and real-time tasks assigned to the worker can be handled according to the computing resources specifications; and for synchronized tasks, verify that all steps of each synchronized task are scheduled synchronously among the workers.
[0186] The dual variables may be updated using Sub-Gradient Descent (SGD).
[0187] The Lagrangian relaxation may be applied iteratively to solve the equation:LRobj=∑i∈Iωixi+∑i∈I_∑j∈Jλij[end[i,j]-st[i,j]-cp[i,j]+∑i∈Iδi(∑j∈Jxij-uixi)where LRobj is defined as a Lagrangian Relaxation objective, which corresponds to maximizing the weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications,
[0189] I is a set tasks,
[0190] J is a set of workers,
[0191] ωi is a weight of task i∈I,
[0192] xi∈{0,1} is 1 if task i∈Is is scheduled, Is is a set of synchronous tasks,
[0193] λij is the dual variable representing a task-worker,
[0194] end[i, j] is an execution end time of task i∈Ī, Ī being the list of batch tasks, real-time tasks and steps of synchronous tasks,
[0195] st[i, j] is an execution start time of task i∈Ī,
[0196] c[i, j] is a computation time of task i∈I at worker j∈J,
[0197] δi is a dual variable representing the fact that a task can only be served by a computing resource,
[0198] xij∈{0,1} is 1 if task i∈I is assigned to worker j∈J, and
[0199] ui is a number of workers assigned to a task.
[0200] The apparatus may be further operative to execute a controller, the controller comprising the scheduler and further comprising a validation and filter agent, the validation and filter agent being operative to receive the list of tasks, estimates parameters of each task of the list of tasks, and filter a task of the list of tasks based on an estimated probability that the scheduler will reject the task.
[0201] The list of tasks may originate from Internet of Things (IoT) devices and autonomous vehicles.
[0202] Referring to FIGS. 25 and 26, there is provided a non-transitory computer readable media 2507, 2607 having stored thereon instructions 2509, 2609 for scheduling and assigning tasks to computing resources. The instructions comprise receiving a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight. The instructions comprise receiving computing resources specifications. The instructions comprise using Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications. The instructions comprise preparing a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
[0203] Modifications will come to mind to one skilled in the art having the benefit of the teachings presented in the foregoing description and the associated drawings. Therefore, it is to be understood that modifications, such as specific forms other than those described above, are intended to be included within the scope of this disclosure. The previous description is merely illustrative and should not be considered restrictive in any way. The scope sought is given by the appended claims, rather than the preceding description, and all variations and equivalents that fall within the range of the claims are intended to be embraced therein. Although specific terms may be employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.
Claims
1. A computer implemented method for scheduling and assigning tasks to computing resources, comprising:receiving a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight;receiving computing resources specifications;using Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications; andpreparing a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
2. The method of claim 1, wherein the batch tasks are not time sensitive, the real-time tasks are time sensitive and need to be executed before expiry of a given lifetime, and the synchronous tasks contain subtasks that need to be executed in parallel, synchronously.
3. The method of claim 1, wherein each task of the list of tasks has a computational load, a start time, and an end time.
4. The method of claim 1, wherein the weight is indicative of how critical a task is, increasing weight indicating increasing criticality.
5. The method of claim 1, further comprising receiving a duration within which to schedule the list of tasks.
6. The method of claim 1, wherein using the Lagrangian relaxation comprises, iteratively:solving a relaxed equation using dual variables associated with task-worker pairs, to obtain a first solution;extracting a feasible solution from the first solution; andupdating the dual variables.
7. The method of claim 6, wherein solving the relaxed equation to obtain the first solution comprises:populating a tree with the dual variables associated with the task-worker pairs; andfor each dual variable associated with a task-worker pair, computing a gain for adding the task to the worker and, if the gain is positive, adding the task to the worker.
8. The method of claim 6, wherein extracting the feasible solution from the first solution comprises, for each worker, verifying that batch tasks and real-time tasks assigned to the worker can be handled according to the computing resources specifications; and for synchronized tasks, verifying that all steps of each synchronized task are scheduled synchronously among the workers.
9. The method of claim 6, wherein the dual variables are updated using Sub-Gradient Descent (SGD).
10. The method of claim 6, wherein the relaxed equation is defined as:LRobj=∑i ∈ Iωixi+∑i ∈I_∑j ∈ Jλij[end[i,j]-st[i,j]-cp[i,j]]+∑i ∈ Iδi (∑j ∈ Jxij-uixi)where LRobj is defined as a Lagrangian Relaxation objective, which corresponds to maximizing the weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications,I is a set tasks,J is a set of workers,ωi is a weight of task i∈I,xi∈{0,1} is 1 if task i∈Is is scheduled, Is is a set of synchronous tasks,λij is the dual variable representing a task-worker,end[i, j] is an execution end time of task i∈Ī, Ī being the list of batch tasks, real-time tasks and steps of synchronous tasks,st[i, j] is an execution start time of task i∈Ī,cp[i, j] is a computation time of task i∈I at worker j∈J,δi is a dual variable representing the fact that a task can only be served by a computing resource,xij∈{0,1} is 1 if task i∈I is assigned to worker j∈J, andui is a number of workers assigned to a task.
11. An apparatus comprising processing circuits and a memory, the memory containing instructions executable by the processing circuits whereby the apparatus is operative to execute a scheduler to schedule and assign tasks to computing resources, the apparatus being operative to:receive a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight;receive computing resources specifications;use Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications; andprepare a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
12. The apparatus of claim 11, wherein the batch tasks are not time sensitive, the real-time tasks are time sensitive and need to be executed before expiry of a given lifetime, and the synchronous tasks contain subtasks that need to be executed in parallel, synchronously.
13. (canceled)14. (canceled)15. (canceled)16. The apparatus of claim 11, further operative to, iteratively:solve a relaxed equation using dual variables associated with task-worker pairs, to obtain a first solution;extract a feasible solution from the first solution; andupdate the dual variables.
17. The apparatus of claim 16, further operative to:populate a tree with the dual variables associated with the task-worker pairs; andfor each dual variable associated with a task-worker pair, compute a gain for adding the task to the worker and, if the gain is positive, add the task to the worker.
18. The apparatus of claim 16, further operative to verify that batch tasks and real-time tasks assigned to the worker can be handled according to the computing resources specifications; and for synchronized tasks, verify that all steps of each synchronized task are scheduled synchronously among the workers.
19. The apparatus of claim 16, wherein the dual variables are updated using Sub-Gradient Descent (SGD).
20. The apparatus of claim 16, wherein the Lagrangian relaxation is applied iteratively to solve the equation:LRobj=∑i ∈ Iωixi+∑i ∈ I¯∑j ∈ Jλij[end[i,j]-st[i,j]-cp[i,j]]+∑i ∈ Iδi (∑j ∈ Jxij-uixi).where LRobj is defined as a Lagrangian Relaxation objective, which corresponds to maximizing the weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications,I is a set tasks,J is a set of workers,ωi is a weight of task i∈I,xi∈{0,1} is 1 if task i∈Is is scheduled, Is is a set of synchronous tasks,λij is the dual variable representing a task-worker,end[i, j] is an execution end time of task i∈Ī, Ī being the list of batch tasks, real-time tasks and steps of synchronous tasks,st[i, j] is an execution start time of task i∈Ī,cp[i, j] is a computation time of task i∈I at worker j∈J,δi is a dual variable representing the fact that a task can only be served by a computing resource,xij={0,1} is 1 if task i∈I is assigned to worker j∈J, andui is a number of workers assigned to a task.
21. The apparatus of claim 11, further operative to execute a controller, the controller comprising the scheduler and further comprising a validation and filter agent, the validation and filter agent being operative to receive the list of tasks, estimates parameters of each task of the list of tasks, and filter a task of the list of tasks based on an estimated probability that the scheduler will reject the task.
22. The apparatus of claim 11, wherein the list of tasks originates from Internet of Things (IoT) devices and autonomous vehicles.
23. A non-transitory computer readable media having stored thereon instructions for scheduling and assigning tasks to computing resources, the instructions comprising:receiving a list of tasks, the list of tasks including batch tasks, real-time tasks and synchronous tasks, each task being assigned a weight;receiving computing resources specifications;using Lagrangian relaxation for maximizing a weighted number of tasks, from the list of tasks, to be admitted according to the computing resources specifications; andpreparing a plan for each of the computing resources, each plan comprising a portion of the list of tasks scheduled and assigned to the computing resource.
