WO2013058396A1 - Task allocation device and task allocation method - Google Patents

Task allocation device and task allocation method Download PDF

Info

Publication number
WO2013058396A1
WO2013058396A1 PCT/JP2012/077175 JP2012077175W WO2013058396A1 WO 2013058396 A1 WO2013058396 A1 WO 2013058396A1 JP 2012077175 W JP2012077175 W JP 2012077175W WO 2013058396 A1 WO2013058396 A1 WO 2013058396A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
order
weight
tasks
dependency
Prior art date
Application number
PCT/JP2012/077175
Other languages
French (fr)
Japanese (ja)
Inventor
紀章 鈴木
Original Assignee
日本電気株式会社
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社 filed Critical 日本電気株式会社
Priority to JP2013539721A priority Critical patent/JP5983623B2/en
Publication of WO2013058396A1 publication Critical patent/WO2013058396A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation 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/5038Allocation 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 the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Definitions

  • the present invention relates to a multi-core, and more particularly, to a task placement apparatus and a task placement method for an AMP (Asymmetric Multi Processing) type multi-core.
  • AMP Asymmetric Multi Processing
  • the SMP method is not suitable for application to a real-time system.
  • the AMP method has a function-distributed configuration in which each task is executed on a specific core. For this reason, the AMP method is suitable for a real-time system in which prediction of system behavior is important, a system in which a core to which specific hardware is connected is limited, and the like.
  • Such an AMP multi-core system has different performance based on which core the task is arranged. For this reason, the AMP multi-core system needs to search various task placements and determine the optimum placement so as to be in an optimal execution state.
  • Patent Document 1 describes an apparatus that supports such multi-core task placement.
  • the apparatus described in Patent Document 1 first acquires information (granularity information) regarding the granularity allocated to each core.
  • the granularity is, for example, a unit of processing of the processor, and is a generic name for tasks, functions, and processes constituting the functions.
  • this apparatus calculates the number of appearances for each task or for each function of the task based on the acquired granularity information, and generates information (structure information) regarding the calculated number of appearances.
  • this device generates information (dependence information) related to dependence on other tasks or functions for each task or for each function of the task based on the acquired granularity information.
  • this apparatus displays the information showing the dependence which exists between different cores based on granularity information, structure information, and dependence information. Based on this configuration, the device described in Patent Document 1 can support task placement that reduces the number of dependencies existing between different cores in a multi-core system. JP 2007-264734 A
  • inter-core dependency refers to a dependency relationship between tasks arranged in different cores.
  • the existence of such inter-core dependency is because a task placed on a core needs to wait for a task on another core to finish even though one core is free to execute the task. This is a cause of wasted time that it cannot be executed.
  • the apparatus described in Patent Document 1 has a certain effect on the reduction of dead time based on waiting for dependence, based on minimizing the number of inter-core dependences.
  • dead time is not sufficiently reduced by minimizing inter-core dependence. Such a case will be described below.
  • the dependency between tasks may become a critical problem.
  • a task set For example, as the execution of the entire task group (hereinafter also referred to as a task set) approaches the end, the dependency between tasks may become a critical problem. The reason for this will be described. Immediately after starting the execution of the task set, many tasks are ready to be executed. For this reason, immediately after the start of execution of the task set, even if there is some inter-core dependence, there is not much dependence waiting time. However, in a situation where the execution of the task set has advanced, the execution of many tasks has already been completed. This reduces the number of tasks that can be executed other than the task waiting for dependency.
  • the dependency waiting based on inter-core dependency is more likely to occur as the position where each task can be executed (hereinafter also referred to as an order) in the flow of execution of the entire task set is backward (closer to the end). Moreover, even if it is not near the end of execution of the entire task set, a situation in which there are few executable tasks may occur. For example, there may be a problem of inter-core dependency between tasks having similar ranks in the flow of execution of the entire task set. The reason will be described. When tasks having dependency relationships are arranged in different cores, if the end of execution of the dependency source task is delayed based on some factor, a situation in which the dependency destination task waits occurs.
  • An object of the present invention is to solve the above-mentioned problems, and to reduce the influence of non-uniform inter-core dependence based on the order for AMP-based multi-core systems, and achieve task performance with higher performance. To provide an apparatus.
  • the task placement device of the present invention for a task set that is a set of tasks to be placed, a task set parameter holding means for holding a task set parameter including information representing a dependency relationship between the tasks, the task set parameter, Based on the order in which each task can be executed in the execution flow of the entire task set, an ordering weight that is a coefficient representing a weight based on the order is assigned to each dependency relationship between the tasks.
  • the rank weight assigned to the dependency relationship between the two tasks placed in different cores is included in different cores.
  • an arrangement means for calculating an evaluation value by using and arranging a task based on the calculated evaluation value.
  • the task placement method of the present invention holds a task set parameter including information representing a dependency relationship between the tasks for a task set that is a set of tasks to be placed, and the task set parameter and the entire task set And assigning rank weights, which are coefficients representing weights based on the ranks, to the dependency relationships between the tasks, based on ranks that are positions where each task can be executed in the flow of execution of
  • rank weights which are coefficients representing weights based on the ranks
  • the program of the present invention is a task set parameter holding process for holding a task set parameter including information representing a dependency relationship between tasks for a task set which is a set of tasks to be arranged, the task set parameter, Based on the order in which each task can be executed in the execution flow of the entire task set, an ordering weight that is a coefficient representing a weight based on the order is assigned to each dependency relationship between the tasks.
  • the order weight assignment process and when a task belonging to the task set is placed in one or more cores according to the dependency relation, the order weight given to the dependency relation between two tasks placed in different cores And calculating an evaluation value using the computer, and causing the computer to execute a placement process for arranging a task based on the calculated evaluation value.
  • FIG. 1 is a block diagram showing an example of a hardware configuration of a task placement device as a first exemplary embodiment of the present invention.
  • FIG. 2 is a block diagram showing an example of the function of the task placement device as the first exemplary embodiment of the present invention.
  • FIG. 3 is a block diagram showing an example of the configuration of the rank weight assigning unit in the first embodiment of the present invention.
  • FIG. 4 is a block diagram illustrating an example of the configuration of the arrangement unit according to the first embodiment of the present invention.
  • FIG. 5 is a flowchart for explaining an example of the operation of the task placement device as the first exemplary embodiment of the present invention.
  • FIG. 6 is a schematic diagram showing an example of a task set targeted by the task placement device as the first exemplary embodiment of the present invention.
  • FIG. 7A is a diagram illustrating an example of a data structure of a task set parameter holding unit according to the first embodiment of this invention.
  • FIG. 7B is a diagram illustrating an example of a data structure of a task set parameter holding unit according to the first embodiment of this invention.
  • FIG. 7C is a diagram illustrating an example of a data structure of a task set parameter holding unit according to the first embodiment of this invention.
  • FIG. 8 is a schematic diagram illustrating an example of a sequence code assigned to each task according to the first embodiment of this invention.
  • FIG. 9 is a schematic diagram illustrating another example of a sequence code assigned to each task in the first embodiment of the present invention.
  • FIG. 10 is a schematic diagram showing still another example of the ordinal code assigned to each task in the first embodiment of the present invention.
  • FIG. 11 is a schematic diagram illustrating an example of rank weights assigned to each dependency relationship according to the first embodiment of this invention.
  • FIG. 12 is a schematic diagram illustrating another example of rank weights assigned to each dependency relationship according to the first embodiment of this invention.
  • FIG. 13 is a schematic diagram showing still another example of the ordering weights given to each dependency relationship in the first embodiment of the present invention.
  • FIG. 14 is a schematic diagram for explaining inter-core dependence existing in task placement candidates in the first exemplary embodiment of the present invention.
  • FIG. 15 is a block diagram showing an example of the function of the task placement device as the second exemplary embodiment of the present invention.
  • FIG. 16A is a diagram illustrating an example of a data structure of an ordinal code holding unit according to the second embodiment of the present invention.
  • 16B is a diagram illustrating an example of a data structure of an ordinal code holding unit in the second embodiment of the present invention. It is a flowchart explaining an example of operation
  • positioning apparatus as the 2nd Embodiment of this invention.
  • the task placement apparatus is configured to configure each task set when designing and implementing a function-distributed AMP multicore system in which each task is executed by a specific core.
  • This is a device that determines in which core a task is to be placed.
  • the performance of an AMP multi-core system differs depending on which core the task is placed on.
  • task placement that enhances the performance of a multi-core system is possible based on the task placement device of each embodiment of the present invention.
  • an AMP multicore system targeted in each embodiment of the present invention is simply referred to as a multicore system.
  • FIG. 1 shows an example of the hardware configuration of the task placement device 1 as the first exemplary embodiment of the present invention.
  • a task placement device 1 includes a CPU (Central Processing Unit) 1001, a RAM (Random Access Memory) 1002, a ROM (Read Only Memory) 1003, and a storage device 1004 such as a hard disk, and constitutes a computer. is doing.
  • the ROM 1003 and the storage device 1004 store programs and various data for causing a computer to function as the task placement device 1 of the present embodiment.
  • the CPU 1001 reads the program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them.
  • the task placement device 1 includes a task set parameter holding unit 11, an ordering weight assigning unit 12, and a placement unit 13.
  • the task set parameter holding unit 11 is configured using, for example, a storage device 1004.
  • the rank weight assigning unit 12 and the arranging unit 13 are configured using, for example, a CPU 1001 that reads a computer program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them.
  • the hardware configuration configuring each functional block of the task placement device 1 is not limited to the configuration described above.
  • the task set parameter holding unit 11 holds task set parameters input from the outside.
  • the task set parameter is information representing the characteristics of individual tasks constituting a task set (a set of one or more tasks to be arranged).
  • the task set parameter includes information representing a dependency relationship between tasks.
  • the task set parameter may include information representing the task start cycle, execution time, required memory size, and the like.
  • the task set parameter holding unit 11 copies the task set parameter. There is no need to hold it.
  • the task set parameter holding unit 11 may hold information indicating the file or the like.
  • the task set parameter holding unit 11 may further hold information indicating the order of each task.
  • the rank weight assigning unit 12 refers to the task set parameters held in the task set parameter holding unit 11 and assigns rank weights to each dependency based on the rank of each task.
  • the rank of each task means a position where each task can be executed in the flow of execution of the entire task set based on the dependency relationship.
  • the rank weight is a coefficient representing the weight based on the rank. Specifically, it can be said that the rank weight is a coefficient representing the degree of ease of execution waiting time based on the dependency. The ease of occurrence of such an execution waiting time changes based on the order of related tasks related to the dependency. Therefore, the rank weight is information based on the rank.
  • the order weight assigning unit 12 includes an order code generation unit 121 and a weighting unit 122, as shown in FIG.
  • the order code generation unit 121 generates an order code indicating the order of each task in the target task set.
  • the order code generation unit 121 may calculate the order code of each task based on the task set parameter held in the task set parameter holding unit 11.
  • the rank code generation unit 121 omits the process of calculating the rank code, and the task set parameter holding unit 11 What is necessary is just to acquire the order code of a task.
  • the task set parameter holding unit 11 may hold an order code or may hold information on each task in an order corresponding to the order code.
  • the weighting unit 122 assigns a sequence weight to each dependency relationship between tasks based on the sequence code generated (or acquired) using the sequence code generation unit 121. For example, the weighting unit 122 may increase the rank weight as the rank of each task having a dependency relationship is closer to the end in the flow of execution of the entire task set. Further, for example, the weighting unit 122 may increase the order weight as the order of two tasks having a dependency relationship is closer.
  • heavy ordering weight means that the dependency waiting time based on the dependency relationship is more likely to occur. The value of the ordering weight may be larger as it is heavier or smaller as it is heavier.
  • the placement unit 13 When the placement unit 13 places a task belonging to a task set on one or more cores according to the dependency relationship, the placement unit 13 calculates the order weights given to the dependency relationship between two tasks placed on different cores. The task is arranged based on the evaluated value.
  • the dependency relationship between two tasks arranged in different cores is also simply referred to as inter-core dependency.
  • the arrangement unit 13 includes an evaluation value calculation unit 131 and an optimum arrangement search unit 132, as shown in FIG.
  • the evaluation value calculation unit 131 calculates an evaluation value that represents the goodness of the arrangement of a task arrangement candidate described later.
  • the evaluation value calculation unit 131 calculates an evaluation value by using the rank weight assigned to the inter-core dependency.
  • the optimum arrangement search unit 132 arranges tasks in one or more cores according to the dependency relationship, and generates task arrangement candidates. Then, the optimum arrangement search unit 132 searches for candidate task arrangements with good evaluation values calculated using the evaluation value calculation unit 131.
  • a full search can be cited.
  • the optimal arrangement search unit 132 When using the full search, the optimal arrangement search unit 132 generates all task arrangement candidates, and outputs an arrangement with the best evaluation value among them as a search result.
  • the optimum arrangement search unit 132 apply a generally known high-speed search method such as a branch and bound method, a greedy method, or a genetic algorithm as a search method more efficient than the full search.
  • the task set parameter holding unit 11 holds task set parameters input from the outside (step S101).
  • the optimal arrangement search unit 132 generates task arrangement candidates (candidate data indicating which tasks are arranged in which cores) (S102).
  • the order code generation unit 121 refers to the task set parameters held in the task set parameter holding unit 11 and obtains the order codes for each task. As described above, the order code generation unit 121 may calculate the order code of each task, or may obtain the order code already assigned to each task. Then, the weighting unit 122 generates an ordering weight based on the ordering code of each task (step S103).
  • the weighting unit 122 may give rank weights to all the dependency relationships existing in the task set. However, the weighting unit 122 may give an ordering weight for the dependency necessary for the evaluation value calculation unit 131. Based on this operation, the task placement device 1 can improve the efficiency of the grant process. For example, when the evaluation value calculation unit 131 calculates the evaluation value using the ordering weight assigned to the inter-core dependency, the weighting unit 122 determines the order for the inter-core dependency in the task placement candidate generated in step S102. What is necessary is just to give a weight. Note that when ordering weights are assigned to all the dependency relationships, the above-described steps S102 and S103 are in no particular order.
  • the task placement device 1 can also execute step S103 and step S102 in this order, and simultaneously execute step S102 and step S103.
  • the evaluation value calculation unit 131 calculates an evaluation value indicating the goodness of task arrangement using the rank weights given to the inter-core dependence in step S103 for the task arrangement candidates generated in step S102 (step S103). S104).
  • the optimum arrangement search unit 132 determines whether or not the generated task arrangement candidate and its evaluation value satisfy a task arrangement search termination condition (step S105). If the task placement search termination condition is not satisfied, the task placement device 1 repeats the processing from step S102 again.
  • the optimum placement search unit 132 outputs the task placement candidate having the best evaluation value among the task placement candidates generated so far as the optimization result (step S106). . Then, the task placement device 1 ends the operation.
  • the task placement search termination condition differs according to the optimization algorithm employed by the optimum placement search unit 132. For example, when a simple full search is used as the optimization algorithm, the task layout search end condition is the generation end of all task layout candidates that can be generated. In this case, the optimum arrangement search unit 132 outputs a task arrangement candidate having an optimum evaluation value among all the task arrangement candidates as an optimization result.
  • the task placement search termination condition may be a determination that the evaluation value does not become better in the optimization algorithm.
  • the task placement search termination condition may be a determination that the evaluation value does not improve even if the task placement candidate generation is repeated a predetermined number of times.
  • FIG. 6 is a graph representation of the dependency relationships existing in the task set composed of tasks 1 to 6.
  • a graph is also referred to as a task graph.
  • arrows connecting the tasks represent dependency relationships between the tasks at both ends.
  • the arrow indicating the dependency relationship indicates that it is necessary to end the task on the start point side in order to start the task on the end point side. It can be said that such a task graph represents the flow of execution based on the dependency of the entire task set.
  • FIGS. 7A to 7C An example of the data structure of the task set parameters of the task set represented by such a task graph is shown in FIGS. 7A to 7C. For example, as shown in FIG.
  • the task set parameter holding unit 11 may hold the dependency destination task in association with each task constituting the task set. For example, in FIG. 7A, for task 1, tasks 2, 4 and 5 are held as the dependency destination tasks. Further, the task set parameter holding unit 11 may hold other parameters for each task. Other parameters may be, for example, the task start cycle, execution time, and required memory size, as described above. Alternatively, as illustrated in FIG. 7B, the task set parameter holding unit 11 may hold a dependency source task in association with each task constituting the task set. For example, in FIG. 7B, tasks 3, 4, and 5 are held as the dependency source task for task 6. Also in this case, the task set parameter holding unit 11 may further hold other parameters as described above for each task. Alternatively, as illustrated in FIG.
  • the task set parameter holding unit 11 may hold information representing a combination of a dependency source task and a dependency destination task for each dependency relationship.
  • the dependency number is information for identifying the dependency relationship.
  • dependency number 1 represents a dependency relationship from task 1 (dependency source task) to task 2 (dependency destination task).
  • the task set parameter holding unit 11 sets other parameters for each task as a table different from the table holding the dependency relationship. You can hold it.
  • the order code generation unit 121 assigns an order code having a smaller numerical value to a task whose order is higher in the task graph (closer to the start task), that is, a task that is more likely to be executed in an earlier order / time zone. Also good. In other words, the order code generation unit 121 may assign an order code having a larger numerical value to a task whose order is backward (far from the start task), that is, a task that is likely to be executed in a later order / time zone. . Note that the order code assigned to each task may be different from the actual execution order. This is because the task execution order when the task set is actually executed is not uniquely determined.
  • FIG. 8 shows an example of a sequence code assigned to each task using the topological sort. In FIG. 8, the numerical value surrounded by a circle indicates an ordinal code assigned to each task.
  • the topological sort means that each node (task in the present invention) is ordered in an acyclic directed graph so that any node (task in the present invention) comes before the node ahead of its output edge (dependency based on the present invention). It is a technique to arrange them. This method outputs a sequence of nodes as a result. As a result, the rank code calculated using the topological sort is a unique value for each task.
  • Known techniques such as an algorithm based on the described Kahn and an algorithm using a depth-first search can be applied.
  • the order code generation unit 121 assigns task order codes based on the number of each task in the flow that continues from the start task through dependency. Further, when this method is used, the order code generation unit 121 assigns an order code based on a flow having the largest number of tasks for a task that passes through a plurality of flows from the start task.
  • FIG. 9 shows an example of a sequence code assigned to each task using the breadth-first search. In the task graph of FIG. 6, task 1 is a start task. Therefore, as shown in FIG. 9, the order code generation unit 121 assigns an order code 0 to the task 1.
  • task 2 task 4, and task 5 are the first task in the flow that continues from the start task through dependency. Therefore, the order code generation unit 121 assigns order code 1 to these tasks.
  • Task 3 is the second task that follows task 2 in the flow that continues from the start task through dependency. Therefore, the order code generation unit 121 assigns the order code 2 to the task 3.
  • the task 6 is the third task from the start task in the flow following the task 3, and is the second task from the start task in the flow following the tasks 4 and 5. At this time, when an order code is assigned based on the flow having the largest number of tasks, the order code generation unit 121 assigns an order code 3 to the task 6.
  • the order code generation unit 121 may assign 1 to the order code of the start task, or may assign other values.
  • the third order code calculation method a method using execution time information will be described. When this method is used, the task set parameter holding unit 11 holds the execution time of each task. In this example, the order code generation unit 121 assigns an order code to each task in consideration of the execution time of each task based on the breadth-first search method.
  • the order code generation unit 121 assigns a task order code based on the total execution time of each task in a flow that continues from the start task through dependency. Further, when this method is used, the order code generation unit 121 assigns an order code based on the longest total execution time for a task that passes through a plurality of flows from the start task.
  • the order code calculated in this way is an order code that reflects the difference in the effect of a task with a long execution time and a task with a short execution time.
  • FIG. 10 shows an example of a sequence code assigned to each task using the execution time information. As shown in FIG. 10, the order code generation unit 121 assigns 2 as the execution time to the task 1 as the start task as the order code.
  • the order code generation unit 121 assigns to the task 2 6 as an order code, which is obtained by adding the execution time 4 of the task 2 to the order code (execution time) 2 of the task 1. Similarly, the order code generation unit 121 assigns an order code 5 to the task 4 and assigns an order code 7 to the task 5. Further, the order code generation unit 121 executes the task 6 with respect to the task 6 in the order code 8 of the task 3 having the largest order code (that is, the longest total execution time) among the tasks that depend on the task 6. 11 with time 3 added is assigned as an ordinal code. In step S103, the order code generation unit 121 may use the order code of each task input from the outside, instead of calculating the order code of each task used to assign the order weight as described above.
  • step S101 information corresponding to the order code of each task is input from the outside, and the task set parameter holding unit 11 holds it.
  • the ordinal code generation unit 121 may acquire the ordinal code of each task with reference to the task set parameter holding unit 11.
  • the task set parameter holding unit 11 may hold information related to each task in an order corresponding to topological sorting.
  • the order code generation unit 121 may acquire the order in which the information about each task held in the task set parameter holding unit 11 is held as an order code.
  • maintenance part 11 may hold
  • the weighting unit 122 assigns rank weights to each dependency relationship in step S103.
  • the higher the order weight the larger the order weight value.
  • the arrangement unit 13 searches for an arrangement that is as far away as possible (an arrangement on the same core as much as possible) as the dependency relationship has a larger numerical value of the ordering weight.
  • assigning rank weights a method will be described in which the rank order weights are made heavier as the dependency relationship between tasks in the task graph is closer to the rear (distant from the start task). As described above, the closer to the rear in the task graph, the greater the influence on the execution performance of the entire task set when arranged between different cores.
  • the weighting unit 122 may increase the numerical value of the rank weight as the rank becomes backward (away from the start task).
  • the weighting unit 122 sets the dependency relationship with 1 / n tasks (where n represents a positive integer and “/” represents division) as the dependency source in order from the smallest sequence code.
  • an order weight 1 may be assigned.
  • the weighting unit 122 may assign the ordering weight 2 to the dependency having the whole task of 1 / n to 2 / n as a dependency source, and may be repeated in the same manner.
  • the weighting unit 122 may assign an ordering weight based on the ordering code assigned to the dependency source task (the task executed first) of each dependency relationship. For example, the weighting unit 122 may assign the numerical value of the ordinal code assigned to the dependency source task of each dependency relationship to the dependency relationship as it is as the order weight.
  • the rank weights assigned in this way are shown in FIG. In FIG. 11, a numerical value surrounded by a circle represents an ordering code, and a numerical value surrounded by a double circle represents an ordering weight. In FIG.
  • an order weight 0 is assigned to each dependency relationship from task 1 to tasks 2, 4, and 5 with order code 0.
  • an order weight 1 is assigned to each dependency relationship from task 2 to task 3 with order code 1 and tasks 4 and 5 with order code 1 from task 4.
  • the order weight 2 is given to the dependency relation of the order code 2 from the task 3 to the task 6.
  • the weighting unit 122 may assign the ordering weight based on the ordering code assigned to the dependency source task (task to be executed first) of each dependency relationship.
  • FIG. 12 shows the sequence weights assigned in this way.
  • a numerical value surrounded by a circle represents an ordering code
  • a numerical value surrounded by a double circle represents an ordering weight.
  • an order weight 2 is assigned to each dependency relationship from task 1 to task 2, 4, and 5 with order code 2.
  • the dependency weights from task 2 to task 3 with order code 6, task 4 to task 6 with order code 5, and task 5 to task 6 with order code 7 are assigned as order weights 6, 5 and 7 respectively. Is granted.
  • an order weight 8 is given to the dependency relationship of the order code 8 from task 3 to task 6.
  • the weighting unit 122 increases the ordering weight as the dependency relationship between the tasks whose order is closer to the rear in the task graph.
  • the weighting unit 122 may use a value obtained by subtracting the absolute value of the difference between the order codes of two tasks having a dependency relationship from the maximum value of the order code in the entire task set as the dependency order weight. .
  • the weighting unit 122 subtracts the absolute value of the difference between the order codes of two tasks having the corresponding dependency from the maximum value of the difference between the order codes of the two tasks having the dependency. It is good also as an ordering weight of a dependency.
  • the weighting unit 122 gives an ordering weight to each dependency relationship.
  • a numerical value surrounded by a circle represents an order code
  • a numerical value surrounded by a dotted triangle represents an absolute value of a difference between the order codes
  • a numerical value surrounded by a double circle represents an order weight.
  • the absolute value of the difference between the order codes at both ends of the dependency relationship between tasks 4 to 6 and tasks 5 to 6 is 2.
  • the absolute value of the difference between the order codes at both ends of the other dependency relationships is 1.
  • the maximum value of the ordinal code is 3.
  • the order weight of each dependency relationship between tasks 4 to 6 and tasks 5 to 6 is 1 obtained by subtracting the absolute value 2 of the difference between the order codes at both ends from the maximum value 3.
  • the ordering weight of other dependency relationships is 2 obtained by subtracting the absolute value 1 of the difference between the ordering codes at both ends from the maximum value 3.
  • the weighting unit 122 increases the ordering weight as the dependency relationship between the tasks having a similar order on the task graph.
  • a method combining the above two methods is also possible.
  • the weighting unit 122 uses the maximum value of the order code of the second example with respect to the order weight value generated by the method of increasing the order weight by 1 / n of the whole of the first example.
  • the order weight may be a value obtained by multiplying the order weights obtained by subtracting the absolute value of the difference between the order codes at both ends of each dependency.
  • the weighting unit 122 can generate an ordering weight that is heavier as a dependency relationship between tasks whose order is closer to the rear on the task graph and heavier as a dependency relationship between tasks whose order is closer on the task graph.
  • the weighting unit 122 assigns an order weight that reflects the degree of ease of occurrence of the dependency waiting time in accordance with the order of two tasks having the dependency relation for each dependency relation. May be generated. Further, the weighting unit 122 may generate the rank weight by combining these various methods.
  • the task set targeted by the task placement apparatus 1 may have as a parameter a weight based on these other factors relating to the dependency between tasks in advance.
  • the weighting unit 122 sets, for each dependency relationship, a value (for example, a multiplication value) that is a combination of the weight value based on other factors given in advance and the order weight value calculated as described above. You may give with respect to each dependence.
  • the evaluation value calculation unit 131 calculates an evaluation value indicating the goodness of task arrangement using the rank weight assigned to the inter-core dependency.
  • the evaluation value calculation unit 131 may calculate, as an evaluation value, a value obtained by adding or multiplying all rank weights assigned to inter-core dependence.
  • the evaluation function F w Is represented by the following equation (1).
  • the inter-core dependence in the target task placement candidate is n.
  • FIG. 14 shows a task placement candidate.
  • tasks 2, 3 and 6 are arranged on the core 0, and tasks 1, 4 and 5 are arranged on the core 1.
  • the inter-core dependence in this task placement candidate is the dependence from task 1 to 2, the dependence from task 4 to 6, and the dependence from task 5 to 6.
  • the number of inter-core dependencies in this task placement candidate is three.
  • the ordering weights assigned to these inter-core dependencies are 0 for the dependency from task 1 to 2, 1 for the dependency from task 4 to 6, and 1 from the dependency from task 5 to 6, respectively. Is granted.
  • the evaluation value calculation unit 131 calculates 2 as the evaluation value based on the formula (1) for this task placement candidate.
  • FIG. 14 illustrates an example of calculating the evaluation value when the number of cores is 2.
  • the evaluation value calculation unit 131 can similarly calculate the evaluation value even when the number of cores is 3 or more. It is.
  • the evaluation value calculation unit 131 may calculate an evaluation value based on other evaluation functions other than the expression (1). For example, the evaluation value calculation unit 131 may calculate, as the evaluation value, a value obtained by subtracting all the order weights given to inter-core dependence from a predetermined value.
  • the evaluation value calculated in this way represents that the influence of inter-core dependence on the execution performance of the entire task set is relatively small as the value is large, that is, the task arrangement is good.
  • the evaluation value calculation unit 131 calculates an evaluation value using the start cycle, execution time, required memory size, etc. of each task in addition to the ordinal weight given to inter-core dependency. Also good.
  • information such as the activation period, execution time, or required memory size is held in the task set parameter holding unit 11. For example, a system is assumed in which it is appropriate that the total execution time of tasks assigned to each core is equal in each core.
  • the evaluation value calculation unit 131 additionally calculates an evaluation value based on the difference in the total execution time of the tasks assigned to each core in addition to the evaluation value based on the rank weight assigned to the inter-core dependency. An evaluation value obtained by integrating these may be calculated.
  • the core utilization rate of each task can be calculated as “task execution time ⁇ task activation cycle”.
  • the evaluation value calculation unit 131 additionally calculates an evaluation value based on the difference in the core utilization rate of each core in addition to the evaluation value based on the order weight given to the inter-core dependency, and integrates these. An evaluation value may be calculated.
  • the evaluation value calculation unit 131 in addition to the evaluation value based on the rank weight assigned to the inter-core dependency, the evaluation value calculation unit 131 additionally calculates an evaluation value based on the difference in the required memory size of each core, and integrates them. An evaluation value may be calculated. As described above, when the task set parameter holding unit 11 holds other task set parameters in addition to the dependency relationship between tasks, the evaluation value calculation unit 131 adds these other task set parameters incidentally. The evaluation value can be calculated by using this. In this case, the placement unit 13 can perform task placement in consideration of factors other than these inter-core dependencies. As described above, various methods can be applied to the evaluation value calculation method using the rank weight assigned to the inter-core dependency.
  • the optimal placement search unit 132 generates task placement candidates, and using the evaluation values calculated for the generated task placement candidates, the generated task placement candidates and their evaluation values are used as search end conditions. It is determined whether or not it is satisfied. If the task placement is better as the evaluation value is smaller, the optimum placement search unit 132 searches for task placement candidates that minimize the evaluation value.
  • the task placement search termination condition differs based on the optimization algorithm employed by the optimum placement search unit 132. For example, when a simple full search is adopted as an optimization algorithm, the generation of all task placement candidates that can be generated as the search end condition ends.
  • the optimum arrangement search unit 132 outputs the task arrangement candidate for which the minimum evaluation value is calculated among all the task arrangement candidates as the optimization result. Further, for example, when another general optimization algorithm is adopted, the search end condition is determined that the evaluation value based on the algorithm is not further reduced, and generation of task placement candidates is repeated a predetermined number of times. It may be determined that the evaluation value does not become small.
  • the task set parameter holding unit 11, the order weight assigning unit 12, the evaluation value calculating unit 131, and the optimum arrangement searching unit 132 can employ various data structures and various methods. In the present embodiment, the data structures and methods employed for each of these functional blocks can be employed in various combinations. Further, this embodiment can also employ a combination of a plurality of methods in each functional block.
  • the task placement apparatus can perform task placement with higher performance by further reducing the influence of non-uniform inter-core dependence based on the rank.
  • the reason is that the ordering weight assigning unit assigns ordering weights to each dependency existing between tasks based on the order in which each task can be executed in the execution flow of the entire task set. It is.
  • the placement unit places the task in one or more cores according to the dependency relationship, the evaluation value calculated based on the rank weight assigned to the dependency relationship between the tasks placed between different cores is This is because tasks are arranged so as to improve.
  • the task placement device as the present embodiment is for a task set in which an inter-core dependency waiting time occurs even if the number of inter-core dependencies based on the device described in Patent Document 1 is minimized. It is possible to generate a task arrangement that further reduces the dependency waiting time.
  • the task placement apparatus according to the first exemplary embodiment of the present invention can output a task placement that can fully exhibit the multi-core performance. That is, the task placement apparatus according to the present embodiment can realize task placement reflecting the magnitude of the influence on the execution performance depending on the order of the cores in the multi-core system.
  • the task placement device as the first exemplary embodiment of the present invention can perform task placement with higher performance by further reducing the dependency waiting time at a position near the end of execution of the task set.
  • the reason is that the order weight assigning unit increases the order weights as the dependency relationship between the tasks whose order in the task graph is closer to the rear.
  • the placement unit calculates an evaluation value indicating that the placement is worse as the inter-core dependency between the tasks whose ranks are closer to the rear is larger. Then, the placement unit searches for a task placement that improves the evaluation value. Therefore, in the task placement searched in this way, a task having a dependency relationship near the end of execution of the entire task set is less likely to be placed on a different core.
  • the task placement device as the first exemplary embodiment of the present invention can cope with the critical dependency problem that appears behind the rank on the task graph.
  • the task placement device as the first exemplary embodiment of the present invention can reduce task dependency waiting time between tasks having similar execution orders in a task set, and perform task placement with higher performance.
  • the reason for this is that the ordering weight assigning unit increases the ordering weight as the dependency between tasks having a small difference in the ordering code in the task graph.
  • the placement unit calculates an evaluation value indicating that the placement is worse as the inter-core dependency between tasks having similar ranks increases. Then, the placement unit searches for a task placement that improves the evaluation value.
  • the task placement device 2 further includes an order code holding unit 24 and an order weight holding unit 25 in addition to the same configuration as the task placement device 1 as the first embodiment of the present invention.
  • the task placement device 2 may be configured using a computer device including the configuration shown in FIG. 1, similarly to the task placement device 1 as the first exemplary embodiment of the present invention.
  • the order code holding unit 24 and the order weight holding unit 25 are configured using the storage device 1004. Note that the hardware configuration constituting each of these functional blocks is not limited to the above-described configuration.
  • the rank code holding unit 24 holds the rank code calculated by the rank weight assigning unit 12.
  • FIGS. 16A and 16B An example of information held by the ordinal code holding unit 24 is shown in FIGS. 16A and 16B.
  • the ordinal code holding unit 24 may hold an ordinal code for each task as shown in FIG. 16A.
  • the order code holding unit 24 may hold information for identifying a task to which the order code is assigned for each order code value.
  • FIG. 16B shows that the order code 1 is assigned to tasks 2, 4 and 5.
  • the ordinal code holding unit 24 may be included in the task set parameter holding unit 11.
  • the order code storage unit 24 includes the task set parameter storage unit 11.
  • the order code may be held using an expression obtained by rearranging the information on each task held in the order in the order of the order. Based on this operation, the rank code holding unit 24 can hold the calculated rank code without using an area of the storage device for holding the rank code.
  • the order weight holding unit 25 uses the order weight generation unit 12 to hold the order weight assigned to each dependency relationship.
  • the order code generation unit 121 can apply the technique described in detail in the first embodiment of the present invention as a technique for calculating the order code.
  • the rank code holding unit 24 holds the calculated rank code (step S202).
  • the weighting unit 122 assigns an ordering weight to each dependency relationship based on the ordering code held in the ordering code holding unit 24 (step S203).
  • the weighting unit 122 can apply the method described in detail in the first embodiment of the present invention as a weighting method.
  • the rank weight holding unit 25 holds the rank weight generated using the weighting unit 122 (step S204).
  • the optimum arrangement search unit 132 generates task arrangement candidates (step S102).
  • the evaluation value calculation unit 131 calculates an evaluation value, which is an evaluation value indicating the goodness of task placement, for the generated task placement candidate using the rank weight held in the rank weight holding unit 25 (step S104).
  • the evaluation value calculation unit 131 can apply the method described in detail in the first embodiment of the present invention as the evaluation value calculation method.
  • the optimum placement search unit 132 determines whether the task placement candidate and the evaluation value satisfy a task placement search termination condition (step S105). For example, as the search end condition, the condition described in detail in the first embodiment of the present invention is applicable. If the task placement search termination condition is not satisfied, the task placement device 2 repeats the processing from step S102 again.
  • the optimum placement search unit 132 outputs a task placement optimization result (step S106). Then, the task placement device 2 ends the operation.
  • the weighting unit 122 may assign rank weights to inter-core dependence in task placement candidates.
  • the task placement device 2 may execute steps S203 to S204 after generating task placement candidates in step S102.
  • movement of the 2nd Embodiment of this invention is complete
  • the task placement apparatus as the second exemplary embodiment of the present invention when placing a task for a multi-core system, performs a process of calculating an ordering weight reflecting the ease of occurrence of dependency waiting time depending on the core. Increase efficiency.
  • the rank code holding unit holds the rank code of each task used for calculating the rank weight.
  • the order weight assigning unit refers to the order code of the task a plurality of times in order to calculate the order weight.
  • the task placement device as the second exemplary embodiment of the present invention can further reduce the processing time of the rank weight assigning unit based on the hold of the rank code holding unit of the rank code once calculated. Because.
  • the task placement apparatus as the second exemplary embodiment of the present invention can further improve the efficiency of the process of searching for a better performance task placement by reducing the influence of non-uniform inter-core dependence based on the order. .
  • the reason is that the rank weight holding unit holds the rank weight generated by using the rank weight generation unit.
  • the rank weights are invariable once calculated and often need not be recalculated. Therefore, the order weight need not be recalculated every time the evaluation value is calculated for different task placement candidates. Therefore, the task placement device according to the second exemplary embodiment of the present invention can shorten the task placement search time based on holding the rank weights of the rank weight holding unit.
  • the order code is mainly described as having a smaller value as it is closer to the start task on the task graph.
  • the order code in the present invention is, for example, on the task graph. The closer to the start task, the larger the value may be.
  • the order weight is mainly described as having a value that is large enough to generate the dependency waiting time.
  • the order weight in the present invention generates, for example, the dependency waiting time. You may have a small value that is easy to do.
  • the evaluation value is mainly described as having a smaller value as the task arrangement is better.
  • the evaluation value in the present invention has a larger value as the task arrangement is better. Also good.
  • the placement unit may search for a task placement candidate that increases the evaluation value.
  • the operation of the task placement device described with reference to each flowchart is stored in a storage device (storage medium) of a computer as a program of the present invention.
  • the CPU may read and execute.
  • the present invention is configured using the code or storage medium of the program.
  • each embodiment mentioned above can be implemented in combination as appropriate. The present invention is not limited to the above-described embodiments, and can be implemented in various modes.
  • An order weight assigning means for assigning an order weight that is a coefficient representing; When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement means for placing tasks based on the calculated evaluation value; Including a task placement device.
  • the rank weight assigning means includes The closer the order of each task having the dependency is to the end in the flow of execution of the entire task set, the heavier the order weight given to the dependency
  • the task placement device according to Supplementary Note 1, wherein: (Appendix 3) The rank weight assigning means includes The closer the order of the two tasks having the dependency relationship is, the heavier the order weight given to the dependency relationship is.
  • the rank weight assigning means includes Based on the task set parameter held in the task set parameter holding means, an order code representing the order to be used for giving the order weight is calculated.
  • the task placement device according to any one of supplementary notes 1 to 3, characterized in that: (Appendix 5) Further comprising an order code holding means for holding an order code calculated using the order weight assigning means;
  • the rank weight assigning means includes Using the reference of the order code held in the order code holding means, the order weight is given to each dependency.
  • the task placement device according to appendix 4, wherein (Appendix 6) And further comprising an order weight holding means for holding the order weight given using the order weight giving means,
  • the arrangement means includes The evaluation value is calculated using the order weight held in the order weight giving means.
  • the task placement device according to any one of Supplementary Note 1 to Supplementary Note 5, wherein (Appendix 7) For a task set that is a set of tasks to be arranged, a task set parameter including information indicating dependency between the tasks is retained, Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set.
  • the task placement method according to appendix 7 characterized in that: (Appendix 9) When assigning the order weights to each dependency relationship, the closer the order of the two tasks having the dependency relationship is, the heavier the order weight given to the dependency relationship is. 9.
  • the task placement method according to appendix 7 or appendix 8, characterized by the above. (Appendix 10) A task set parameter holding process for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged; Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set.
  • An order weighting process for assigning an order weight that is a coefficient to be represented When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement processing for task placement based on the calculated evaluation value;
  • a program that causes a computer to execute. (Appendix 11) In the order weight assigning process, the order weights assigned to the dependency relations are made heavier as the order of the tasks having the dependency relations approaches the end in the execution flow of the entire task set.

