EP4473396A1 - Software optimization method and device for numa architecture - Google Patents
Software optimization method and device for numa architectureInfo
- Publication number
- EP4473396A1 EP4473396A1 EP22732026.4A EP22732026A EP4473396A1 EP 4473396 A1 EP4473396 A1 EP 4473396A1 EP 22732026 A EP22732026 A EP 22732026A EP 4473396 A1 EP4473396 A1 EP 4473396A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- variables
- functions
- memories
- core
- cores
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5044—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/483—Multiproc
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/502—Proximity
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/506—Constraint
Definitions
- the present disclosure relates to the field of computer technology.
- the present disclosure relates to a software optimization device and method for multi-core systems.
- NUMA Non-Uniform Memory Access
- FIG. 6 depicts an abstract model of the NUMA architecture, where each processor (also referred to as a core or as a central processing unit (CPU) in this disclosure) is directly coupled to a local random access memory (LRAM) of its own.
- LRAM local random access memory
- a plurality of processors may commonly share at least one global random access memory (GRAM).
- GRAM global random access memory
- the LRAM in this disclosure is different from a CPU cache, which is located inside a CPU and is not considered to be a memory accessible to other CPUs.
- the LRAM in this disclosure is accessible to all CPUs that have a bus connecting to it.
- the non-local memory may comprise a memory local to another processor, or a global memory shared between multiple processors, e.g., the GRAM.
- the NUMA architecture provides for separate memory allocations for each processor (or a group of processors) in a multiprocessor system, thereby avoiding the performance degradation when several processors attempt to address the same memory.
- an electronic control unit (ECU) of a motor vehicle may typically comprise a plurality of cores.
- Modem vehicles are now capable of supporting many sophisticated functions, such as infotainment, navigation, security, advanced engine emission control, image detection-based services, and autonomous driving. Accordingly, the number of ECUs embedded in a vehicle is steadily increasing and can reach more than 100 ECUs.
- a standardized architecture named AUTomotive Open System Architecture (AUTOSAR) is widely adopted to standardize hardware and software architectures used in modern vehicles, with the aim of simplifying the development and integration of vehicle-related software functions. Since AUTOSAR 4.0, multicore support was introduced.
- an Inter OS-Application Communicator was proposed as a connection with the runtime environment (RTE) of the software architecture to map communication across cores and memories.
- RTE runtime environment
- RTE runtime environment
- functions of a plurality of ECUs can be implemented in a single ECU.
- infotainment and navigation can be separately implemented on different ECUs, or jointly implemented on a same ECU.
- variables or labels
- functions or runnables
- the NUMA architecture is challenging in terms of predictability. Therefore, it is complex and time-consuming to map software functions and shared variables into cores.
- embedded system applications for multiprocessors may typically comprise thousands of functionalities communicating with each other in a well-connected pattern, using shared variables. It is far from trivial to map the functions and the variables to cores while assuring an optimal system performance.
- Typical software applications may comprise about thousands of functions and ten thousand shared variables.
- a target platform may comprise multiple cores, and multiple local and global RAMs. This makes it impossible to derive a solution for software deployment by hand or manually with guaranteed quality.
- a typical software deployment may comprise an allocation of functions to cores.
- One of the fundamental challenges in designing software for a multicore system is to ensure the effective use of available computing, communication, and memory resources. For example, in the AUTOSAR, as the IOC operates using a sender-receiver protocol, for example by implementing data memory buffers, finding a proper scheduling and corresponding execution of time-critical data transmissions may be a challenging task, for example, when attempting to implement a high degree of parallelism running on a plurality of cores.
- a vehicle controlling system may need to ensure that security functions are not to be blocked by other less urgent functions, such as navigation, etc.
- a first aspect of this disclosure provides a device for mapping a plurality of functions sharing a plurality of variables to a multi-core computing system.
- the multi-core computing system comprises a plurality of cores and a plurality of memories. Each core is coupled to a memory of the plurality of memories.
- the device is configured to allocate each of the variables to one of the plurality of memories based on one or more characteristics of the plurality of memories, to obtain an allocation of the variables to the memories.
- the device is further configured to map the plurality of functions to the plurality of cores based on the allocation of the variables to the memories.
- the one or more characteristics of the plurality of memories may comprise an access time of each memory.
- the device may be further configured to partition the variables with respect to the plurality of functions, to obtain a binding relationship between the variables and the functions.
- the device may be further configured to map the plurality of functions to the plurality of cores based further on the binding relationship between the variables and the functions.
- the binding relationship between the variables and the functions may comprise a one-to-one relationship, or a many-to-one relationship.
- each variable is bound to at most one function.
- a plurality of variables may be bound to a same function.
- the device may be configured to determine a mapped core on which a function is executed, so as to save the most execution time of the function.
- the device may be further configured to map one or more variables bound to the function in the binding relationship to a memory that is the closest or have the fastest access time with respect to the particular core.
- the device may be configured to, for each function: obtain a frequency with which the function is to be executed; and associate one or more variables of the plurality of variables with the function based on the frequency of the function.
- the frequency with which the function is to be executed may be understood as a maximum execution frequency of the function.
- the maximum execution frequency of each function may be pre-defined or pre-configured.
- the maximum execution frequency may be provided as an input to the device, e.g., by the provider of each function.
- the device may be configured to calculate the number of execution cycles that can be saved in one invocation of each function in the assumption that each variable is mapped to a local memory, which is the closest memory to a core where each function is executed.
- the device may be configured to compare different assumptions and associate one or more variables with each function in a way that a maximum total execution time can be saved. This has the advantage that more resources can be allocated to functions that are more frequently executed. In this way, hardware resources can be efficiently utilized, and the overall system performance may be improved.
- the one or more characteristics of the plurality of memories may comprise a size of each memory, and the device is configured to associate each variable based further on a size of the variable and on the size of each memory.
- the variables can be allocated based on the sizes of the variables and the size of each memory in a way that the total capacity of the memories is efficiently used. Moreover, it can be assured that no memory is overloaded.
- the device may be configured to map the functions to the plurality of cores based further on a quantity of cycles of each function required for executing the function on each core. In an implementation form of the first aspect, the device may be configured to map the functions to the plurality of cores in a way that each core is not overloaded.
- the plurality of cores may have different performance capabilities and power consumptions.
- the plurality of cores may comprise at least one high-performance core and at least one low power consumption core.
- the device may be configured to map a function that has more execution cycles to the high-performance core, and map a function that has fewer execution cycles to the low power consumption core.
- the device may be further configured to combine two or more functions of a same core into a task based on release patterns of the two or more functions of the same core.
- the combined two or more functions shall not self-suspend. That is, one function does not need to wait for another function to complete.
- the device may be further configured to assign a priority to each task, so as to minimize resource utilization of each core.
- the device may be configured to determine the priority of each task based on a deadline of the task.
- the deadline can be understood as a specific period of time within which the task needs to be completed.
- An advantage of using the deadline is that ensure that each task's specific timing constraints can be met.
- the device may be configured to determine the priority of each task based further on interferences caused by one or more further tasks.
- the device may assign a task that can cause greater interferences with a lower priority.
- the task causing greater interferences can be executed after other tasks are completed, so as to ensure a smooth system performance. In this way, the interferences between tasks can be reduced.
- the device may use the interferences as a constraint when determining the allocations of the variables and the functions.
- the device may be configured to determine the priority of each task based further on a blocking time during which the task is in a wait state.
- the device may use the blocking time as a constraint when determining the allocations of the variables and the functions.
- the device may be configured to group two or more functions into a single cluster function, wherein the two or more functions share one or more common partitioned variables, and map the single cluster function to a core of the plurality of cores.
- the device may be further configured to group two or more of the runnables and their bound labels into the single cluster function.
- the single cluster function may be of customizable sizes. In this disclosure, this scheme may be referred to as hierarchical clustering.
- the single cluster function (or simply, cluster) as a basic unit for mapping the functions to the cores, the number of parameters involved in the optimization of the mapping can be reduced.
- the advantage of clustering is that the tractability of the optimization of the software deployment can be ensured.
- the plurality of memories may comprise a global memory (or GRAM) and a plurality of local memories (or LRAMs).
- the global memory is shared by the plurality of cores, and each local memory is directly coupled to a core of the plurality of cores.
- the device may be configured to map the function to a core.
- the device may be further configured to map the one or more bound variables to an LRAM of the core. The mapping of the one or more bound variables may be done implicitly, which is a result of the binding relationship.
- the device may be further configured to allocate the one or more common partitioned variables associated with the cluster function to a local memory directly coupled to the mapped core.
- the plurality of functions may be a plurality of runnables of a software component for a run time environment, and the plurality of shared variables may be inputs to the software component.
- a second aspect of this disclosure provides a method for mapping a plurality of functions sharing a plurality of variables to a multi-core computing system.
- the multi-core computing system comprises a plurality of cores and a plurality of memories. Each core is coupled to a memory of the plurality of memories.
- the method is executed by a device and comprises the following steps: allocating, by the device, each of the variables to one of the plurality of memories based on one or more characteristics of the plurality of memories, to obtain an allocation of the variables to the memories; and mapping, by the device, the plurality of functions to the plurality of cores based on the allocation of the variables to the memories
- the one or more characteristics of the plurality of memories may comprise an access time of each memory.
- the method may further comprise: partitioning, by the device, the variables with respect to the plurality of functions, to obtain a binding relationship between the variables and the functions; and mapping, by the device, the plurality of functions to the plurality of cores based further on the binding relationship between the variables and the functions.
- the step of partitioning the variables may comprise: for each function: obtaining, by the device, a frequency with which the function is to be executed; and associating, by the device, one or more variables of the plurality of variables with the function based on the frequency of the function.
- the one or more characteristics of the plurality of memories may comprise a size of each memory
- the method may comprise associating, by the device, each variable based further on a size of the variable and on the size of each memory.
- the method may comprise mapping the functions to the plurality of cores based further on a quantity of cycles of each function required for executing the function on each core.
- the method may comprise mapping the functions to the plurality of cores in a way that each core is not overloaded.
- the method may comprise combining, by the device, two or more functions of a same core into a task based on release patterns of the two or more functions of the same core.
- the method may further comprise assigning, by the device, a priority to each task, so as to minimize resource utilization of each core.
- the method may further comprise determining, by the device, the priority of each task based on a deadline of the task.
- the method may further comprise determining, by the device, the priority of each task based further on interferences caused by one or more further tasks. In an implementation form of the second aspect, the method may comprise determining, by the device, the priority of each task based further on a blocking time during which the task is in a wait state.
- the step of mapping the plurality of functions to the plurality of cores may comprise grouping, by the device, two or more functions into a single cluster function, and mapping the single cluster function to a core of the plurality of cores.
- the two or more functions may share one or more common partitioned variables.
- the plurality of memories may comprise a global memory and a plurality of local memories.
- the global memory is shared by the plurality of cores, and each local memory is directly coupled to a core of the plurality of cores.
- the method may further comprise allocating the one or more common partitioned variables associated with the cluster function to a local memory directly coupled to the mapped core.
- the plurality of functions may be a plurality of runnables of a software component for a run time environment, and the plurality of shared variables may be inputs to the software component.
- the method of the second aspect and its implementation forms may achieve the same advantages and effects as described above for the device of the first aspect and its implementation forms.
- a third aspect of this disclosure provides a computer program comprising instructions which, when the program is executed by a computer, cause the computer to perform the method according to the second aspect or any of its implementation forms.
- a fourth aspect of this disclosure provides a non-transitory storage medium storing executable program code which, when executed by a processor, causes the method according to the second aspect or any of its implementation forms to be performed.
- FIG. 1 shows an example of a device according to this disclosure
- FIG. 2 shows an example of variable partitioning according to this disclosure
- FIG. 3 shows an example of hierarchical clustering according to this disclosure
- FIG. 4 shows a diagram of a method according to this disclosure
- FIG. 5 shows a diagram of a further method according to this disclosure.
- FIG. 6 shows an example of a NUMA architecture.
- the present disclosure generally relates to a software deployment optimization for multicore computing systems (or simply, multicore systems).
- the present disclosure may be applied to various multicore systems, such as the NUMA architecture exemplarily depicted in FIG. 6.
- FIG. 1 shows an example of a device 100 according to the present disclosure.
- the device 100 may be a software deployment tool, which is adapted to map a plurality of functions sharing a plurality of variables to a multi-core computing system.
- the multi-core computing system comprises multiple cores and multiple memories. Each core is directly coupled to a memory, which may be referred to as an LRAM.
- LRAM memory
- the shared memory may be referred to as a GRAM.
- the multi-core computing system may comprise two cores (core 1, core 2) and three memories (LRAM 1, LRAM 2, GRAM).
- LRAM 1 and LRAM 2 are directly coupled to core 1 and core 2, respectively, while GRAM is globally shared among core 1 and core 2.
- the memories may be of different characteristics, such as but not limited to access times and sizes. For example, access times to memory are about one order of magnitude shorter from cores which are directly connected to them.
- FIG. 1 on its left-hand side depicts an abstract example of functions to be executed on the multicore computing system and variables shared among the functions.
- the functions may be referred to as runnables.
- the variables may be understood as read and written data associated with each function.
- the variables may be referred to as labels.
- the runnables may be part of one or more software components.
- the software components may be architectural elements that provide and/or require interfaces and are connected to each other in order to fulfill architectural responsibilities.
- the software components may be for a run time environment, such as an AUTOSAR.
- one variable may be dedicated to only one function (e.g., variable c and function 2), or may be used by two or more functions.
- one function may have only one variable (e.g., function 1 and variable a), or may have two or more variables.
- the device 100 is configured to allocate each of the variables to one of the plurality of memories based on one or more characteristics of the plurality of memories, to obtain an allocation of the variables to the memories.
- the device 100 is further configured to map the plurality of functions to the plurality of cores based on the allocation of the variables to the memories.
- the step of “mapping the plurality of functions to the plurality of cores based on the allocation of the variables to the memories” in the present disclosure may alternatively be understood as “mapping the plurality of functions to the plurality of cores in combination with the allocation of the variables to the memories”. That is, the device takes the one or more characteristics of the plurality of memories into consideration for mapping the variables. Since the functions share the variables, the mapping of the variables and the mapping of the functions may mutually affect each other. That is to say, the device 100 may be further configured to map the variables to the memories based on the mapping of the functions to the cores. The whole process may be understood as an optimization procedure until a cost function is fulfilled, when the device 100 may obtain an optimal mapping of the variables and an optimal mapping of the functions.
- the device 100 may be configured to use binary integer linear programming (BILP) to determine an optimal mapping of the functions to the cores and an optimal mapping of the variables to the memories.
- BILP binary integer linear programming
- the device 100 may be configured to obtain application definitions of the functions (or software components) as one input for determining software deployment.
- the device 100 may be configured to obtain information about a set of functions, and information on read and written data (e.g., variables, labels) of each function, such as data size, latency requirement, dependency, etc.
- the device 100 may be configured to obtain a specification of the multicore system as one input for determining software deployment.
- the specification of the multicore system may comprise, for example, the number of cores and memories, the hierarchy of the memories, and information on costs for local (e.g., LRAM) and remote memory (e.g., GRAM) accesses.
- the device 100 may be configured to obtain real-time properties of the functions (or software components) with respect to the multicore system as one input for determining software deployment.
- the real-time properties may comprise execution time for each function on an assumption that its variables are in GRAM, or in a memory with the largest access time; and a gain of execution cycles by one invocation of the function if its variables are in its LRAM.
- the real-time properties may be estimated or calculated by using existing runtime performance analysis tools commonly known in the field.
- FIG. 2 shows an example of variable partitioning according to the present disclosure.
- the variable partitioning may be referred to as label binding.
- the device 100 of FIG. 1 may be configured to partition the variables with respect to the plurality of functions, to obtain a binding relationship between the variables and the functions.
- the device 100 may be further configured to map the plurality of functions to the plurality of cores based further on the binding relationship between the variables and the functions.
- variables may represent portions of memories (possibly as small as a single bit) used by the runnables to communicate with each other. It is preferable to allocate the labels to available memory areas, which may be any one of the LRAMs or the GRAM, in an appropriate manner to increase communication efficiency.
- available memory areas which may be any one of the LRAMs or the GRAM, in an appropriate manner to increase communication efficiency.
- the impact of variable partitioning (or label binding) is on the execution time of the runnables. In fact, access times to the memories are about one order of magnitude shorter from cores that are directly connected to them.
- FIG. 2 seven runnables 1-7 and eleven labels a-k are exemplarily shown.
- One runnable may share one or more labels with one or more other runnables.
- the device 100 may be configured to bind the labels to the runnables as an initial step.
- a general principle of label binding is that, when runnable i is mapped to core k, then all the labels bound to runnable i may be mapped to a memory local to core k, optionally on the condition that the local memory is not overloaded.
- each label is bounded to only one runnable, which is represented by a solid usage line.
- the bounded label may still be accessible by other runnables but not bound to other runnables, which is represented by a dashed usage line. That is, the binding relationship between the variables and the functions may be disjoint, which means that each label may be bound to at most one runnable.
- the label binding problem may be formulated as follows.
- N, L, i, j, and I are positive integers.
- the gain g i,l may depend on the size of label I and on the number of accesses to label I by one invocation of runnable i.
- f i represents the maximum frequency of execution of the runnable.
- the device 100 may be configured to obtain the maximum frequency of execution of each runnable as one input, e.g., from the software provider.
- An aim of binding labels to runnables is to minimize resource usage. Assuming each runnable may be executed with a frequency f i , a metric to be maximized may be formulated as follows:
- Equation 2 The rationale of the cost function in Equation 2 is to assign label I to runnable i to obtain a binding relationship between the labels and the runnables, so that the multicore system may benefit the most in terms of saving processing time. Equations 1 and 2 may ensure the largest utilization gain represented by execution time saving multiplied by the frequency of execution ft-
- the device 100 may be further configured to apply the following constraint: This may ensure that the total memory local to the runnable i is not overloaded. Moreover, the device 100 may be further configured to apply the following constraint: ) which is to ensure that the total size of local memory is not overloaded, wherein S k ore denotes the total size of the local memory of core k.
- the device may be further configured to ensure that a label is bound to at most one runnable by applying: After an optimal solution is found, a disjoint subset Li is defined by comprising all labels assigned to the runnable i.
- the labels I may be bound to the runnables following the next rules:
- labels are selected to be bound to runnables following the ordering defined above, until the constraint (4) is reached
- the device 100 is further configured to map the functions (or runnables) to the cores (or CPUs).
- the device 100 may be configured to obtain an optimal solution for mapping the runnables to the CPUs based on a BILP problem.
- variables y i k may be modelled with the following notion:
- the device 100 may be further configured to determine whether or not any pair or runnables is mapped onto the same CPU. If two runnables share the same CPU, then the communication between them may be more efficient through the LRAM of the same CPU, which is faster than through the GRAM. To implement this condition into the BILP problem, variables may be modeled with the following notion:
- the device 100 may be configured not to overload any core; this corresponds to the maximum utilization constraint as follows:
- an advantage may be that core utilization may be minimized based on a general or per-core metric. That is, a mapping may be driven by the maximization of the slack on all cores.
- the device 100 may be further configured to combine two or more functions of a same core into a task based on release patterns of the two or more functions of the same core. For example, if two runnables have the same release pattern and do not self-suspend, the two runnables are mapped to the same CPU, then they may be aggregated into the same task.
- the aggregation of runnables may be formulated as follows.
- a set of tasks is denoted by ⁇ .
- a set of runnables of runnables to form task I is denoted by The subsets in form a partition of in a way that every runnable belongs to one and only one subset
- the equivalence relation ⁇ over pairs of runnables encodes the aggregation of runnables. That is, i ⁇ j denotes that “the two runnables i and j have the same release pattern and none of them self-suspends”.
- the runnables in belonging to the same task I may be defined as follows:
- a minimum interarrival time (or a period) of task I ⁇ ⁇ is:
- a deadline of task I ⁇ ⁇ is:
- a partition of tasks over M CPUs may be defined as follows:
- the device 100 may be further configured to assign a priority to each task, so as to minimize resource utilization of each core.
- priorities are comparable only within the same CPUs, since scheduling decisions within CPUs are independent. Hence, the assignment of priorities to tasks in must be performed For brevity, is omitted in all equations related to priority assignment.
- Priorities among tasks yield an ordering.
- the ordering of tasks by priority is a total order among disjoint subsets of tasks, with the subsets of tasks representing the tasks with the same priority. If the cardinality of all subsets is 1, then all tasks have a distinct priority and the ordering is total.
- the relationship among the tasks modelled by the variables is a partial order among tasks.
- the order is partial, because tasks may possibly have the same priority.
- Constraints on variables x ⁇ J enforce the property of an ordering.
- the constraints comprise: reflexivity, which is enforced implicitly by omitting the variable as it would always be
- reflexivity is enforced implicitly by omitting the variables symmetry is enforced implicitly by defining only when i ⁇ j;
- every runnable may be a deadline D i . If it is not set explicitly, an implicit deadline of the runnable i is equal to its period T i defined in Equation 18.
- the deadline constraint of all tasks on a given CPU is written as:
- C i denotes the worst-case execution time of the runnable itself
- I i denotes the interference caused by higher or same priority runnables
- B i denotes the blocking time, which is the time spent by runnable i waiting for some resources (e.g., one or more labels used by other runnables) to become available.
- the execution time C i of the runnable i is given by Equation 17.
- the interference I i experienced by runnable is written as the following linear combination of decision variables:
- the variables are equal to 1, if and only if task i has the same priority as task j. Similarly, the variables are equal to 1, if and only if task i has a higher priority than task j . In Equation 29, two contributions to the interference are introduced.
- the first one is the execution of tasks with the same priority. Tasks with the same priority are scheduled in first-in-first-out (FIFO) order, this contribution is equal to the sum of the execution cycles of all tasks with the same priority, except task i itself.
- the second one is the execution of tasks with higher priority.
- An over-approximation of the interference is used here, which fully accounts for the execution cycles of all releases of higher priority tasks in the interval [0, D i ) .
- the exact expression of the interference It requires the evaluation of the minimum among several linear expressions. Such a minimum, however, breaks the convexity of the feasible region, which makes the optimization intractable. Hence, the over-approximation for I i of Equation 29 is used for the purpose of assigning priorities only.
- the blocking time B i is the time spent by task i in a “waiting” state, which may be caused by an attempt to access a shared resource locked by any lower priority task within the same CPU or any task executing on other CPUs.
- the waiting state may also be caused by an invocation of a blocking system call such as a remote procedure call.
- the blocking time B L is a linear function of the decision variables, hence it is well suited for the purpose of the priority assignment problem.
- the device 100 may determine an optimization goal.
- the optimization goal is to maximize the extensibility of the application deployment, which may be understood as having as much “space” as possible to accommodate future new functionalities.
- the following normalized form is proposed: linear combination of the binary variables ⁇ 1. (28)
- the device 100 may be configured to perform hierarchical clustering on the runnables and the labels.
- Grouping the runnables can be easily achieved, for example, by means of hierarchical clustering, especially with an agglomerative approach that can build increasingly larger groups of runnables from the bottom up.
- the distance concept is substituted by a similarity measure, with a value equal to the gain two runnables would have if ran on the same core and their assigned labels were located in the local memory of the same core.
- This similarity concept can be automatically extended to a case when runnables to be joined are already groups of runnables, since all labels assigned to the runnables of the group participant to the evaluation of the joint similarity value.
- An advantage of using hierarchical clustering is that one builds the entire hierarchical tree during the procedure, and this tree can be cut into any level of choice, hence having an algorithm that groups runnables and partitions them in any number of clusters. This can be further added with a parallel evaluation of cycles and memory required by every cluster to run, hence providing a stopping (or “branching”) condition for the clustering procedure when, for example, the memory required for one cluster exceeds a predefined amount.
- FIG. 3 shows an example of hierarchical clustering according to this disclosure.
- the device 100 may be configured to group runnables 1-7 into a plurality of clusters 310, 311, 320, 321, 322.
- Cluster 311 is a branch (or child) of cluster 310, and clusters 321 and 322 are branches of cluster 320.
- the device 100 may be configured to adjust the number of clusters according to the complexity of the optimization problem. For example, if after evaluation, a maximum of three clusters are allowed, then the device 100 may use clusters 310, 321, and 320 as basic units for the optimization.
- FIG. 4 shows a diagram of a method 400 according to this disclosure.
- the method 400 is performed by a device for mapping a plurality of functions sharing a plurality of variables to a multi-core computing system.
- the multi-core computing system comprises a plurality of cores and a plurality of memories, wherein each core is coupled to a memory of the plurality of memories.
- the method 400 comprises the following steps:
- Step 401 allocating, by the device, each of the variables to one of a plurality of memories based on one or more characteristics of the plurality of memories, to obtain an allocation of the variables to the memories;
- Step 402 mapping the plurality of functions to the plurality of cores based on the allocation of the variables to the memories.
- the steps of the method 400 may share the same functions and details from the perspective of FIG. 1-3 described with respect to the device 100 above. Therefore, the corresponding method implementations are not described again at this point.
- FIG. 5 shows a diagram of a method 500 according to this disclosure.
- the method 500 is based on the method 400 of FIG. 4 and comprises the following steps:
- Step 501 binding, by the device of FIG. 4, the labels to the runnables
- Step 502 mapping, by the device, the runnables to the cores
- Step 503 mapping, by the device, the labels to the memories
- Step 504 mapping, by the device, the runnables to tasks
- Step 505 assigning, by the device, priorities to the tasks
- Step 506 generating, by the device, constraints of a software deployment optimization problem.
- Step 507 solving, by the device, the optimization problem based on an objective function.
- Step 501 is optional and may share the same functions and details from the perspective of the label binding problem addressed in FIG. 1-3 and Equations 1-5.
- Step 502 corresponds to Step 402 of FIG. 4 and may share the same features and details from the perspective of FIG. 1-3 described with respect to Equations 6-13.
- Step 503 corresponds to Step 401 of FIG. 4 and may share the same features and functions likewise. It is noted that there may be no strict order for performing steps 502 and 503.
- Step 504 is optional and may share the same features and details from the perspective of FIG. 1-3 described with respect to Equations 14-18.
- Step 505 is optional and may share the same features and details from the perspective of FIG. 1-3 described with respect to Equations 19-25.
- Step 506 may share the same features and details from the perspective of FIG. 1-3 described with respect to Equations 26-27.
- Step 507 may share the same features and details from the perspective of FIG. 1-3 described with respect to Equations 28-30.
- mapping of labels to memories is proposed in addition to mapping functions to cores. It has the advantage that the resource usage of the computing system can be optimized.
- This disclosure can be applied to embedded application deployment on a system of multi-core architecture.
- the embedded application may comprise software components, which comprise runnables executed in a run time environment.
- the runnables are resource-sensitive.
- the number of parameters used in solving the BILP problem can be reduced about one order of magnitude. This can make the BILP problem tractable.
- the slack of all cores can be maximized.
- a further advantage of this disclosure is that the proposed equations in this disclosure are all expressed as linear constraints among the parameters. Therefore, it reduced the complexity of the BILP problem.
- the method for performing the software deployment disclosed in this disclosure may be implemented in any programming language and may be adapted to be executed on any hardware platform.
- This disclosure can be applied to any multicore or heterogeneous hardware platforms, where real-time guarantees shall be respected.
- This disclosure may have the following advantages.
- This disclosure can be applied to any software deployment tool, such as an AUTOSAR system configuration tool. This disclosure may help to improve the quality of products and enable automation of the software deployment process.
- the device may comprise a processor or processing circuitry (not shown) configured to perform, conduct or initiate the various operations of the device described herein.
- the processing circuitry may comprise hardware and/or the processing circuitry may be controlled by software.
- the hardware may comprise analog circuitry or digital circuitry, or both analog and digital circuitry.
- the digital circuitry may comprise components such as applicationspecific integrated circuits (ASICs), field-programmable arrays (FPGAs), digital signal processors (DSPs), or multi-purpose processors.
- the device may further comprise memory circuitry, which stores one or more instruction(s) that can be executed by the processor or by the processing circuitry, for example, under the control of the software.
- the memory circuitry may comprise a non-transitory storage medium storing executable software code which, when executed by the processor or the processing circuitry, causes the various operations of the device to be performed.
- the processing circuitry comprises one or more processors and a non-transitory memory connected to the one or more processors.
- the non-transitory memory may carry executable program code which, when executed by the one or more processors, causes the device to perform, conduct or initiate the operations or methods described herein.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
Claims
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/EP2022/063829 WO2023227187A1 (en) | 2022-05-23 | 2022-05-23 | Software optimization method and device for numa architecture |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| EP4473396A1 true EP4473396A1 (en) | 2024-12-11 |
Family
ID=82117403
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP22732026.4A Pending EP4473396A1 (en) | 2022-05-23 | 2022-05-23 | Software optimization method and device for numa architecture |
Country Status (3)
| Country | Link |
|---|---|
| EP (1) | EP4473396A1 (en) |
| CN (1) | CN117441161A (en) |
| WO (1) | WO2023227187A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119576581B (en) * | 2025-01-23 | 2025-05-06 | 北京轻网科技股份有限公司 | A memory pool optimization method and device for a multi-core system |
-
2022
- 2022-05-23 EP EP22732026.4A patent/EP4473396A1/en active Pending
- 2022-05-23 CN CN202280005934.7A patent/CN117441161A/en active Pending
- 2022-05-23 WO PCT/EP2022/063829 patent/WO2023227187A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| CN117441161A (en) | 2024-01-23 |
| WO2023227187A1 (en) | 2023-11-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN120066806B (en) | Task processing method of artificial intelligent processor, storage medium and electronic equipment | |
| CN107038069B (en) | Dynamic label matching DLMS scheduling method under Hadoop platform | |
| JP2023511467A (en) | Task scheduling for machine learning workloads | |
| US11954419B2 (en) | Dynamic allocation of computing resources for electronic design automation operations | |
| CN103207782A (en) | Method for establishing partition system based on multi-kernel MOS (Module Operating System) | |
| US9471387B2 (en) | Scheduling in job execution | |
| CN110300959B (en) | Method, system, device, apparatus and medium for dynamic runtime task management | |
| KR20220049294A (en) | Scheduler, method for operating the same and electronic device including the same | |
| CN111858056A (en) | Task scheduling method, apparatus, computer equipment and storage medium | |
| US11392415B2 (en) | Electronic devices and methods for 5G and B5G multi-core load balancing | |
| CN101794239A (en) | Multiprocessor task scheduling management method based on data flow model | |
| CN116382880B (en) | Task execution method, device, processor, electronic equipment and storage medium | |
| CN120653414A (en) | Elastic microkernel-based chip resource elastic allocation method and device | |
| Sedighi et al. | Dynamic task scheduling and adaptive gpu resource allocation in the cloud | |
| WO2023227187A1 (en) | Software optimization method and device for numa architecture | |
| US20120137300A1 (en) | Information Processor and Information Processing Method | |
| US10503557B2 (en) | Method of processing OpenCL kernel and computing device therefor | |
| CN119292741A (en) | Task management and scheduling methods for reconfigurable processors | |
| Shih et al. | Fairness scheduler for virtual machines on heterogonous multi-core platforms | |
| Zhou et al. | Taskflare: A heterogeneity-aware unified scheduling framework for diverse domain-specific applications in supercomputing environments | |
| WO2024164369A1 (en) | Resource-aware task allocation method for mixed-criticality partitioned real-time operating system | |
| CN118193142A (en) | Task concurrency method and related products for script interpretation language | |
| Gheibi-Fetrat et al. | RTGPU: Real-time computing with graphics processing units | |
| US20260003589A1 (en) | Systems and methods for computation and communication using processing devices | |
| US20250173191A1 (en) | Memory allocation method and memory allocation device using unified memory in a multitenant gpu environment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: UNKNOWN |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE |
|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| 17P | Request for examination filed |
Effective date: 20240903 |
|
| AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| DAV | Request for validation of the european patent (deleted) | ||
| DAX | Request for extension of the european patent (deleted) | ||
| RAP3 | Party data changed (applicant data changed or rights of an application transferred) |
Owner name: YINWANG INTELLIGENT TECHNOLOGIES CO., LTD. |