Abstract

Provided is a task allocation device that can better perform task allocation by further reducing the influence of dependencies between cores that are not uniform based on priority. The task allocation device includes: a task set parameter storage section (11) that stores task set parameters including information expressing inter-task dependency relationships for a task set which is a set of tasks to be allocated; a priority weight assigning section (12) that uses the task parameters and priority, that is, the order of execution for each task in the flow of execution of the entire task set, as a basis to assign each inter-task dependency relationship a priority weight which is a coefficient expressing a weight based on priority; and an allocation section (13) that, when allocating tasks belonging to the task set to more than one core in accordance with the dependency relationships, uses the priority weight assigned to the dependency relationship between two different tasks allocated to different cores to calculate an evaluation value, and allocates the tasks on the basis of the calculated evaluation value.

Description

タスク配置装置及びタスク配置方法Task placement device and task placement method
 本発明は、マルチコアに関し、特に、AMP(Asymmetric Multi Processing)方式のマルチコア向けのタスク配置装置及びタスク配置方法に関する。 The present invention relates to a multi-core, and more particularly, to a task placement apparatus and a task placement method for an AMP (Asymmetric Multi Processing) type multi-core.
 近年のデジタル機器の高性能化及び低消費電力化要求の高まりを受け、組み込みLSI(Large Scale Integration)に複数のプロセッサ・コア(以下、単にコアとも記載する)を搭載するマルチコア構成が注目を集めている。このLSIのマルチコア化は、システム制御を目的とするリアルタイムシステム等において、重要な技術となっている。マルチコアシステムは、主にSMP(Symmetric Multi Processing)方式とAMP方式とに大別される。
 SMP方式は、コアの空き状況、現在実行中のタスクの優先度等に応じてタスクが切り替わり、各タスクが、いずれのコア上でも実行され得る構成となる。このため、SMP方式は、動的に負荷分散を可能とし、システム全体の性能を向上させる。しかし、動的な負荷分散は、リアルタイム性能の予測を困難とする。したがって、SMP方式は、リアルタイムシステムへの適用には適さない。
 一方、AMP方式は、各タスクが、特定のコア上で実行される機能分散型の構成となる。このため、AMP方式は、システムの挙動の予測が重要なリアルタイムシステムや、特定のハードウェアが接続されているコアが限定されるシステム等に好適である。
 このようなAMP方式のマルチコアシステムは、タスクをどのコアに配置するかに基づき、性能が異なる。このため、AMP方式のマルチコアシステムは、最適な実行状態となるように、様々なタスク配置を探索し、最適配置を決定する必要がある。
 特許文献1には、このようなマルチコア向けのタスク配置を支援する装置が記載されている。特許文献1に記載の装置は、始めに、各コアに割り当てられた粒度に関する情報(粒度情報)を取得する。ここで、粒度とは、例えば、プロセッサの処理の単位であり、タスク、関数、関数を構成する処理の総称である。次に、この装置は、取得した粒度情報に基づいて、タスク毎あるいはタスクが有する関数毎に出現回数を算出し、算出した出現回数に関する情報(構造情報)を生成する。また、この装置は、取得された粒度情報に基づいて、タスク毎あるいはタスクが有する関数毎の、他タスクあるいは関数への依存に関する情報(依存情報)を生成する。そして、この装置は、粒度情報、構造情報、および、依存情報に基づいて、異なるコア間に存在する依存関係を表す情報を表示する。この構成に基づき、この特許文献1に記載の装置は、マルチコアシステムにおいて異なるコア間に存在する依存関係をより少なくするタスク配置を支援できる。
特開2007−264734号公報
In response to the increasing demand for higher performance and lower power consumption of digital devices in recent years, a multi-core configuration that incorporates multiple processor cores (hereinafter also simply referred to as cores) in an embedded LSI (Large Scale Integration) has attracted attention. ing. This multi-core LSI is an important technology in a real-time system for the purpose of system control. Multi-core systems are mainly classified into SMP (Symmetric Multi Processing) and AMP.
In the SMP method, tasks are switched according to the availability of the core, the priority of the task currently being executed, and the like, and each task can be executed on any core. For this reason, the SMP method enables load distribution dynamically and improves the performance of the entire system. However, dynamic load balancing makes it difficult to predict real-time performance. Therefore, the SMP method is not suitable for application to a real-time system.
On the other hand, the AMP method has a function-distributed configuration in which each task is executed on a specific core. For this reason, the AMP method is suitable for a real-time system in which prediction of system behavior is important, a system in which a core to which specific hardware is connected is limited, and the like.
Such an AMP multi-core system has different performance based on which core the task is arranged. For this reason, the AMP multi-core system needs to search various task placements and determine the optimum placement so as to be in an optimal execution state.
Patent Document 1 describes an apparatus that supports such multi-core task placement. The apparatus described in Patent Document 1 first acquires information (granularity information) regarding the granularity allocated to each core. Here, the granularity is, for example, a unit of processing of the processor, and is a generic name for tasks, functions, and processes constituting the functions. Next, this apparatus calculates the number of appearances for each task or for each function of the task based on the acquired granularity information, and generates information (structure information) regarding the calculated number of appearances. In addition, this device generates information (dependence information) related to dependence on other tasks or functions for each task or for each function of the task based on the acquired granularity information. And this apparatus displays the information showing the dependence which exists between different cores based on granularity information, structure information, and dependence information. Based on this configuration, the device described in Patent Document 1 can support task placement that reduces the number of dependencies existing between different cores in a multi-core system.
JP 2007-264734 A
 しかしながら、特許文献1に記載された装置に基づくタスク配置は、コア間依存に基づく無駄時間を充分に削減できない場合があるという問題を生じ得る。
 ここで、コア間依存とは、異なるコアに配置されたタスク同士が有する依存関係をいう。このようなコア間依存の存在は、あるコアがタスクを実行可能な空き状態であるにもかかわらず、そのコアに配置されたタスクが別のコア上のタスクの終了を待つ必要があるために実行できないという無駄時間の発生要因となる。このため、特許文献1に記載された装置は、コア間依存の数の最小化を基に、依存待ちに基づく無駄時間の削減にある程度の効果を奏する。
 しかしながら、コア間依存の最小化では、無駄時間の削減が充分でない場合が、存在する。このような場合について以下に説明する。
 例えば、タスク群(以下、タスクセットともいう)全体の実行が終了に近づくほど、タスク間の依存関係がクリティカルな問題となる場合がある。この理由について説明する。
 タスクセットの実行開始直後では、多数のタスクが、実行可能状態になっている。このため、タスクセットの実行開始直後では、ある程度のコア間依存があっても、依存待ち時間が、あまり生じない。ところが、タスクセットの実行が進んだ状況では、多くのタスクの実行は、既に終了している。このため、依存待ちをしているタスク以外の実行可能なタスクが、少なくなる。つまり、タスクセット全体の実行の流れにおいて各タスクが実行され得る位置(以下、序列ともいう)が後方である(終了に近い)ほど、コア間依存に基づく依存待ちは、発生しやすい。
 また、タスクセット全体の実行終了に近くない場合であっても、実行可能タスクが少ない状況が、発生し得る。例えば、タスクセット全体の実行の流れにおいて序列が近いタスク間のコア間依存が問題となる場合がある。その理由について説明する。
 序列が近く、かつ、依存関係を有するタスク同士が異なるコアに配置された場合、依存元のタスクの実行終了が何らかの要因を基に遅れると、依存先のタスクが待たされる状況が発生する。つまり、序列が近いタスク同士のコア間依存は、各コアでの実行状況を基に、容易に依存待ちを発生し得る。
 このように、コア間依存に基づくタスクセット全体の実行性能への影響は、その依存関係に関連する各タスクの序列に基づき一様ではない。
 しかしながら、特許文献1に記載された装置は、コア間依存の実行性能への影響が関連タスクの序列に基づいて一様でないことを考慮しないため、コア間依存に基づく無駄時間を充分に削減できない。
 本発明の目的は、上述の課題を解決し、AMP方式のマルチコアシステム向けに、序列に基づいて一様でないコア間依存の影響をより低減して、より性能の良いタスク配置を実現できるタスク配置装置を提供することにある。
However, the task arrangement based on the device described in Patent Document 1 may cause a problem that the dead time based on inter-core dependence may not be sufficiently reduced.
Here, inter-core dependency refers to a dependency relationship between tasks arranged in different cores. The existence of such inter-core dependency is because a task placed on a core needs to wait for a task on another core to finish even though one core is free to execute the task. This is a cause of wasted time that it cannot be executed. For this reason, the apparatus described in Patent Document 1 has a certain effect on the reduction of dead time based on waiting for dependence, based on minimizing the number of inter-core dependences.
However, there is a case where dead time is not sufficiently reduced by minimizing inter-core dependence. Such a case will be described below.
For example, as the execution of the entire task group (hereinafter also referred to as a task set) approaches the end, the dependency between tasks may become a critical problem. The reason for this will be described.
Immediately after starting the execution of the task set, many tasks are ready to be executed. For this reason, immediately after the start of execution of the task set, even if there is some inter-core dependence, there is not much dependence waiting time. However, in a situation where the execution of the task set has advanced, the execution of many tasks has already been completed. This reduces the number of tasks that can be executed other than the task waiting for dependency. That is, the dependency waiting based on inter-core dependency is more likely to occur as the position where each task can be executed (hereinafter also referred to as an order) in the flow of execution of the entire task set is backward (closer to the end).
Moreover, even if it is not near the end of execution of the entire task set, a situation in which there are few executable tasks may occur. For example, there may be a problem of inter-core dependency between tasks having similar ranks in the flow of execution of the entire task set. The reason will be described.
When tasks having dependency relationships are arranged in different cores, if the end of execution of the dependency source task is delayed based on some factor, a situation in which the dependency destination task waits occurs. That is, inter-core dependencies between tasks with similar ranks can easily cause a dependency wait based on the execution status of each core.
Thus, the influence on the execution performance of the entire task set based on inter-core dependence is not uniform based on the rank of each task related to the dependence relation.
However, since the apparatus described in Patent Document 1 does not consider that the influence on the execution performance due to inter-core dependence is not uniform based on the order of related tasks, the dead time based on inter-core dependence cannot be sufficiently reduced. .
An object of the present invention is to solve the above-mentioned problems, and to reduce the influence of non-uniform inter-core dependence based on the order for AMP-based multi-core systems, and achieve task performance with higher performance. To provide an apparatus.
 本発明のタスク配置装置は、配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持手段と、前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与手段と、前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置手段と、を含む。
 また、本発明のタスク配置方法は、配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持し、前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与し、前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する。
 また、本発明のプログラムは、配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持処理と、前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与処理と、前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置処理と、をコンピュータに実行させる。
The task placement device of the present invention, for a task set that is a set of tasks to be placed, a task set parameter holding means for holding a task set parameter including information representing a dependency relationship between the tasks, the task set parameter, Based on the order in which each task can be executed in the execution flow of the entire task set, an ordering weight that is a coefficient representing a weight based on the order is assigned to each dependency relationship between the tasks. When the task belonging to the task set is placed in one or more cores according to the dependency relationship, the rank weight assigned to the dependency relationship between the two tasks placed in different cores. And an arrangement means for calculating an evaluation value by using and arranging a task based on the calculated evaluation value.
Further, the task placement method of the present invention holds a task set parameter including information representing a dependency relationship between the tasks for a task set that is a set of tasks to be placed, and the task set parameter and the entire task set And assigning rank weights, which are coefficients representing weights based on the ranks, to the dependency relationships between the tasks, based on ranks that are positions where each task can be executed in the flow of execution of When assigning a task belonging to 1 to one or more cores according to the dependency, an evaluation value is calculated using the rank weight assigned to the dependency between two tasks arranged in different cores. The task is arranged based on the evaluated value.
Further, the program of the present invention is a task set parameter holding process for holding a task set parameter including information representing a dependency relationship between tasks for a task set which is a set of tasks to be arranged, the task set parameter, Based on the order in which each task can be executed in the execution flow of the entire task set, an ordering weight that is a coefficient representing a weight based on the order is assigned to each dependency relationship between the tasks. In the order weight assignment process, and when a task belonging to the task set is placed in one or more cores according to the dependency relation, the order weight given to the dependency relation between two tasks placed in different cores And calculating an evaluation value using the computer, and causing the computer to execute a placement process for arranging a task based on the calculated evaluation value.
 本発明によれば、序列に基づいて一様でないコア間依存の影響をより低減して、より性能の良いタスク配置を提供できる。 According to the present invention, it is possible to provide a task arrangement with better performance by further reducing the influence of non-uniform core dependency based on the order.
図1は、本発明の第1の実施の形態としてのタスク配置装置のハードウェア構成の一例を示すブロック図である。FIG. 1 is a block diagram showing an example of a hardware configuration of a task placement device as a first exemplary embodiment of the present invention. 図2は、本発明の第1の実施の形態としてのタスク配置装置の機能の一例を示すブロック図である。FIG. 2 is a block diagram showing an example of the function of the task placement device as the first exemplary embodiment of the present invention. 図3は、本発明の第1の実施の形態における序列重み付与部の構成の一例を示すブロック図である。FIG. 3 is a block diagram showing an example of the configuration of the rank weight assigning unit in the first embodiment of the present invention. 図4は、本発明の第1の実施の形態における配置部の構成の一例を示すブロック図である。FIG. 4 is a block diagram illustrating an example of the configuration of the arrangement unit according to the first embodiment of the present invention. 図5は、本発明の第1の実施の形態としてのタスク配置装置の動作の一例を説明するフローチャートである。FIG. 5 is a flowchart for explaining an example of the operation of the task placement device as the first exemplary embodiment of the present invention. 図6は、本発明の第1の実施の形態としてのタスク配置装置が対象とするタスクセットの一例を示す模式図である。FIG. 6 is a schematic diagram showing an example of a task set targeted by the task placement device as the first exemplary embodiment of the present invention. 図7Aは、本発明の第1の実施の形態におけるタスクセットパラメータ保持部のデータ構造の一例を示す図である。FIG. 7A is a diagram illustrating an example of a data structure of a task set parameter holding unit according to the first embodiment of this invention. 図7Bは、本発明の第1の実施の形態におけるタスクセットパラメータ保持部のデータ構造の一例を示す図である。FIG. 7B is a diagram illustrating an example of a data structure of a task set parameter holding unit according to the first embodiment of this invention. 図7Cは、本発明の第1の実施の形態におけるタスクセットパラメータ保持部のデータ構造の一例を示す図である。FIG. 7C is a diagram illustrating an example of a data structure of a task set parameter holding unit according to the first embodiment of this invention. 図8は、本発明の第1の実施の形態において各タスクに割り当てられる序列符号の一例を示す模式図である。FIG. 8 is a schematic diagram illustrating an example of a sequence code assigned to each task according to the first embodiment of this invention. 図9は、本発明の第1の実施の形態において各タスクに割り当てられる序列符号の他の一例を示す模式図である。FIG. 9 is a schematic diagram illustrating another example of a sequence code assigned to each task in the first embodiment of the present invention. 図10は、本発明の第1の実施の形態において各タスクに割り当てられる序列符号のさらに他の一例を示す模式図である。FIG. 10 is a schematic diagram showing still another example of the ordinal code assigned to each task in the first embodiment of the present invention. 図11は、本発明の第1の実施の形態において各依存関係に付与される序列重みの一例を示す模式図である。FIG. 11 is a schematic diagram illustrating an example of rank weights assigned to each dependency relationship according to the first embodiment of this invention. 図12は、本発明の第1の実施の形態において各依存関係に付与される序列重みの他の一例を示す模式図である。FIG. 12 is a schematic diagram illustrating another example of rank weights assigned to each dependency relationship according to the first embodiment of this invention. 図13は、本発明の第1の実施の形態において各依存関係に付与される序列重みのさらに他の一例を示す模式図である。FIG. 13 is a schematic diagram showing still another example of the ordering weights given to each dependency relationship in the first embodiment of the present invention. 図14は、本発明の第1の実施の形態においてタスク配置候補に存在するコア間依存を説明するための模式図である。FIG. 14 is a schematic diagram for explaining inter-core dependence existing in task placement candidates in the first exemplary embodiment of the present invention. 図15は、本発明の第2の実施の形態としてのタスク配置装置の機能の一例を示すブロック図である。FIG. 15 is a block diagram showing an example of the function of the task placement device as the second exemplary embodiment of the present invention. 図16Aは、本発明の第2の実施の形態における序列符号保持部のデータ構造の一例を示す図である。FIG. 16A is a diagram illustrating an example of a data structure of an ordinal code holding unit according to the second embodiment of the present invention. 図16Bは、本発明の第2の実施の形態における序列符号保持部のデータ構造の一例を示す図である。FIG. 16B is a diagram illustrating an example of a data structure of an ordinal code holding unit in the second embodiment of the present invention. 本発明の第2の実施の形態としてのタスク配置装置の動作の一例を説明するフローチャートである。It is a flowchart explaining an example of operation | movement of the task arrangement | positioning apparatus as the 2nd Embodiment of this invention.
 以下、本発明の実施の形態について、図面を参照して詳細に説明する。以下に述べる本発明の各実施の形態としてのタスク配置装置は、各タスクが特定のコアで実行される機能分散型のAMP方式のマルチコアシステムを設計・実装する際に、タスクセットを構成する各タスクをいずれのコアに配置するかを決定する装置である。前述のように、AMP方式のマルチコアシステムは、タスクがどのコアに配置されるかに基づいて性能が異なる。以下では、本発明の各実施の形態のタスク配置装置に基づき、マルチコアシステムの性能をより高めるタスク配置が可能となることについて説明する。なお、以降、本発明の各実施の形態において対象とするAMP方式のマルチコアシステムを、単にマルチコアシステムと記載する。
 (第1の実施の形態)
 本発明における第1の実施の形態としてのタスク配置装置1のハードウェア構成の一例を図1に示す。図1において、タスク配置装置1は、CPU(Central Processing Unit)1001と、RAM(Random Access Memory)1002と、ROM(Read Only Memory)1003と、ハードディスク等の記憶装置1004とを含み、コンピュータを構成している。
 ROM1003および記憶装置1004は、コンピュータを本実施の形態のタスク配置装置1として機能させるためのプログラムおよび各種データを記憶している。
 CPU1001は、ROM1003および記憶装置1004に記憶されたプログラムおよび各種データを、RAM1002に読み込んで、実行する。
 次に、タスク配置装置1の機能ブロックの構成の一例を図2に示す。図2において、タスク配置装置1は、タスクセットパラメータ保持部11と、序列重み付与部12と、配置部13と、を含む。
 ここで、タスクセットパラメータ保持部11は、例えば、記憶装置1004を用いて構成される。また、序列重み付与部12および配置部13は、例えば、ROM1003および記憶装置1004に記憶されたコンピュータ・プログラムおよび各種データをRAM1002に読み込んで実行するCPU1001を用いて構成される。なお、タスク配置装置1の各機能ブロックを構成するハードウェア構成は、上述の構成に限定されない。
 タスクセットパラメータ保持部11は、外部から入力されるタスクセットパラメータを保持する。ここで、タスクセットパラメータとは、タスクセット(配置対象の1つ以上のタスクの集合)を構成する個々のタスクの特性を表す情報である。タスクセットパラメータは、タスク間の依存関係を表す情報を含む。また、タスクセットパラメータは、その他、タスクの起動周期、実行時間、必要メモリサイズなどをそれぞれ表す情報を含んでもよい。
 また、外部から入力されるタスクセットパラメータが、ファイル等のように他の機能ブロックからも参照可能に保持された形式で入力された場合、タスクセットパラメータ保持部11は、タスクセットパラメータをコピーして保持する必要はない。この場合、タスクセットパラメータ保持部11は、そのファイル等を示す情報を保持すればよい。
 また、外部から入力されるタスクセットパラメータに後述の序列を表す情報が含まれる場合、タスクセットパラメータ保持部11は、各タスクの序列を表す情報をさらに保持してもよい。
 序列重み付与部12は、タスクセットパラメータ保持部11に保持されたタスクセットパラメータを参照し、各タスクの序列に基づいて各依存関係に対して序列重みを付与する。ここで、各タスクの序列とは、依存関係に基づくタスクセット全体の実行の流れにおいて、各タスクが実行され得る位置をいう。また、序列重みとは、序列に基づく重みを表す係数である。具体的には、序列重みは、その依存関係に基づく実行待ち時間の発生しやすさの程度を表す係数といえる。このような実行待ち時間の発生しやすさは、その依存関係に関連する関連タスクの序列に基づいて変化する。そのため、序列重みは、序列に基づく情報となる。
 詳細には、序列重み付与部12は、図3に示すように、序列符号生成部121と、重み付け部122とを含む。
 序列符号生成部121は、対象のタスクセットにおける各タスクの序列を表す序列符号を生成する。具体的には、序列符号生成部121は、各タスクの序列符号を、タスクセットパラメータ保持部11に保持されたタスクセットパラメータに基づいて算出してもよい。
 あるいは、タスクセットパラメータ保持部11に、既に各タスクの序列を表す情報が保持されている場合、序列符号生成部121は、序列符号を算出する処理を省略し、タスクセットパラメータ保持部11から各タスクの序列符号を取得すればよい。この場合、タスクセットパラメータ保持部11は、序列符号を保持してもよいし、各タスクに関する情報を序列符号に相当する順序で保持してもよい。
 重み付け部122は、序列符号生成部121を用いて生成された(または取得された)序列符号に基づいて、タスク間の各依存関係に対して序列重みを付与する。
 例えば、重み付け部122は、依存関係を有する各タスクの序列がタスクセット全体の実行の流れにおいて終了に近いほど、序列重みを重くしてもよい。また、例えば、重み付け部122は、依存関係を有する2つのタスクの序列が近いほど、序列重みを重くしてもよい。ここで、序列重みが重いとは、その依存関係に基づく依存待ち時間が、より発生しやすいことをいう。序列重みの値は、重いほど大きくても良いし、重いほど小さくてもよい。
 配置部13は、タスクセットに属するタスクを依存関係にしたがって、1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された序列重みを用いて算出される評価値に基づいて、タスクを配置する。なお、以降、異なるコアに配置される2つのタスク間の依存関係を、単にコア間依存とも記載する。
 詳細には、配置部13は、図4に示すように、評価値算出部131と、最適配置探索部132と、を含む。
 評価値算出部131は、後述のタスク配置候補について、その配置の良さを表す評価値を算出する。具体的には、評価値算出部131は、コア間依存に付与された序列重みを用いて評価値を算出する。
 最適配置探索部132は、タスクセットを依存関係にしたがって1つ以上のコアにタスクを配置し、タスク配置候補を生成する。そして、最適配置探索部132は、評価値算出部131を用いて算出された評価値が良好なタスク配置の候補を、探索する。
 ここで、最適配置探索部132に適用可能な最も単純な探索手法としては、全探索が挙げられる。全探索を用いる場合、最適配置探索部132は、全てのタスク配置候補を生成し、その中で最も評価値が良好な配置を探索結果として出力する。
 ただし、最適配置探索部132には、全探索よりも効率的な探索手法として、分枝限定法、グリーディー法、遺伝的アルゴリズム等の一般に知られる高速な探索手法の適用が、より望ましい。
 以上のように構成されるタスク配置装置1の動作について、図5を参照して説明する。
 初めに、タスクセットパラメータ保持部11は、外部から入力されたタスクセットパラメータを保持する(ステップS101)。
 次に、最適配置探索部132は、タスク配置候補(どのタスクをどのコアに配置するかの候補データ)を生成する(S102)。
 次に、序列符号生成部121は、タスクセットパラメータ保持部11に保持されたタスクセットパラメータを参照して、各タスクの序列符号を求める。前述のように、序列符号生成部121は、各タスクの序列符号を算出してもよいし、既に各タスクに割り当てられている序列符号を取得してもよい。そして、重み付け部122は、各タスクの序列符号に基づいて序列重みを生成する(ステップS103)。
 このとき、重み付け部122は、タスクセットに存在する全ての依存関係について序列重みを付与してもよい。
 ただし、重み付け部122は、評価値算出部131で必要となる依存関係について序列重みを付与してもよい。
 この動作に基づき、タスク配置装置1は、付与処理の効率化を図れる。例えば、評価値算出部131が、コア間依存に付与された序列重みを用いて評価値を算出する場合、重み付け部122は、ステップS102で生成したタスク配置候補におけるコア間依存に対して、序列重みを付与すればよい。
 なお、全ての依存関係について序列重みを付与する場合、上述のステップS102およびS103は、順不同の処理である。例えば、タスク配置装置1は、ステップS103、ステップS102の順での実行や、ステップS102およびステップS103の同時実行も可能である。
 次に、評価値算出部131は、ステップS102で生成されたタスク配置候補について、ステップS103でコア間依存に付与された序列重みを用いて、タスク配置の良さを示す評価値を算出する(ステップS104)。
 次に、最適配置探索部132は、生成されたタスク配置候補およびその評価値が、タスク配置の探索終了条件を満たすか否かを判断する(ステップS105)。
 ここで、タスク配置の探索終了条件を満たさない場合、タスク配置装置1は、再度、ステップS102からの処理を繰り返す。
 一方、タスク配置の探索終了条件を満たす場合、最適配置探索部132は、これまでに生成したタスク配置候補の中で、最も評価値のよいタスク配置候補を最適化結果として出力する(ステップS106)。そして、タスク配置装置1は、動作を終了する。
 ここで、タスク配置の探索終了条件は、最適配置探索部132に採用される最適化アルゴリズムに従い異なる。例えば、最適化アルゴリズムとして単純な全探索が用いられる場合、タスク配置の探索終了条件は、生成し得る全てのタスク配置候補の生成終了となる。この場合、最適配置探索部132は、全てのタスク配置候補のうち、最適な評価値を持つタスク配置候補を、最適化結果として出力する。
 また、例えば、最適化アルゴリズムとして他の一般的な最適化アルゴリズムが採用される場合、タスク配置の探索終了条件は、その最適化アルゴリズムにおいて評価値がこれ以上良くならないとの判断でもよい。あるいは、タスク配置の探索終了条件は、タスク配置候補の生成を所定回数繰り返しても評価値が改善しないとの判断でもよい。
 以上で、タスク配置装置1の動作の説明を終了する。
 次に、本発明の第1の実施の形態としてのタスク配置装置1の詳細な構成および動作について具体例を用いて説明する。
 まず、ステップS101において、タスクセットパラメータ保持部11に保持されるタスクセットパラメータの具体例について、図6及び図7A~図7Cを参照して説明する。
 図6は、タスク1~タスク6で構成されるタスクセットに存在する依存関係をグラフ表現した図である。以降、このようなグラフを、タスクグラフとも記載する。このようなタスクグラフにおいて、タスク間を結ぶ矢印は、両端のタスク間の依存関係を表す。また、依存関係を表す矢印は、終点側のタスクの開始に、始点側のタスクの終了が必要であることを表す。このようなタスクグラフは、タスクセット全体の依存関係に基づく実行の流れを表しているともいえる。
 このようなタスクグラフで表されるタスクセットのタスクセットパラメータについて、そのデータ構造の一例を図7Aから図7Cに示す。
 例えば、図7Aに示すように、タスクセットパラメータ保持部11は、タスクセットを構成する各タスクについて、依存先タスクを対応付けて保持してもよい。例えば、図7Aでは、タスク1について、その依存先タスクとして、タスク2、4および5が保持されている。また、タスクセットパラメータ保持部11は、各タスクについて、さらにその他のパラメータを保持してもよい。その他のパラメータは、例えば、前述のように、タスクの起動周期、実行時間、必要メモリサイズでもよい。
 あるいは、図7Bに示すように、タスクセットパラメータ保持部11は、タスクセットを構成する各タスクについて、依存元タスクを対応付けて保持してもよい。例えば、図7Bでは、タスク6について、その依存元タスクとして、タスク3、4および5が保持されている。また、この場合も、タスクセットパラメータ保持部11は、各タスクについて、さらに、上述のようなその他のパラメータを保持してもよい。
 あるいは、図7Cに示すように、タスクセットパラメータ保持部11は、各依存関係について、依存元タスクおよび依存先タスクの組合せを表す情報を保持してもよい。なお、図7Cにおいて、依存番号は、依存関係を識別する情報である。一例として、依存番号1は、タスク1(依存元タスク)からタスク2(依存先タスク)への依存関係を表している。また、このような場合に、さらに上述のようなその他のパラメータを保持するためには、タスクセットパラメータ保持部11は、依存関係を保持するテーブルとは異なるテーブルとして、各タスクについてその他のパラメータを保持すればよい。
 次に、ステップS103において、序列符号生成部121が、各タスクの序列符号を算出する処理の具体例について述べる。
 例えば、序列符号生成部121は、タスクグラフにおいて序列が前方である(開始タスクに近い)、すなわち早い順序・時間帯に実行される可能性が高いタスクほど、より小さい数値の序列符号を割り当ててもよい。言い換えると、序列符号生成部121は、序列が後方である(開始タスクから遠い)、すなわち遅い順序・時間帯に実行される可能性が高いタスクほど、大きい数値の序列符号を付与してもよい。
 なお、各タスクに割り当てられる序列符号は、実際の実行順序と異なっても構わない。これは、実際にタスクセットが実行される際のタスク実行順序は、一意には決定されないからである。一般的に、同時に実行可能状態になるタスクが複数ある場合には、いずれのタスクが先に実行されるかは、他の様々な要因を基に実行時に定まる。
 このように、早い順序ほど小さい値の序列符号を割り当てる場合の序列符号の算出手法の具体例について説明する。ここでは、タスクセット全体の依存関係に基づく実行の流れを表す上述の図6のタスクグラフを用いて、序列符号を算出する3つの具体的手法例について説明する。
 一つ目の序列符号の算出手法の具体例として、トポロジカルソートを用いる手法について説明する。
 図8に、トポロジカルソートを用いて各タスクに割り当てられた序列符号の一例を示す。図8において、丸で囲まれた数値は、各タスクに割り当てられた序列符号を示す。ここで、トポロジカルソートとは、無閉路有向グラフを対象に、どのノード(本発明におけるタスク)も、その出力辺(本発明に基づく依存)の先のノードより前になるように、各ノードを順序付けして並べる手法である。この手法は、ノードの並びを結果として出力する。その結果、トポロジカルソートを用いて算出された序列符号は、各タスクに唯一の値となる。
 なお、トポロジカルソートを実現するアルゴリズムとして、一般的には、公知文献「Kahn,A.B.(1962),“Topological sorting of large networks”,Communications of the ACM 5(11):558−562」に記載のKahnに基づくアルゴリズムや、深さ優先探索を用いるアルゴリズム等の公知技術が適用可能である。
 二つ目の序列符号の算出手法の具体例として、幅優先探索を用いる手法について説明する。
 この手法に基づくと、序列符号生成部121は、開始タスクから依存を介して連なる流れにおいて各タスクが何個目であるかを基に、タスクの序列符号を割り当てる。また、この手法を用いる場合、序列符号生成部121は、開始タスクから複数の流れを経るタスクについて、タスク数が最も多い流れに基づいて序列符号を割り当てる。
 図9に、幅優先探索を用いて各タスクに割り当てられた序列符号の一例を示す。
 図6のタスクグラフでは、タスク1が、開始タスクである。そこで、図9に示すように、序列符号生成部121は、タスク1に序列符号0を割り当てる。また、タスク2、タスク4、および、タスク5は、それぞれ開始タスクから依存を介して連なる流れにおいて1つ目のタスクである。そこで、序列符号生成部121は、これらのタスクに序列符号1を割り当てる。また、タスク3は、開始タスクから依存を介して連なる流れにおいてタスク2に続く2つ目のタスクである。そこで、序列符号生成部121は、タスク3に序列符号2を割り当てる。また、タスク6は、タスク3に続く流れでは、開始タスクから3つ目のタスクであり、タスク4およびタスク5に続く流れでは、開始タスクから2つ目のタスクである。このとき、タスク数が最も多い流れを基に序列符号を割り当てると、序列符号生成部121は、タスク6に序列符号3を割り当てる。
 なお、ここでは、開始タスクであるタスク1の序列符号として0を割り当てる例について説明したが、開始タスクに割り当てる序列符号は、その他の値でもよい。例えば、序列符号生成部121は、開始タスクの序列符号に1を割り当ててもよいし、その他の値を割り当ててもよい。
 三つ目の序列符号の算出手法の具体例として、実行時間情報を用いる手法について説明する。
 この手法を用いる場合、タスクセットパラメータ保持部11は、各タスクの実行時間を保持する。この例では、序列符号生成部121は、幅優先探索の手法を基本に、さらに各タスクの実行時間を考慮して各タスクに序列符号を割り当てる。具体的には、序列符号生成部121は、開始タスクから依存を介して連なる流れにおいて各タスクの実行時間の合計を基に、タスクの序列符号を割り当てる。
 また、この手法を用いる場合、序列符号生成部121は、開始タスクから複数の流れを経るタスクについて、最も長い合計実行時間に基づいて序列符号を割り当てる。このように算出される序列符号は、実行時間が長いタスクおよび短いタスクの影響の違いを反映した序列符号となる。
 図10に、実行時間情報を用いて各タスクに割り当てられた序列符号の一例を示す。
 図10に示すように、序列符号生成部121は、開始タスクであるタスク1に対して、その実行時間である2を序列符号として割り当てる。また、序列符号生成部121は、タスク2に対して、タスク1の序列符号(実行時間)2に、タスク2の実行時間4を加算した6を序列符号として割り当てる。同様に、序列符号生成部121は、タスク4に対して、序列符号5を割り当て、タスク5に対して序列符号7を割り当てる。また、序列符号生成部121は、タスク6に対して、タスク6の依存元のタスクのうち序列符号が最も大きい(つまり合計実行時間が最も長い)タスク3の序列符号8に、タスク6の実行時間3を加えた11を序列符号として割り当てる。
 なお、ステップS103において、序列符号生成部121は、序列重みの付与に用いる各タスクの序列符号を上述のように算出する代わりに、外部から入力される各タスクの序列符号を用いてもよい。
 この場合、ステップS101において、各タスクの序列符号に相当する情報が外部から入力され、タスクセットパラメータ保持部11が保持する。そして、序列符号生成部121は、タスクセットパラメータ保持部11を参照して、各タスクの序列符号を取得してもよい。例えば、タスクセットパラメータ保持部11は、各タスクに関連する情報を、トポロジカルソートされたことに相当する順序で保持してもよい。この場合、序列符号生成部121は、タスクセットパラメータ保持部11に保持されている各タスクに関する情報の保持順序を、序列符号として取得すればよい。あるいは、タスクセットパラメータ保持部11は、各タスクに関するその他のパラメータとして、序列符号を表す数値を含む情報を保持してもよい。
 次に、ステップS103において、重み付け部122が、各依存関係に序列重みを付与する処理の3つの具体例について説明する。
 なお、ここでは、序列重みが重いほど、序列重みの数値を大きくする。また、配置部13は、序列重みの数値が大きい依存関係ほど、なるべく離れない配置(なるべく同じコアへの配置)を探索するとして説明する。
 一つ目の序列重み付与の具体例として、タスクグラフにおいて序列が後方に近い(開始タスクから遠い)タスク間の依存関係ほど、序列重みを重くする手法について説明する。
 前述のように、タスクグラフにおいて序列が後方に近いほど、異なるコア間に配置されたときのタスクセット全体の実行性能への影響が、大きいと考えられる。したがって、重み付け部122は、序列が後方になる(開始タスクから遠くなる)に従って、序列重みの数値を大きくすればよい。
 序列が後方に近いほど序列重みを重くする単純な例として、図8に示した各タスクに唯一の序列符号がトポロジカルソートを基に割り当てられた場合を考える。この場合、重み付け部122は、序列符号が小さいほうから順に全タスク数の1/n(nは正の整数を表し、“/”は除算を表す)個のタスクを依存元とする依存関係に対して、序列重み1を割り当ててもよい。同様に、重み付け部122は、全体の1/n~2/nのタスクを依存元とする依存関係に対して序列重み2を割り当てていき、以降同様に繰り返してもよい。
 序列が後方に近いほど序列重みを重くする他の例として、図9に示した幅優先探索を基に各タスクに序列符号が割り当てられた場合を考える。このような場合、重み付け部122は、各依存関係の依存元タスク(先に実行されるタスク)に割り当てられた序列符号に基づいて、序列重みを付与してもよい。例えば、重み付け部122は、各依存関係の依存元のタスクに割り当てられた序列符号の数値をそのまま序列重みとして、依存関係に付与してもよい。
 このように割り当てられた序列重みを、図11に示す。図11において、丸で囲まれた数値は序列符合を表し、二重丸で囲まれた数値は序列重みを表している。図11では、序列符号0のタスク1からタスク2、4および5への各依存関係に、序列重み0が、付与されている。また、序列符号1のタスク2からタスク3、ならびに、序列符号1のタスク4および5からタスク6への各依存関係に、序列重み1が、付与されている。また、序列符号2のタスク3からタスク6への依存関係に、序列重み2が、付与されている。
 序列が後方に近いほど序列重みを重くするさらに他の例として、図10に示した幅優先探索に各タスクの実行時間情報を組み合わせて序列符号が割り当てられた場合を考える。この場合も、重み付け部122は、各依存関係の依存元タスク(先に実行されるタスク)に割り当てられた序列符号を基に、序列重みを付与してもよい。
 このように割り当てられた序列重みを、図12に示す。
 図12において、丸で囲まれた数値は序列符合を表し、二重丸で囲まれた数値は序列重みを表している。図12では、序列符号2のタスク1からタスク2、4および5への各依存関係に、序列重み2が、付与されている。また、序列符号6のタスク2からタスク3、序列符号5のタスク4からタスク6、および、序列符号7のタスク5からタスク6への各依存関係に、序列重みとして、それぞれ6、5および7が、付与されている。また、序列符号8のタスク3からタスク6への依存関係に、序列重み8が、付与されている。
 このように、重み付け部122は、タスクグラフ上で序列が後方に近いタスク間の依存関係ほど、序列重みを重くする。
 二つ目の序列重み付与の具体例として、依存関係を有する2つのタスクの序列が近いほど、序列重みを重くする手法について説明する。
 ここでも、序列重みが重いほど、序列重みの数値を大きくする。単純な例として、重み付け部122は、タスクセット全体における序列符号の最大値から、依存関係を有する2つのタスクの序列符号の差の絶対値を減算した値を、依存関係の序列重みとしてもよい。あるいは、重み付け部122は、依存関係を有する2つのタスクの序列符号の差の絶対値の最大値から、該当する依存関係を有する2つのタスクの序列符号の差の絶対値を減算した値を、依存関係の序列重みとしてもよい。
 例えば、図9に示した幅優先探索に基づいて各タスクに序列符号が割り当てた場合を考える。
 この場合、重み付け部122は、図13に示すように、各依存関係に序列重みを付与する。図13において、丸で囲まれた数値は序列符合を表し、破線の三角形で囲まれた数値は序列符号の差の絶対値を表し、二重丸で囲まれた数値は序列重みを表している。図13において、タスク4から6、および、タスク5から6への依存関係の両端の序列符号の差の絶対値は、2である。また、それ以外の依存関係の両端の序列符号の差の絶対値は、1である。また、序列符号の最大値は、3である。したがって、タスク4から6、および、タスク5から6への各依存関係の序列重みは、最大値3から、両端の序列符号の差の絶対値2を減算した1となる。その他の依存関係の序列重みは、最大値3から、両端の序列符号の差の絶対値1を減算した2となる。
 このように、重み付け部122は、タスクグラフ上での序列が近いタスク間の依存関係ほど、序列重みを重くする。
 三つ目の序列重み付与の具体例として、上述した2つの手法を組み合わせる手法も可能である。
 単純な例として、重み付け部122は、一つ目の例の全体の1/nずつ序列重みを大きくする手法で生成した序列重みの値に対して、二つ目の例の序列符号の最大値から、各依存関係の両端の序列符号の差の絶対値を減算して得た序列重みの値を乗算した値を、序列重みとしてもよい。
 このように、重み付け部122は、タスクグラフ上で序列が後方に近いタスク間の依存関係ほど重く、さらに、タスクグラフ上での序列が近いタスク間の依存関係ほど重い序列重みを生成できる。
 また、上述の手法の他にも、重み付け部122は、各依存関係に対して、依存関係を有する2つのタスクの序列に応じて、依存待ち時間の発生しやすさの程度を反映した序列重みを生成してもよい。また、重み付け部122は、それらの各種手法を組み合わせて序列重みを生成してもよい。
 なお、一般的に、タスクセットに存在するタスク間の各依存関係として、その依存関係に関連する通信方法や転送データ量等が異なる依存関係が混在する。このため、本実施の形態としてのタスク配置装置1が対象とするタスクセットは、各タスク間の依存関係に関するこれらの他の要因に基づく重みをあらかじめパラメータとして有している場合がある。この場合、重み付け部122は、各依存関係について、あらかじめ付与された他の要因に基づく重みの値と、上述のように算出した序列重みの値とを組み合わせた値(例えば、乗算値)を、各依存関係に対して付与してもよい。
 次に、ステップS104において、評価値算出部131が、評価値を算出する処理の具体例について説明する。
 評価値算出部131は、コア間依存に付与された序列重みを用いて、タスク配置の良さを示す評価値を算出する。
 単純な例として、評価値算出部131は、コア間依存に付与された序列重みを全て加算又は乗算した値を評価値として算出してもよい。
 例えば、加算値を用いる場合、評価関数Fは、次式(1)で表される。式(1)において、対象のタスク配置候補におけるコア間依存は、n個とする。また、wは、各コア間依存i(i=0~n−1)に付与された序列重みを表す。
Figure JPOXMLDOC01-appb-I000001
 このように算出される評価値は、値が小さいほど、タスクセット全体の実行性能に対するコア間依存の影響が相対的に小さいことを表し、すなわち、タスク配置が良いことを表す。
 評価値算出部131が式(1)に基づいて算出する評価値の一例について、図14を用いて説明する。
 図14は、あるタスク配置候補を表している。このタスク配置候補は、コア0に、タスク2、3および6を配置し、コア1にタスク1、4および5を配置している。また、このタスク配置候補におけるコア間依存は、タスク1から2への依存、タスク4から6への依存、および、タスク5から6への依存である。このように、このタスク配置候補におけるコア間依存数は、3本である。また、これらのコア間依存に付与された序列重みは、タスク1から2への依存関係に対して0、タスク4から6への依存関係およびタスク5から6への依存関係に対してそれぞれ1が付与されている。したがって、評価値算出部131は、このタスク配置候補について式(1)に基づく評価値として、2を算出する。
 なお、図14では、コア数が2個の場合の評価値の算出例について説明しているが、コア数が3以上の場合においても、評価値算出部131は、同様に評価値を算出可能である。
 また、ステップS104において、評価値算出部131は、式(1)以外のその他の評価関数に基づいて評価値を算出してもよい。
 例えば、評価値算出部131は、所定値から、コア間依存に付与された序列重みを全て減算した値を評価値として算出してもよい。この場合、このように算出される評価値は、値が大きいほど、タスクセット全体の実行性能に対するコア間依存の影響が相対的に小さいことを表し、すなわち、タスク配置が良いことを表す。
 また、ステップS104において、評価値算出部131は、コア間依存に付与された序列重みに加えて、各タスクの起動周期、実行時間、または、必要メモリサイズ等を用いて評価値を算出してもよい。この場合、これらの起動周期、実行時間、または、必要メモリサイズ等の情報は、タスクセットパラメータ保持部11に保持される。
 例えば、各コアに割り当てられたタスクの実行時間の合計が各コアで均等であることが適切とされるシステムを想定する。この場合、評価値算出部131は、コア間依存に付与された序列重みに基づく評価値に加えて、さらに各コアに割り当てられたタスクの実行時間合計の差に基づく評価値を追加で算出し、これらを統合した評価値を算出してもよい。
 また、一定周期ごとに起動するタスクにおいて、各タスクのコアの利用率は、「タスクの実行時間÷タスクの起動周期」として計算できる。ここで、コアの利用率が各コアで均等であることが適切であるシステムを想定する。この場合、評価値算出部131は、コア間依存に付与された序列重みに基づく評価値に加えて、さらに各コアのコア利用率の差に基づく評価値を追加で算出し、これらを統合した評価値を算出してもよい。
 また、必要メモリサイズが各コアで均等であることが適切であるシステムを想定する。この場合、評価値算出部131は、コア間依存に付与された序列重みに基づく評価値に加えて、さらに各コアの必要メモリサイズの差に基づく評価値を追加で算出し、これらを統合した評価値を算出してもよい。
 このように、タスクセットパラメータ保持部11に、タスク間の依存関係に加えてその他のタスクセットパラメータが保持されている場合、評価値算出部131は、これらのその他のタスクセットパラメータを付随的に用いて評価値を算出できる。そして、その場合、配置部13は、これらのコア間依存以外の要素も考慮したタスク配置が可能となる。
 このように、コア間依存に付与された序列重みを用いた評価値の算出手法には、様々な手法を適用可能である。
 次に、ステップS105において、最適配置探索部132が用いる探索終了条件の具体例について説明する。
 前述のように、最適配置探索部132は、タスク配置候補を生成し、生成したタスク配置候補について算出される評価値を用いて、生成されたタスク配置候補およびその評価値が、探索終了条件を満たすか否かを判定する。
 ここで、評価値が小さいほどタスク配置が良いとすると、最適配置探索部132は、評価値を最小化するタスク配置候補を探索する。
 このとき、タスク配置の探索終了条件は、最適配置探索部132が採用する最適化アルゴリズムに基づき異なる。例えば、最適化アルゴリズムとして単純な全探索が採用されている場合、探索終了条件は、生成可能な全てのタスク配置候補の生成が終了する。この場合、最適配置探索部132は、全てのタスク配置候補のうち、最小の評価値が算出されたタスク配置候補を最適化結果として出力する。
 また、例えば、他の一般的な最適化アルゴリズムが採用されている場合、探索終了条件は、そのアルゴリズムに基づく評価値がこれ以上小さくならないとの判定や、タスク配置候補の生成を所定回数繰り返しても評価値が小さくならないとの判定でもよい。
 以上詳細に説明したように、タスクセットパラメータ保持部11、序列重み付与部12、評価値算出部131及び最適配置探索部132は、それぞれ様々なデータ構造や様々な手法を採用できる。本実施の形態において、これらの各機能ブロックに採用されるデータ構造や手法は、様々に組み合わせて採用可能である。また、本実施の形態は、各機能ブロックにおいて、複数の手法の組み合わせも採用できる。
 次に、本発明の第1の実施の形態の効果について述べる。
 本発明の第1の実施の形態としてのタスク配置装置は、序列に基づく一様でないコア間依存の影響をより低減して、より性能のよいタスク配置ができる。
 その理由は、序列重み付与部が、タスクセット全体の実行の流れのうち各タスクが実行され得る位置である序列に基づいて、タスク間に存在する各依存関係に対して序列重みを付与するからである。そして、配置部は、依存関係にしたがって1つ以上のコアにタスクを配置する際に、異なるコア間に配置されたタスク間の依存関係に付与された序列重みに基づいて算出される評価値がより良くなるように、タスク配置するからである。これに基づき、本実施の形態としてのタスク配置装置は、特許文献1に記載された装置に基づくコア間依存の数を最小化してもコア間依存待ち時間が生じるようなタスクセットに対して、より依存待ち時間を低減するタスク配置を生成可能となる。その結果、本発明の第1の実施の形態としてのタスク配置装置は、マルチコア性能をより充分に発揮可能なタスク配置を出力できる。すなわち、本実施の形態としてのタスク配置装置は、マルチコアシステムにおいて、序列に応じたコア間依存の実行性能への影響の大小を反映したタスク配置を実現できる。
 また、本発明の第1の実施の形態としてのタスク配置装置は、タスクセットの実行が終了に近い位置での依存待ち時間をより削減して、より性能のよいタスク配置ができる。
 その理由は、序列重み付与部が、タスクグラフにおける序列が後方に近いタスク間の依存関係ほど序列重みを重くするからである。この動作に基づき、配置部は、序列が後方に近いタスク間のコア間依存が多いほど配置が悪いことを表す評価値を算出する。そして、配置部が、その評価値をより良くするタスク配置を探索する。したがって、このように探索されるタスク配置では、タスクセット全体の実行終了に近い位置で依存関係を有するタスクほど、異なるコアに配置されにくくなる。したがって、本発明の第1の実施の形態としてのタスク配置装置は、タスクグラフ上で序列の後方に現れるクリティカルな依存の問題へ対処できる。
 また、本発明の第1の実施の形態としてのタスク配置装置は、タスクセットにおける実行順序が近いタスク間の依存待ち時間をより削減して、より性能のよいタスク配置ができる。
 その理由は、序列重み付与部が、タスクグラフにおける序列符号の差が小さいタスク間の依存関係ほど序列重みを重くするからである。この動作に基づき、配置部は、序列が近いタスク間のコア間依存が多いほど配置が悪いことを表す評価値を算出する。そして、配置部が、その評価値をより良くするタスク配置を探索する。したがって、このように探索されるタスク配置では、タスクセットにおける実行順序が近く依存関係を有するタスクほど、異なるコアに配置されにくくなる。したがって、本発明の第1の実施の形態としてのタスク配置装置は、タスクグラフ上での序列が近いタスク同士の依存の問題へ対処できる。
 (第2の実施の形態)
 次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。なお、本実施の形態の説明で参照する各図面において、本発明の第1の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して、本実施の形態における詳細な説明を省略する。
 まず、本発明の第2の実施の形態としてのタスク配置装置2の機能の一例のブロックを、図15に示す。図15において、タスク配置装置2は、本発明の第1の実施の形態としてのタスク配置装置1と同一の構成に加えて、序列符号保持部24および序列重み保持部25をさらに含む。
 ここで、タスク配置装置2は、本発明の第1の実施の形態としてのタスク配置装置1と同様に、図1に示した構成を含むコンピュータ装置を用いて構成しても良い。その場合、序列符号保持部24および序列重み保持部25は、記憶装置1004を用いて構成される。なお、これらの各機能ブロックを構成するハードウェア構成は、上述の構成に限定されない。
 序列符号保持部24は、序列重み付与部12が算出した序列符号を保持する。序列符号保持部24が保持する情報の一例を図16A及び図16Bに示す。例えば、序列符号保持部24は、図16Aに示すように、タスクごとに序列符号を保持してもよい。あるいは、序列符号保持部24は、図16Bに示すように、序列符号の値ごとに、その序列符号が割り当てられたタスクを識別する情報を保持してもよい。例えば、図16Bは、序列符号1が、タスク2、4および5に割り当てられていることを表している。
 なお、序列符号保持部24は、タスクセットパラメータ保持部11に含まれてもよい。
 例えば、序列符号生成部121を用いてトポロジカルソートに基づく序列符号が生成された場合のように各タスクに唯一の序列符号が割り当てられた場合、序列符号保持部24は、タスクセットパラメータ保持部11に保持されている各タスクに関する情報を序列符合の順序に並べ替えた表現を用いて、序列符号を保持してもよい。この動作に基づき、序列符号保持部24は、序列符合を保持するための記憶装置の領域を用いず、算出された序列符号を保持できる。
 序列重み保持部25は、序列重み生成部12を用いて各依存関係に付与された序列重みを保持する。
 以上のように構成されたタスク配置装置2の動作について、図17を参照して説明する。
 初めに、タスクセットパラメータ保持部11は、外部から入力されたタスクセットパラメータを保持する(ステップS101)。
 次に、序列符号生成部121は、タスクセットパラメータ保持部11に保持されたタスクセットパラメータを参照し、各タスクの序列符号を算出する(ステップS201)。例えば、序列符号生成部121は、序列符号の算出手法として、本発明の第1の実施の形態で詳細に説明した手法を適用可能である。
 次に、序列符号保持部24は、算出された序列符号を保持する(ステップS202)。
 次に、重み付け部122は、序列符号保持部24に保持された序列符号に基づいて、各依存関係に対して序列重みを付与する(ステップS203)。例えば、重み付け部122は、重み付けの付与手法として、本発明の第1の実施の形態で詳細に説明した手法を適用可能である。
 次に、序列重み保持部25は、重み付け部122を用いて生成された序列重みを保持する(ステップS204)。
 次に、最適配置探索部132は、タスク配置候補を生成する(ステップS102)。
 次に、評価値算出部131は、生成されたタスク配置候補について、タスク配置の良さを示す評価値である評価値を、序列重み保持部25に保持された序列重みを用いて算出する(ステップS104)。例えば、評価値算出部131は、評価値の算出手法として、本発明の第1の実施の形態で詳細に説明した手法を適用可能である。
 次に、最適配置探索部132は、タスク配置候補および評価値が、タスク配置の探索終了条件を満たすか否かを判定する(ステップS105)。例えば、探索終了条件としては、本発明の第1の実施の形態で詳細に説明した条件が、適用可能である。
 ここで、タスク配置の探索終了条件を満たさない場合、タスク配置装置2は、再度ステップS102からの処理を繰り返す。
 一方、タスク配置の探索終了条件を満たす場合、最適配置探索部132は、タスク配置の最適化結果を出力する(ステップS106)。そして、タスク配置装置2は、動作を終了する。
 なお、ステップS203において、重み付け部122は、タスク配置候補におけるコア間依存に対して、序列重みを付与してもよい。この場合、タスク配置装置2は、ステップS102においてタスク配置候補を生成後、ステップS203~S204を実行してもよい。
 以上で、本発明の第2の実施の形態の動作の説明を終了する。
 次に、本発明の第2の実施の形態の効果について述べる。
 本発明の第2の実施の形態としてのタスク配置装置は、マルチコアシステム向けにタスク配置する際に、コア間依存の依存待ち時間の発生しやすさを反映した序列重みを算出する処理を、より効率化できる。
 その理由は、序列符号保持部が、序列重みの算出に用いる各タスクの序列符号を保持するからである。ここで、あるタスクが複数の依存関係を有する場合、序列重み付与部は、序列重みの算出のために、そのタスクの序列符号を複数回参照する。このような場合、一旦計算された序列符号の序列符号保持部の保持を基に、本発明の第2の実施の形態としてのタスク配置装置は、序列重み付与部の処理時間を、より短縮できるからである。
 また、本発明の第2の実施の形態としてのタスク配置装置は、序列に基づき一様でないコア間依存の影響をより低減してより性能のよいタスク配置を探索する処理を、より効率化できる。
 その理由は、序列重み保持部が、序列重み生成部を用いて生成された序列重みを保持するからである。ここで、序列重みは、一度計算すれば値が不変で、再計算が不要なことが多い。したがって、序列重みは、異なるタスク配置候補について評価値を算出するたびに再計算される必要がない。したがって、序列重み保持部の序列重みの保持を基に、本発明の第2の実施の形態としてのタスク配置装置は、タスク配置の探索時間を短縮できる。
 なお、上述した本発明の各実施の形態において、序列符号は、タスクグラフ上で開始タスクに近いほど小さい値を持つとして主に説明したが、本発明における序列符号は、例えば、タスクグラフ上で開始タスクに近いほど大きい値を持ってもよい。
 また、上述した本発明の各実施の形態において、序列重みは、依存待ち時間を発生しやすいほど大きい値を持つとして主に説明したが、本発明における序列重みは、例えば、依存待ち時間を発生しやすいほど小さい値を持ってもよい。
 また、上述した本発明の各実施の形態において、評価値は、タスク配置が良いほど小さい値を持つとして主に説明したが、本発明における評価値は、タスク配置が良いほど大きい値を持ってもよい。その場合、配置部は、評価値をより大きくするタスク配置候補を探索すればよい。
 また、上述した本発明の各実施の形態において、各フローチャートを参照して説明したタスク配置装置の動作を、本発明のプログラムとしてコンピュータの記憶装置(記憶媒体)に格納しておき、係るプログラムをCPUが読み出して実行してもよい。そして、このような場合において、本発明は、係るプログラムのコード或いは記憶媒体を用いて構成される。
 また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。
 また、本発明は、上述した各実施の形態に限定されず、様々な態様で実施されることが可能である。
 また、上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
 配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持手段と、
 前記タスクセットパラメータの参照を用いて、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列に基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与手段と、
 前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置手段と、
 を含むタスク配置装置。
(付記2)
 前記序列重み付与手段は、
 前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
 ことを特徴とする付記1に記載のタスク配置装置。
(付記3)
 前記序列重み付与手段は、
 前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
 ことを特徴とする付記1または付記2に記載のタスク配置装置。
(付記4)
 前記序列重み付与手段は、
 前記タスクセットパラメータ保持手段に保持された前記タスクセットパラメータに基づいて、前記序列重みの付与に用いるための前記序列を表す序列符号を算出する
 ことを特徴とする付記1乃至付記3のいずれか1つに記載のタスク配置装置。
(付記5)
 前記序列重み付与手段を用いて算出される序列符号を保持する序列符号保持手段をさらに含み、
 前記序列重み付与手段は、
 前記序列符号保持手段に保持された序列符号の参照を用いて、前記各依存関係に前記序列重みを付与する
 ことを特徴とする付記4に記載のタスク配置装置。
(付記6)
 前記序列重み付与手段を用いて付与された前記序列重みを保持する序列重み保持手段をさらに含み、
 前記配置手段は、
 前記序列重み付与手段に保持された序列重みを用いて前記評価値を算出する
 ことを特徴とする付記1乃至付記5のいずれか1つに記載のタスク配置装置。
(付記7)
 配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持し、
 前記タスクセットパラメータの参照を用いて、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列に基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与し、
 前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する、
 タスク配置方法。
(付記8)
 前記各依存関係に前記序列重みを付与する際に、前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
 ことを特徴とする付記7に記載のタスク配置方法。
(付記9)
 前記各依存関係に前記序列重みを付与する際に、前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
 ことを特徴とする付記7または付記8に記載のタスク配置方法。
(付記10)
 配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持処理と、
 前記タスクセットパラメータの参照を用いて、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列に基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与処理と、
 前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置処理と、
 をコンピュータに実行させるプログラム。
(付記11)
 前記序列重み付与処理において、前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
 ことを特徴とする付記10に記載のプログラム。
(付記12)
 前記序列重み付与処理において、前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
 ことを特徴とする付記10または付記11に記載のコンピュータ・プログラム。
 以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
 この出願は、2011年10月21日に出願された日本出願特願2011−231283を基礎とする優先権を主張し、その開示の全てをここに取り込む。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The task placement apparatus according to each embodiment of the present invention described below is configured to configure each task set when designing and implementing a function-distributed AMP multicore system in which each task is executed by a specific core. This is a device that determines in which core a task is to be placed. As described above, the performance of an AMP multi-core system differs depending on which core the task is placed on. In the following, it will be described that task placement that enhances the performance of a multi-core system is possible based on the task placement device of each embodiment of the present invention. Hereinafter, an AMP multicore system targeted in each embodiment of the present invention is simply referred to as a multicore system.
(First embodiment)
FIG. 1 shows an example of the hardware configuration of the task placement device 1 as the first exemplary embodiment of the present invention. In FIG. 1, a task placement device 1 includes a CPU (Central Processing Unit) 1001, a RAM (Random Access Memory) 1002, a ROM (Read Only Memory) 1003, and a storage device 1004 such as a hard disk, and constitutes a computer. is doing.
The ROM 1003 and the storage device 1004 store programs and various data for causing a computer to function as the task placement device 1 of the present embodiment.
The CPU 1001 reads the program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them.
Next, an example of the functional block configuration of the task placement device 1 is shown in FIG. In FIG. 2, the task placement device 1 includes a task set parameter holding unit 11, an ordering weight assigning unit 12, and a placement unit 13.
Here, the task set parameter holding unit 11 is configured using, for example, a storage device 1004. Further, the rank weight assigning unit 12 and the arranging unit 13 are configured using, for example, a CPU 1001 that reads a computer program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them. Note that the hardware configuration configuring each functional block of the task placement device 1 is not limited to the configuration described above.
The task set parameter holding unit 11 holds task set parameters input from the outside. Here, the task set parameter is information representing the characteristics of individual tasks constituting a task set (a set of one or more tasks to be arranged). The task set parameter includes information representing a dependency relationship between tasks. In addition, the task set parameter may include information representing the task start cycle, execution time, required memory size, and the like.
In addition, when a task set parameter input from the outside is input in a format that can be referred to from other functional blocks such as a file, the task set parameter holding unit 11 copies the task set parameter. There is no need to hold it. In this case, the task set parameter holding unit 11 may hold information indicating the file or the like.
In addition, when the task set parameter input from the outside includes information indicating an order to be described later, the task set parameter holding unit 11 may further hold information indicating the order of each task.
The rank weight assigning unit 12 refers to the task set parameters held in the task set parameter holding unit 11 and assigns rank weights to each dependency based on the rank of each task. Here, the rank of each task means a position where each task can be executed in the flow of execution of the entire task set based on the dependency relationship. Further, the rank weight is a coefficient representing the weight based on the rank. Specifically, it can be said that the rank weight is a coefficient representing the degree of ease of execution waiting time based on the dependency. The ease of occurrence of such an execution waiting time changes based on the order of related tasks related to the dependency. Therefore, the rank weight is information based on the rank.
Specifically, the order weight assigning unit 12 includes an order code generation unit 121 and a weighting unit 122, as shown in FIG.
The order code generation unit 121 generates an order code indicating the order of each task in the target task set. Specifically, the order code generation unit 121 may calculate the order code of each task based on the task set parameter held in the task set parameter holding unit 11.
Alternatively, when the task set parameter holding unit 11 already holds information representing the rank of each task, the rank code generation unit 121 omits the process of calculating the rank code, and the task set parameter holding unit 11 What is necessary is just to acquire the order code of a task. In this case, the task set parameter holding unit 11 may hold an order code or may hold information on each task in an order corresponding to the order code.
The weighting unit 122 assigns a sequence weight to each dependency relationship between tasks based on the sequence code generated (or acquired) using the sequence code generation unit 121.
For example, the weighting unit 122 may increase the rank weight as the rank of each task having a dependency relationship is closer to the end in the flow of execution of the entire task set. Further, for example, the weighting unit 122 may increase the order weight as the order of two tasks having a dependency relationship is closer. Here, heavy ordering weight means that the dependency waiting time based on the dependency relationship is more likely to occur. The value of the ordering weight may be larger as it is heavier or smaller as it is heavier.
When the placement unit 13 places a task belonging to a task set on one or more cores according to the dependency relationship, the placement unit 13 calculates the order weights given to the dependency relationship between two tasks placed on different cores. The task is arranged based on the evaluated value. Hereinafter, the dependency relationship between two tasks arranged in different cores is also simply referred to as inter-core dependency.
Specifically, the arrangement unit 13 includes an evaluation value calculation unit 131 and an optimum arrangement search unit 132, as shown in FIG.
The evaluation value calculation unit 131 calculates an evaluation value that represents the goodness of the arrangement of a task arrangement candidate described later. Specifically, the evaluation value calculation unit 131 calculates an evaluation value by using the rank weight assigned to the inter-core dependency.
The optimum arrangement search unit 132 arranges tasks in one or more cores according to the dependency relationship, and generates task arrangement candidates. Then, the optimum arrangement search unit 132 searches for candidate task arrangements with good evaluation values calculated using the evaluation value calculation unit 131.
Here, as the simplest search method applicable to the optimum arrangement search unit 132, a full search can be cited. When using the full search, the optimal arrangement search unit 132 generates all task arrangement candidates, and outputs an arrangement with the best evaluation value among them as a search result.
However, it is more preferable that the optimum arrangement search unit 132 apply a generally known high-speed search method such as a branch and bound method, a greedy method, or a genetic algorithm as a search method more efficient than the full search.
The operation of the task placement apparatus 1 configured as described above will be described with reference to FIG.
First, the task set parameter holding unit 11 holds task set parameters input from the outside (step S101).
Next, the optimal arrangement search unit 132 generates task arrangement candidates (candidate data indicating which tasks are arranged in which cores) (S102).
Next, the order code generation unit 121 refers to the task set parameters held in the task set parameter holding unit 11 and obtains the order codes for each task. As described above, the order code generation unit 121 may calculate the order code of each task, or may obtain the order code already assigned to each task. Then, the weighting unit 122 generates an ordering weight based on the ordering code of each task (step S103).
At this time, the weighting unit 122 may give rank weights to all the dependency relationships existing in the task set.
However, the weighting unit 122 may give an ordering weight for the dependency necessary for the evaluation value calculation unit 131.
Based on this operation, the task placement device 1 can improve the efficiency of the grant process. For example, when the evaluation value calculation unit 131 calculates the evaluation value using the ordering weight assigned to the inter-core dependency, the weighting unit 122 determines the order for the inter-core dependency in the task placement candidate generated in step S102. What is necessary is just to give a weight.
Note that when ordering weights are assigned to all the dependency relationships, the above-described steps S102 and S103 are in no particular order. For example, the task placement device 1 can also execute step S103 and step S102 in this order, and simultaneously execute step S102 and step S103.
Next, the evaluation value calculation unit 131 calculates an evaluation value indicating the goodness of task arrangement using the rank weights given to the inter-core dependence in step S103 for the task arrangement candidates generated in step S102 (step S103). S104).
Next, the optimum arrangement search unit 132 determines whether or not the generated task arrangement candidate and its evaluation value satisfy a task arrangement search termination condition (step S105).
If the task placement search termination condition is not satisfied, the task placement device 1 repeats the processing from step S102 again.
On the other hand, when the task placement search termination condition is satisfied, the optimum placement search unit 132 outputs the task placement candidate having the best evaluation value among the task placement candidates generated so far as the optimization result (step S106). . Then, the task placement device 1 ends the operation.
Here, the task placement search termination condition differs according to the optimization algorithm employed by the optimum placement search unit 132. For example, when a simple full search is used as the optimization algorithm, the task layout search end condition is the generation end of all task layout candidates that can be generated. In this case, the optimum arrangement search unit 132 outputs a task arrangement candidate having an optimum evaluation value among all the task arrangement candidates as an optimization result.
Further, for example, when another general optimization algorithm is adopted as the optimization algorithm, the task placement search termination condition may be a determination that the evaluation value does not become better in the optimization algorithm. Alternatively, the task placement search termination condition may be a determination that the evaluation value does not improve even if the task placement candidate generation is repeated a predetermined number of times.
Above, description of operation | movement of the task placement apparatus 1 is complete | finished.
Next, a detailed configuration and operation of the task placement device 1 as the first exemplary embodiment of the present invention will be described using a specific example.
First, a specific example of task set parameters held in the task set parameter holding unit 11 in step S101 will be described with reference to FIG. 6 and FIGS. 7A to 7C.
FIG. 6 is a graph representation of the dependency relationships existing in the task set composed of tasks 1 to 6. Hereinafter, such a graph is also referred to as a task graph. In such a task graph, arrows connecting the tasks represent dependency relationships between the tasks at both ends. Further, the arrow indicating the dependency relationship indicates that it is necessary to end the task on the start point side in order to start the task on the end point side. It can be said that such a task graph represents the flow of execution based on the dependency of the entire task set.
An example of the data structure of the task set parameters of the task set represented by such a task graph is shown in FIGS. 7A to 7C.
For example, as shown in FIG. 7A, the task set parameter holding unit 11 may hold the dependency destination task in association with each task constituting the task set. For example, in FIG. 7A, for task 1, tasks 2, 4 and 5 are held as the dependency destination tasks. Further, the task set parameter holding unit 11 may hold other parameters for each task. Other parameters may be, for example, the task start cycle, execution time, and required memory size, as described above.
Alternatively, as illustrated in FIG. 7B, the task set parameter holding unit 11 may hold a dependency source task in association with each task constituting the task set. For example, in FIG. 7B, tasks 3, 4, and 5 are held as the dependency source task for task 6. Also in this case, the task set parameter holding unit 11 may further hold other parameters as described above for each task.
Alternatively, as illustrated in FIG. 7C, the task set parameter holding unit 11 may hold information representing a combination of a dependency source task and a dependency destination task for each dependency relationship. In FIG. 7C, the dependency number is information for identifying the dependency relationship. As an example, dependency number 1 represents a dependency relationship from task 1 (dependency source task) to task 2 (dependency destination task). Further, in such a case, in order to hold other parameters as described above, the task set parameter holding unit 11 sets other parameters for each task as a table different from the table holding the dependency relationship. You can hold it.
Next, a specific example of processing in which the order code generation unit 121 calculates the order code of each task in step S103 will be described.
For example, the order code generation unit 121 assigns an order code having a smaller numerical value to a task whose order is higher in the task graph (closer to the start task), that is, a task that is more likely to be executed in an earlier order / time zone. Also good. In other words, the order code generation unit 121 may assign an order code having a larger numerical value to a task whose order is backward (far from the start task), that is, a task that is likely to be executed in a later order / time zone. .
Note that the order code assigned to each task may be different from the actual execution order. This is because the task execution order when the task set is actually executed is not uniquely determined. Generally, when there are a plurality of tasks that can be executed simultaneously, which task is executed first is determined at the time of execution based on various other factors.
A specific example of a method for calculating an ordinal code in the case of assigning an ascending code having a smaller value in the earlier order will be described. Here, three specific method examples for calculating an order code will be described using the above-described task graph of FIG. 6 representing the flow of execution based on the dependency of the entire task set.
A method using topological sort will be described as a specific example of the first order code calculation method.
FIG. 8 shows an example of a sequence code assigned to each task using the topological sort. In FIG. 8, the numerical value surrounded by a circle indicates an ordinal code assigned to each task. Here, the topological sort means that each node (task in the present invention) is ordered in an acyclic directed graph so that any node (task in the present invention) comes before the node ahead of its output edge (dependency based on the present invention). It is a technique to arrange them. This method outputs a sequence of nodes as a result. As a result, the rank code calculated using the topological sort is a unique value for each task.
As an algorithm for realizing the topological sort, generally, the publicly known document “Kahn, AB (1962),“ Topological sorting of large networks ”, Communications of the ACM 5 (11): 558-562”. Known techniques such as an algorithm based on the described Kahn and an algorithm using a depth-first search can be applied.
As a specific example of the second order code calculation method, a method using breadth-first search will be described.
Based on this method, the order code generation unit 121 assigns task order codes based on the number of each task in the flow that continues from the start task through dependency. Further, when this method is used, the order code generation unit 121 assigns an order code based on a flow having the largest number of tasks for a task that passes through a plurality of flows from the start task.
FIG. 9 shows an example of a sequence code assigned to each task using the breadth-first search.
In the task graph of FIG. 6, task 1 is a start task. Therefore, as shown in FIG. 9, the order code generation unit 121 assigns an order code 0 to the task 1. In addition, task 2, task 4, and task 5 are the first task in the flow that continues from the start task through dependency. Therefore, the order code generation unit 121 assigns order code 1 to these tasks. Task 3 is the second task that follows task 2 in the flow that continues from the start task through dependency. Therefore, the order code generation unit 121 assigns the order code 2 to the task 3. The task 6 is the third task from the start task in the flow following the task 3, and is the second task from the start task in the flow following the tasks 4 and 5. At this time, when an order code is assigned based on the flow having the largest number of tasks, the order code generation unit 121 assigns an order code 3 to the task 6.
Here, an example has been described in which 0 is assigned as the order code of task 1, which is the start task, but the order code assigned to the start task may be any other value. For example, the order code generation unit 121 may assign 1 to the order code of the start task, or may assign other values.
As a specific example of the third order code calculation method, a method using execution time information will be described.
When this method is used, the task set parameter holding unit 11 holds the execution time of each task. In this example, the order code generation unit 121 assigns an order code to each task in consideration of the execution time of each task based on the breadth-first search method. Specifically, the order code generation unit 121 assigns a task order code based on the total execution time of each task in a flow that continues from the start task through dependency.
Further, when this method is used, the order code generation unit 121 assigns an order code based on the longest total execution time for a task that passes through a plurality of flows from the start task. The order code calculated in this way is an order code that reflects the difference in the effect of a task with a long execution time and a task with a short execution time.
FIG. 10 shows an example of a sequence code assigned to each task using the execution time information.
As shown in FIG. 10, the order code generation unit 121 assigns 2 as the execution time to the task 1 as the start task as the order code. Further, the order code generation unit 121 assigns to the task 2 6 as an order code, which is obtained by adding the execution time 4 of the task 2 to the order code (execution time) 2 of the task 1. Similarly, the order code generation unit 121 assigns an order code 5 to the task 4 and assigns an order code 7 to the task 5. Further, the order code generation unit 121 executes the task 6 with respect to the task 6 in the order code 8 of the task 3 having the largest order code (that is, the longest total execution time) among the tasks that depend on the task 6. 11 with time 3 added is assigned as an ordinal code.
In step S103, the order code generation unit 121 may use the order code of each task input from the outside, instead of calculating the order code of each task used to assign the order weight as described above.
In this case, in step S101, information corresponding to the order code of each task is input from the outside, and the task set parameter holding unit 11 holds it. Then, the ordinal code generation unit 121 may acquire the ordinal code of each task with reference to the task set parameter holding unit 11. For example, the task set parameter holding unit 11 may hold information related to each task in an order corresponding to topological sorting. In this case, the order code generation unit 121 may acquire the order in which the information about each task held in the task set parameter holding unit 11 is held as an order code. Or the task set parameter holding | maintenance part 11 may hold | maintain the information containing the numerical value showing an ordinal code as another parameter regarding each task.
Next, three specific examples of processing in which the weighting unit 122 assigns rank weights to each dependency relationship in step S103 will be described.
Here, the higher the order weight, the larger the order weight value. The description will be made assuming that the arrangement unit 13 searches for an arrangement that is as far away as possible (an arrangement on the same core as much as possible) as the dependency relationship has a larger numerical value of the ordering weight.
As a first specific example of assigning rank weights, a method will be described in which the rank order weights are made heavier as the dependency relationship between tasks in the task graph is closer to the rear (distant from the start task).
As described above, the closer to the rear in the task graph, the greater the influence on the execution performance of the entire task set when arranged between different cores. Therefore, the weighting unit 122 may increase the numerical value of the rank weight as the rank becomes backward (away from the start task).
As a simple example of increasing the order weight as the order is closer to the rear, consider the case where a unique order code is assigned to each task shown in FIG. 8 based on topological sort. In this case, the weighting unit 122 sets the dependency relationship with 1 / n tasks (where n represents a positive integer and “/” represents division) as the dependency source in order from the smallest sequence code. On the other hand, an order weight 1 may be assigned. Similarly, the weighting unit 122 may assign the ordering weight 2 to the dependency having the whole task of 1 / n to 2 / n as a dependency source, and may be repeated in the same manner.
As another example of increasing the order weight as the order is closer to the rear, consider the case where an order code is assigned to each task based on the breadth-first search shown in FIG. In such a case, the weighting unit 122 may assign an ordering weight based on the ordering code assigned to the dependency source task (the task executed first) of each dependency relationship. For example, the weighting unit 122 may assign the numerical value of the ordinal code assigned to the dependency source task of each dependency relationship to the dependency relationship as it is as the order weight.
The rank weights assigned in this way are shown in FIG. In FIG. 11, a numerical value surrounded by a circle represents an ordering code, and a numerical value surrounded by a double circle represents an ordering weight. In FIG. 11, an order weight 0 is assigned to each dependency relationship from task 1 to tasks 2, 4, and 5 with order code 0. Further, an order weight 1 is assigned to each dependency relationship from task 2 to task 3 with order code 1 and tasks 4 and 5 with order code 1 from task 4. In addition, the order weight 2 is given to the dependency relation of the order code 2 from the task 3 to the task 6.
As yet another example in which the rank weight is increased as the rank is closer to the rear, a case where a rank code is assigned by combining the execution time information of each task with the breadth-first search shown in FIG. Also in this case, the weighting unit 122 may assign the ordering weight based on the ordering code assigned to the dependency source task (task to be executed first) of each dependency relationship.
FIG. 12 shows the sequence weights assigned in this way.
In FIG. 12, a numerical value surrounded by a circle represents an ordering code, and a numerical value surrounded by a double circle represents an ordering weight. In FIG. 12, an order weight 2 is assigned to each dependency relationship from task 1 to task 2, 4, and 5 with order code 2. In addition, the dependency weights from task 2 to task 3 with order code 6, task 4 to task 6 with order code 5, and task 5 to task 6 with order code 7 are assigned as order weights 6, 5 and 7 respectively. Is granted. Further, an order weight 8 is given to the dependency relationship of the order code 8 from task 3 to task 6.
As described above, the weighting unit 122 increases the ordering weight as the dependency relationship between the tasks whose order is closer to the rear in the task graph.
As a second specific example of assigning rank weights, a method for increasing the rank weight as the rank order of two tasks having a dependency relationship is closer will be described.
Again, the higher the order weight, the larger the order weight value. As a simple example, the weighting unit 122 may use a value obtained by subtracting the absolute value of the difference between the order codes of two tasks having a dependency relationship from the maximum value of the order code in the entire task set as the dependency order weight. . Alternatively, the weighting unit 122 subtracts the absolute value of the difference between the order codes of two tasks having the corresponding dependency from the maximum value of the difference between the order codes of the two tasks having the dependency. It is good also as an ordering weight of a dependency.
For example, consider a case where an ordinal code is assigned to each task based on the breadth-first search shown in FIG.
In this case, as shown in FIG. 13, the weighting unit 122 gives an ordering weight to each dependency relationship. In FIG. 13, a numerical value surrounded by a circle represents an order code, a numerical value surrounded by a dotted triangle represents an absolute value of a difference between the order codes, and a numerical value surrounded by a double circle represents an order weight. . In FIG. 13, the absolute value of the difference between the order codes at both ends of the dependency relationship between tasks 4 to 6 and tasks 5 to 6 is 2. In addition, the absolute value of the difference between the order codes at both ends of the other dependency relationships is 1. The maximum value of the ordinal code is 3. Therefore, the order weight of each dependency relationship between tasks 4 to 6 and tasks 5 to 6 is 1 obtained by subtracting the absolute value 2 of the difference between the order codes at both ends from the maximum value 3. The ordering weight of other dependency relationships is 2 obtained by subtracting the absolute value 1 of the difference between the ordering codes at both ends from the maximum value 3.
In this way, the weighting unit 122 increases the ordering weight as the dependency relationship between the tasks having a similar order on the task graph.
As a specific example of the third order weighting, a method combining the above two methods is also possible.
As a simple example, the weighting unit 122 uses the maximum value of the order code of the second example with respect to the order weight value generated by the method of increasing the order weight by 1 / n of the whole of the first example. Thus, the order weight may be a value obtained by multiplying the order weights obtained by subtracting the absolute value of the difference between the order codes at both ends of each dependency.
In this way, the weighting unit 122 can generate an ordering weight that is heavier as a dependency relationship between tasks whose order is closer to the rear on the task graph and heavier as a dependency relationship between tasks whose order is closer on the task graph.
In addition to the above-described method, the weighting unit 122 assigns an order weight that reflects the degree of ease of occurrence of the dependency waiting time in accordance with the order of two tasks having the dependency relation for each dependency relation. May be generated. Further, the weighting unit 122 may generate the rank weight by combining these various methods.
In general, as each dependency relationship between tasks existing in a task set, there are mixed dependency relationships that differ in communication method, transfer data amount, and the like related to the dependency relationship. For this reason, the task set targeted by the task placement apparatus 1 according to the present embodiment may have as a parameter a weight based on these other factors relating to the dependency between tasks in advance. In this case, the weighting unit 122 sets, for each dependency relationship, a value (for example, a multiplication value) that is a combination of the weight value based on other factors given in advance and the order weight value calculated as described above. You may give with respect to each dependence.
Next, a specific example of a process in which the evaluation value calculation unit 131 calculates an evaluation value in step S104 will be described.
The evaluation value calculation unit 131 calculates an evaluation value indicating the goodness of task arrangement using the rank weight assigned to the inter-core dependency.
As a simple example, the evaluation value calculation unit 131 may calculate, as an evaluation value, a value obtained by adding or multiplying all rank weights assigned to inter-core dependence.
For example, when the addition value is used, the evaluation function F w Is represented by the following equation (1). In Expression (1), the inter-core dependence in the target task placement candidate is n. W i Represents the rank weight assigned to each inter-core dependency i (i = 0 to n−1).
Figure JPOXMLDOC01-appb-I000001
The evaluation value calculated in this way indicates that the smaller the value is, the smaller the influence of inter-core dependence on the execution performance of the entire task set is, that is, the better the task placement.
An example of the evaluation value calculated by the evaluation value calculation unit 131 based on the formula (1) will be described with reference to FIG.
FIG. 14 shows a task placement candidate. In this task arrangement candidate, tasks 2, 3 and 6 are arranged on the core 0, and tasks 1, 4 and 5 are arranged on the core 1. In addition, the inter-core dependence in this task placement candidate is the dependence from task 1 to 2, the dependence from task 4 to 6, and the dependence from task 5 to 6. Thus, the number of inter-core dependencies in this task placement candidate is three. Further, the ordering weights assigned to these inter-core dependencies are 0 for the dependency from task 1 to 2, 1 for the dependency from task 4 to 6, and 1 from the dependency from task 5 to 6, respectively. Is granted. Therefore, the evaluation value calculation unit 131 calculates 2 as the evaluation value based on the formula (1) for this task placement candidate.
Note that FIG. 14 illustrates an example of calculating the evaluation value when the number of cores is 2. However, the evaluation value calculation unit 131 can similarly calculate the evaluation value even when the number of cores is 3 or more. It is.
In step S104, the evaluation value calculation unit 131 may calculate an evaluation value based on other evaluation functions other than the expression (1).
For example, the evaluation value calculation unit 131 may calculate, as the evaluation value, a value obtained by subtracting all the order weights given to inter-core dependence from a predetermined value. In this case, the evaluation value calculated in this way represents that the influence of inter-core dependence on the execution performance of the entire task set is relatively small as the value is large, that is, the task arrangement is good.
In step S104, the evaluation value calculation unit 131 calculates an evaluation value using the start cycle, execution time, required memory size, etc. of each task in addition to the ordinal weight given to inter-core dependency. Also good. In this case, information such as the activation period, execution time, or required memory size is held in the task set parameter holding unit 11.
For example, a system is assumed in which it is appropriate that the total execution time of tasks assigned to each core is equal in each core. In this case, the evaluation value calculation unit 131 additionally calculates an evaluation value based on the difference in the total execution time of the tasks assigned to each core in addition to the evaluation value based on the rank weight assigned to the inter-core dependency. An evaluation value obtained by integrating these may be calculated.
In addition, in a task activated at regular intervals, the core utilization rate of each task can be calculated as “task execution time ÷ task activation cycle”. Here, a system is assumed in which it is appropriate that the utilization rate of the cores is equal in each core. In this case, the evaluation value calculation unit 131 additionally calculates an evaluation value based on the difference in the core utilization rate of each core in addition to the evaluation value based on the order weight given to the inter-core dependency, and integrates these. An evaluation value may be calculated.
A system is assumed in which the required memory size is appropriate for each core. In this case, in addition to the evaluation value based on the rank weight assigned to the inter-core dependency, the evaluation value calculation unit 131 additionally calculates an evaluation value based on the difference in the required memory size of each core, and integrates them. An evaluation value may be calculated.
As described above, when the task set parameter holding unit 11 holds other task set parameters in addition to the dependency relationship between tasks, the evaluation value calculation unit 131 adds these other task set parameters incidentally. The evaluation value can be calculated by using this. In this case, the placement unit 13 can perform task placement in consideration of factors other than these inter-core dependencies.
As described above, various methods can be applied to the evaluation value calculation method using the rank weight assigned to the inter-core dependency.
Next, a specific example of the search end condition used by the optimum arrangement search unit 132 in step S105 will be described.
As described above, the optimal placement search unit 132 generates task placement candidates, and using the evaluation values calculated for the generated task placement candidates, the generated task placement candidates and their evaluation values are used as search end conditions. It is determined whether or not it is satisfied.
If the task placement is better as the evaluation value is smaller, the optimum placement search unit 132 searches for task placement candidates that minimize the evaluation value.
At this time, the task placement search termination condition differs based on the optimization algorithm employed by the optimum placement search unit 132. For example, when a simple full search is adopted as an optimization algorithm, the generation of all task placement candidates that can be generated as the search end condition ends. In this case, the optimum arrangement search unit 132 outputs the task arrangement candidate for which the minimum evaluation value is calculated among all the task arrangement candidates as the optimization result.
Further, for example, when another general optimization algorithm is adopted, the search end condition is determined that the evaluation value based on the algorithm is not further reduced, and generation of task placement candidates is repeated a predetermined number of times. It may be determined that the evaluation value does not become small.
As described above in detail, the task set parameter holding unit 11, the order weight assigning unit 12, the evaluation value calculating unit 131, and the optimum arrangement searching unit 132 can employ various data structures and various methods. In the present embodiment, the data structures and methods employed for each of these functional blocks can be employed in various combinations. Further, this embodiment can also employ a combination of a plurality of methods in each functional block.
Next, effects of the first exemplary embodiment of the present invention will be described.
The task placement apparatus according to the first exemplary embodiment of the present invention can perform task placement with higher performance by further reducing the influence of non-uniform inter-core dependence based on the rank.
The reason is that the ordering weight assigning unit assigns ordering weights to each dependency existing between tasks based on the order in which each task can be executed in the execution flow of the entire task set. It is. When the placement unit places the task in one or more cores according to the dependency relationship, the evaluation value calculated based on the rank weight assigned to the dependency relationship between the tasks placed between different cores is This is because tasks are arranged so as to improve. Based on this, the task placement device as the present embodiment is for a task set in which an inter-core dependency waiting time occurs even if the number of inter-core dependencies based on the device described in Patent Document 1 is minimized. It is possible to generate a task arrangement that further reduces the dependency waiting time. As a result, the task placement apparatus according to the first exemplary embodiment of the present invention can output a task placement that can fully exhibit the multi-core performance. That is, the task placement apparatus according to the present embodiment can realize task placement reflecting the magnitude of the influence on the execution performance depending on the order of the cores in the multi-core system.
In addition, the task placement device as the first exemplary embodiment of the present invention can perform task placement with higher performance by further reducing the dependency waiting time at a position near the end of execution of the task set.
The reason is that the order weight assigning unit increases the order weights as the dependency relationship between the tasks whose order in the task graph is closer to the rear. Based on this operation, the placement unit calculates an evaluation value indicating that the placement is worse as the inter-core dependency between the tasks whose ranks are closer to the rear is larger. Then, the placement unit searches for a task placement that improves the evaluation value. Therefore, in the task placement searched in this way, a task having a dependency relationship near the end of execution of the entire task set is less likely to be placed on a different core. Therefore, the task placement device as the first exemplary embodiment of the present invention can cope with the critical dependency problem that appears behind the rank on the task graph.
In addition, the task placement device as the first exemplary embodiment of the present invention can reduce task dependency waiting time between tasks having similar execution orders in a task set, and perform task placement with higher performance.
The reason for this is that the ordering weight assigning unit increases the ordering weight as the dependency between tasks having a small difference in the ordering code in the task graph. Based on this operation, the placement unit calculates an evaluation value indicating that the placement is worse as the inter-core dependency between tasks having similar ranks increases. Then, the placement unit searches for a task placement that improves the evaluation value. Therefore, in the task placement searched in this way, the tasks having the dependency in the task set that are close to each other are less likely to be placed in different cores. Therefore, the task placement device as the first exemplary embodiment of the present invention can cope with the problem of dependency between tasks having similar ranks on the task graph.
(Second Embodiment)
Next, a second embodiment of the present invention will be described in detail with reference to the drawings. In each drawing referred to in the description of the present embodiment, the same reference numerals are given to the same configuration and steps that operate in the same manner as in the first embodiment of the present invention, and the details in the present embodiment will be described. The detailed explanation is omitted.
First, FIG. 15 shows a block of an example of the function of the task placement device 2 as the second exemplary embodiment of the present invention. 15, the task placement device 2 further includes an order code holding unit 24 and an order weight holding unit 25 in addition to the same configuration as the task placement device 1 as the first embodiment of the present invention.
Here, the task placement device 2 may be configured using a computer device including the configuration shown in FIG. 1, similarly to the task placement device 1 as the first exemplary embodiment of the present invention. In that case, the order code holding unit 24 and the order weight holding unit 25 are configured using the storage device 1004. Note that the hardware configuration constituting each of these functional blocks is not limited to the above-described configuration.
The rank code holding unit 24 holds the rank code calculated by the rank weight assigning unit 12. An example of information held by the ordinal code holding unit 24 is shown in FIGS. 16A and 16B. For example, the ordinal code holding unit 24 may hold an ordinal code for each task as shown in FIG. 16A. Alternatively, as shown in FIG. 16B, the order code holding unit 24 may hold information for identifying a task to which the order code is assigned for each order code value. For example, FIG. 16B shows that the order code 1 is assigned to tasks 2, 4 and 5.
Note that the ordinal code holding unit 24 may be included in the task set parameter holding unit 11.
For example, when a unique order code is assigned to each task as in the case where an order code based on topological sort is generated using the order code generation unit 121, the order code storage unit 24 includes the task set parameter storage unit 11. The order code may be held using an expression obtained by rearranging the information on each task held in the order in the order of the order. Based on this operation, the rank code holding unit 24 can hold the calculated rank code without using an area of the storage device for holding the rank code.
The order weight holding unit 25 uses the order weight generation unit 12 to hold the order weight assigned to each dependency relationship.
The operation of the task placement apparatus 2 configured as described above will be described with reference to FIG.
First, the task set parameter holding unit 11 holds task set parameters input from the outside (step S101).
Next, the order code generation unit 121 refers to the task set parameters held in the task set parameter holding unit 11 and calculates an order code for each task (step S201). For example, the order code generation unit 121 can apply the technique described in detail in the first embodiment of the present invention as a technique for calculating the order code.
Next, the rank code holding unit 24 holds the calculated rank code (step S202).
Next, the weighting unit 122 assigns an ordering weight to each dependency relationship based on the ordering code held in the ordering code holding unit 24 (step S203). For example, the weighting unit 122 can apply the method described in detail in the first embodiment of the present invention as a weighting method.
Next, the rank weight holding unit 25 holds the rank weight generated using the weighting unit 122 (step S204).
Next, the optimum arrangement search unit 132 generates task arrangement candidates (step S102).
Next, the evaluation value calculation unit 131 calculates an evaluation value, which is an evaluation value indicating the goodness of task placement, for the generated task placement candidate using the rank weight held in the rank weight holding unit 25 (step S104). For example, the evaluation value calculation unit 131 can apply the method described in detail in the first embodiment of the present invention as the evaluation value calculation method.
Next, the optimum placement search unit 132 determines whether the task placement candidate and the evaluation value satisfy a task placement search termination condition (step S105). For example, as the search end condition, the condition described in detail in the first embodiment of the present invention is applicable.
If the task placement search termination condition is not satisfied, the task placement device 2 repeats the processing from step S102 again.
On the other hand, when the task placement search termination condition is satisfied, the optimum placement search unit 132 outputs a task placement optimization result (step S106). Then, the task placement device 2 ends the operation.
Note that in step S203, the weighting unit 122 may assign rank weights to inter-core dependence in task placement candidates. In this case, the task placement device 2 may execute steps S203 to S204 after generating task placement candidates in step S102.
Above, description of operation | movement of the 2nd Embodiment of this invention is complete | finished.
Next, the effect of the second exemplary embodiment of the present invention will be described.
The task placement apparatus as the second exemplary embodiment of the present invention, when placing a task for a multi-core system, performs a process of calculating an ordering weight reflecting the ease of occurrence of dependency waiting time depending on the core. Increase efficiency.
The reason is that the rank code holding unit holds the rank code of each task used for calculating the rank weight. Here, when a certain task has a plurality of dependency relationships, the order weight assigning unit refers to the order code of the task a plurality of times in order to calculate the order weight. In such a case, the task placement device as the second exemplary embodiment of the present invention can further reduce the processing time of the rank weight assigning unit based on the hold of the rank code holding unit of the rank code once calculated. Because.
In addition, the task placement apparatus as the second exemplary embodiment of the present invention can further improve the efficiency of the process of searching for a better performance task placement by reducing the influence of non-uniform inter-core dependence based on the order. .
The reason is that the rank weight holding unit holds the rank weight generated by using the rank weight generation unit. Here, the rank weights are invariable once calculated and often need not be recalculated. Therefore, the order weight need not be recalculated every time the evaluation value is calculated for different task placement candidates. Therefore, the task placement device according to the second exemplary embodiment of the present invention can shorten the task placement search time based on holding the rank weights of the rank weight holding unit.
In each of the embodiments of the present invention described above, the order code is mainly described as having a smaller value as it is closer to the start task on the task graph. However, the order code in the present invention is, for example, on the task graph. The closer to the start task, the larger the value may be.
Further, in each of the embodiments of the present invention described above, the order weight is mainly described as having a value that is large enough to generate the dependency waiting time. However, the order weight in the present invention generates, for example, the dependency waiting time. You may have a small value that is easy to do.
In each of the embodiments of the present invention described above, the evaluation value is mainly described as having a smaller value as the task arrangement is better. However, the evaluation value in the present invention has a larger value as the task arrangement is better. Also good. In this case, the placement unit may search for a task placement candidate that increases the evaluation value.
In each of the embodiments of the present invention described above, the operation of the task placement device described with reference to each flowchart is stored in a storage device (storage medium) of a computer as a program of the present invention. The CPU may read and execute. In such a case, the present invention is configured using the code or storage medium of the program.
Moreover, each embodiment mentioned above can be implemented in combination as appropriate.
The present invention is not limited to the above-described embodiments, and can be implemented in various modes.
Moreover, although a part or all of said embodiment can be described also as the following additional remarks, it is not restricted to the following.
(Appendix 1)
A task set parameter holding means for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set. An order weight assigning means for assigning an order weight that is a coefficient representing;
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement means for placing tasks based on the calculated evaluation value;
Including a task placement device.
(Appendix 2)
The rank weight assigning means includes
The closer the order of each task having the dependency is to the end in the flow of execution of the entire task set, the heavier the order weight given to the dependency
The task placement device according to Supplementary Note 1, wherein:
(Appendix 3)
The rank weight assigning means includes
The closer the order of the two tasks having the dependency relationship is, the heavier the order weight given to the dependency relationship is.
The task placement device according to Supplementary Note 1 or Supplementary Note 2, wherein:
(Appendix 4)
The rank weight assigning means includes
Based on the task set parameter held in the task set parameter holding means, an order code representing the order to be used for giving the order weight is calculated.
The task placement device according to any one of supplementary notes 1 to 3, characterized in that:
(Appendix 5)
Further comprising an order code holding means for holding an order code calculated using the order weight assigning means;
The rank weight assigning means includes
Using the reference of the order code held in the order code holding means, the order weight is given to each dependency.
The task placement device according to appendix 4, wherein
(Appendix 6)
And further comprising an order weight holding means for holding the order weight given using the order weight giving means,
The arrangement means includes
The evaluation value is calculated using the order weight held in the order weight giving means.
The task placement device according to any one of Supplementary Note 1 to Supplementary Note 5, wherein
(Appendix 7)
For a task set that is a set of tasks to be arranged, a task set parameter including information indicating dependency between the tasks is retained,
Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set. Giving rank weights that are coefficients to represent,
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And task placement based on the calculated evaluation value,
Task placement method.
(Appendix 8)
When assigning the order weights to the dependency relationships, the order weights of the tasks having the dependency relationships are closer to the end in the execution flow of the entire task set, and the order weights to be assigned to the dependency relationships are heavier. Do
The task placement method according to appendix 7, characterized in that:
(Appendix 9)
When assigning the order weights to each dependency relationship, the closer the order of the two tasks having the dependency relationship is, the heavier the order weight given to the dependency relationship is.
9. The task placement method according to appendix 7 or appendix 8, characterized by the above.
(Appendix 10)
A task set parameter holding process for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set. An order weighting process for assigning an order weight that is a coefficient to be represented;
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement processing for task placement based on the calculated evaluation value;
A program that causes a computer to execute.
(Appendix 11)
In the order weight assigning process, the order weights assigned to the dependency relations are made heavier as the order of the tasks having the dependency relations approaches the end in the execution flow of the entire task set.
The program according to appendix 10, characterized by:
(Appendix 12)
In the order weighting process, the closer the order of the two tasks having the dependency relation is, the heavier the order weight given to the dependency relation is.
The computer program according to appendix 10 or appendix 11, characterized in that
While the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
This application claims the priority on the basis of Japanese application Japanese Patent Application No. 2011-231283 for which it applied on October 21, 2011, and takes in those the indications of all here.
 1、2 タスク配置装置
 11 タスクセットパラメータ保持部
 12 序列重み付与部
 13 配置部
 24 序列符号保持部
 25 序列重み保持部
 121 序列符号生成部
 122 重み付け部
 131 評価値算出部
 132 最適配置探索部
 1001 CPU
 1002 RAM
 1003 ROM
 1004 記憶装置
DESCRIPTION OF SYMBOLS 1, 2 Task arrangement | positioning apparatus 11 Task set parameter holding part 12 Ordering weight provision part 13 Arrangement part 24 Order code holding part 25 Ordering weight holding part 121 Order code generation part 122 Weighting part 131 Evaluation value calculation part 132 Optimal arrangement search part 1001 CPU
1002 RAM
1003 ROM
1004 Storage device

Claims (12)

  1.  配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持手段と、
     前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与手段と、
     前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置手段と、
     を含むタスク配置装置。
    A task set parameter holding means for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
    Based on the task set parameters and an order that is a position where each task can be executed in the execution flow of the entire task set, a coefficient representing a weight based on the order for each dependency relationship between the tasks An order weighting means for assigning a certain order weight;
    When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement means for placing tasks based on the calculated evaluation value;
    Including a task placement device.
  2.  前記序列重み付与手段は、
     前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
     ことを特徴とする請求項1に記載のタスク配置装置。
    The rank weight assigning means includes
    2. The task arrangement according to claim 1, wherein as the order of each task having the dependency relationship is closer to the end in the flow of execution of the entire task set, the order weight given to the dependency relationship is increased. apparatus.
  3.  前記序列重み付与手段は、
     前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
     ことを特徴とする請求項1または請求項2に記載のタスク配置装置。
    The rank weight assigning means includes
    The task placement device according to claim 1, wherein the rank weight assigned to the dependency relation is increased as the rank order of the two tasks having the dependency relation is closer.
  4.  前記序列重み付与手段は、
     前記タスクセットパラメータ保持手段に保持された前記タスクセットパラメータに基づいて、前記序列重みの付与に用いるための前記序列を表す序列符号を算出する
     ことを特徴とする請求項1乃至請求項3のいずれか1項に記載のタスク配置装置。
    The rank weight assigning means includes
    4. The rank code representing the rank to be used for assigning the rank weight is calculated based on the task set parameter held in the task set parameter holding means. The task placement device according to claim 1.
  5.  前記序列重み付与手段を用いて算出される序列符号を保持する序列符号保持手段をさらに含み、
     前記序列重み付与手段は、
     前記序列符号保持手段に保持された序列符号を基に、前記各依存関係に前記序列重みを付与する
     ことを特徴とする請求項4に記載のタスク配置装置。
    Further comprising an order code holding means for holding an order code calculated using the order weight assigning means;
    The rank weight assigning means includes
    The task placement apparatus according to claim 4, wherein the order weight is assigned to each dependency relationship based on the order code held in the order code holding unit.
  6.  前記序列重み付与手段を用いて付与された前記序列重みを保持する序列重み保持手段をさらに含み、
     前記配置手段は、
     前記序列重み付与手段に保持された序列重みを用いて前記評価値を算出する
     ことを特徴とする請求項1乃至請求項5のいずれか1項に記載のタスク配置装置。
    And further comprising an order weight holding means for holding the order weight given using the order weight giving means,
    The arrangement means includes
    The task placement apparatus according to any one of claims 1 to 5, wherein the evaluation value is calculated using a rank weight held in the rank weight assigning unit.
  7.  配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持し、
     前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与し、
     前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する、
     タスク配置方法。
    For a task set that is a set of tasks to be arranged, a task set parameter including information indicating dependency between the tasks is retained,
    Based on the task set parameters and an order that is a position where each task can be executed in the execution flow of the entire task set, a coefficient representing a weight based on the order for each dependency relationship between the tasks A certain ordering weight,
    When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And task placement based on the calculated evaluation value,
    Task placement method.
  8.  前記各依存関係に前記序列重みを付与する際に、前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
     ことを特徴とする請求項7に記載のタスク配置方法。
    When assigning the order weights to the dependency relationships, the order weights of the tasks having the dependency relationships are closer to the end in the execution flow of the entire task set, and the order weights to be assigned to the dependency relationships are heavier. The task placement method according to claim 7, wherein:
  9.  前記各依存関係に前記序列重みを付与する際に、前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
     ことを特徴とする請求項7または請求項8に記載のタスク配置方法。
    8. When assigning the order weight to each dependency, the order weight given to the dependency is increased as the order of two tasks having the dependency is closer. Item 9. The task placement method according to Item 8.
  10.  配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持処理と、
     前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与処理と、
     前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置処理と、
     をコンピュータに実行させるプログラム。
    A task set parameter holding process for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
    Based on the task set parameters and an order that is a position where each task can be executed in the execution flow of the entire task set, a coefficient representing a weight based on the order for each dependency relationship between the tasks An order weighting process for assigning a certain order weight;
    When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement processing for task placement based on the calculated evaluation value;
    A program that causes a computer to execute.
  11.  前記序列重み付与処理において、前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
     ことを特徴とする請求項10に記載のプログラム。
    In the order weight assigning process, the order weight of each task having the dependency relationship is made heavier as the order weight given to the dependency relationship becomes closer to the end in the flow of execution of the entire task set. Item 13. The program according to item 10.
  12.  前記序列重み付与処理において、前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
     ことを特徴とする請求項10または請求項11に記載のプログラム。
    12. The program according to claim 10, wherein, in the rank weight assigning process, the rank weight assigned to the dependency relation is increased as the rank order of the two tasks having the dependency relation is closer.
PCT/JP2012/077175 2011-10-21 2012-10-16 Task allocation device and task allocation method WO2013058396A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013539721A JP5983623B2 (en) 2011-10-21 2012-10-16 Task placement apparatus and task placement method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011231283 2011-10-21
JP2011-231283 2011-10-21

Publications (1)

Publication Number Publication Date
WO2013058396A1 true WO2013058396A1 (en) 2013-04-25

Family

ID=48141039

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/077175 WO2013058396A1 (en) 2011-10-21 2012-10-16 Task allocation device and task allocation method

Country Status (2)

Country Link
JP (1) JP5983623B2 (en)
WO (1) WO2013058396A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491931A (en) * 2017-07-12 2017-12-19 浙江大学 A kind of design objective data resolving method that meter is founded based on crowd
CN113534750A (en) * 2020-04-15 2021-10-22 北京旷视机器人技术有限公司 Job scheduling method, device, system, equipment and medium under intensive storage

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102452205B1 (en) * 2017-11-20 2022-10-06 삼성전자주식회사 Multi core control system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007264734A (en) * 2006-03-27 2007-10-11 Fujitsu Ltd Tuning support device, tuning support program, computer-readable recording medium recorded with tuning support program, and tuning support method
WO2010055719A1 (en) * 2008-11-14 2010-05-20 日本電気株式会社 Schedule deciding apparatus, parallel execution apparatus, schedule deciding method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007264734A (en) * 2006-03-27 2007-10-11 Fujitsu Ltd Tuning support device, tuning support program, computer-readable recording medium recorded with tuning support program, and tuning support method
WO2010055719A1 (en) * 2008-11-14 2010-05-20 日本電気株式会社 Schedule deciding apparatus, parallel execution apparatus, schedule deciding method, and program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NORIAKI SUZUKI ET AL.: "Designing Evaluation Functions of Multi Core Task Mapping for Hard Real-Time Systems", IEICE TECHNICAL REPORT, vol. 110, no. 473, 11 March 2011 (2011-03-11), pages 93 - 98 *
NORIAKI SUZUKI ET AL.: "Multi Core Task Mapping Method by Weight Control for Dependencies between Descendent Tasks", IEICE TECHNICAL REPORT, vol. 111, no. 461, 24 February 2012 (2012-02-24), pages 97 - 102 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491931A (en) * 2017-07-12 2017-12-19 浙江大学 A kind of design objective data resolving method that meter is founded based on crowd
CN113534750A (en) * 2020-04-15 2021-10-22 北京旷视机器人技术有限公司 Job scheduling method, device, system, equipment and medium under intensive storage

Also Published As

Publication number Publication date
JPWO2013058396A1 (en) 2015-04-02
JP5983623B2 (en) 2016-09-06

Similar Documents

Publication Publication Date Title
Chowdhury et al. Implementation and performance analysis of various VM placement strategies in CloudSim
Viswanathan et al. {CLARINET}:{WAN-Aware} Optimization for Analytics Queries
JP5971334B2 (en) Task allocation device, task allocation method, and computer program
Tang et al. A self-adaptive scheduling algorithm for reduce start time
Devipriya et al. Improved max-min heuristic model for task scheduling in cloud
Bicer et al. Time and cost sensitive data-intensive computing on hybrid clouds
KR101666395B1 (en) Priority based RTOS task scheduling method in multicore environment
Bicer et al. A framework for data-intensive computing with cloud bursting
Bittencourt et al. A performance‐oriented adaptive scheduler for dependent tasks on grids
Singh et al. A hybrid strategy for mapping multiple throughput-constrained applications on MPSoCs
JP5786863B2 (en) Task allocation optimization system, task allocation optimization method, and task allocation optimization program
Bleuse et al. Scheduling independent tasks on multi‐cores with GPU accelerators
Choudhury et al. Online scheduling of dynamic task graphs with communication and contention for multiprocessors
Wu et al. Optimizing the performance of big data workflows in multi-cloud environments under budget constraint
CN103297499A (en) Scheduling method and system based on cloud platform
EP3908920B1 (en) Optimizing hardware fifo instructions
Gandomi et al. HybSMRP: a hybrid scheduling algorithm in Hadoop MapReduce framework
Li et al. An effective scheduling strategy based on hypergraph partition in geographically distributed datacenters
CN104199739A (en) Speculation type Hadoop scheduling method based on load balancing
KR20200091789A (en) Platform for concurrent execution of gpu operations
US9471387B2 (en) Scheduling in job execution
Lawrance et al. Efficient QoS based resource scheduling using PAPRIKA method for cloud computing
JP5983623B2 (en) Task placement apparatus and task placement method
Khan et al. An optimized hybrid algorithm in term of energy and performance for mapping real time workloads on 2d based on-chip networks
CN105740249B (en) Processing method and system in parallel scheduling process of big data job

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12841791

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013539721

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12841791

Country of ref document: EP

Kind code of ref document: A1