WO2011102219A1 - リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラム - Google Patents

リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラム Download PDF

Info

Publication number
WO2011102219A1
WO2011102219A1 PCT/JP2011/052084 JP2011052084W WO2011102219A1 WO 2011102219 A1 WO2011102219 A1 WO 2011102219A1 JP 2011052084 W JP2011052084 W JP 2011052084W WO 2011102219 A1 WO2011102219 A1 WO 2011102219A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
unit
evaluation function
tasks
core
Prior art date
Application number
PCT/JP2011/052084
Other languages
English (en)
French (fr)
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 JP2012500546A priority Critical patent/JPWO2011102219A1/ja
Priority to US13/579,865 priority patent/US8887165B2/en
Publication of WO2011102219A1 publication Critical patent/WO2011102219A1/ja

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/483Multiproc

Definitions

  • the present invention relates to task placement, and more particularly to task placement for multi-core for real-time systems.
  • Patent Document 1 provides a scheduling possibility determination method in the case where a plurality of processors are required simultaneously for execution of one task in a real-time system equipped with a multi-core.
  • FIG. 13 is a diagram corresponding to FIG.
  • the scheduling possibility determination unit 300 shown in FIG. 13 determines whether scheduling is possible by the following determination method.
  • the scheduling possibility determination unit 300 shown in FIG. 13 determines whether scheduling is possible by the following determination method.
  • Lk a value at which the actual average load during a certain period is always greater than this if task k causes a deadline miss
  • Patent Document 1 can determine the scheduling possibility when a plurality of processors are simultaneously required for executing one task.
  • the first problem is that an arrangement with good performance cannot be searched from among a plurality of task arrangements that can be scheduled.
  • the second problem is that in the real-time system, the margin from the deadline, which is an important index from the viewpoint of system stability, cannot be increased.
  • a first object of the present invention is to provide a multi-core task placement optimization system for a real-time system, a method thereof, and a program thereof that can search for a placement with good performance from a plurality of task placements that can be scheduled.
  • the present invention also provides a multi-core task placement optimization system for a real-time system, which is an important index from the viewpoint of system stability in a real-time system, and which can increase the margin from a deadline, its method and its
  • the second object is to provide a program.
  • the response time of each of a plurality of tasks that are core allocation determination targets is calculated, and the calculated response time is accumulated.
  • a cumulative response time calculation unit that outputs a value as an evaluation function value that is an index representing the goodness of task placement, and a search unit that searches for a task placement for which a good evaluation function value is calculated based on the evaluation function value
  • a high evaluation candidate holding unit that holds a candidate having a good evaluation function value among a plurality of task arrangement candidates searched by the search unit. Is done.
  • a response time of each of a plurality of tasks that are core placement determination targets is calculated, and the calculated response time is accumulated.
  • a cumulative response time calculation step for outputting a value as an evaluation function value that is an index representing the goodness of task placement, and a search step for searching for a task placement for which a good evaluation function value is calculated based on the evaluation function value
  • a high evaluation candidate holding step for holding a candidate having a good evaluation function value among a plurality of task arrangement candidates searched by the search step. Is done.
  • a response time of each of a plurality of tasks that are core placement determination targets is calculated.
  • a cumulative response time calculation unit that outputs the calculated cumulative value of the response time as an evaluation function value that is an index representing the goodness of task placement, and a good evaluation function value is calculated based on the evaluation function value.
  • a computer as a system comprising: a search unit that searches for task arrangements; and a high-evaluation candidate holding unit that holds candidates with good evaluation function values among a plurality of task arrangement candidates searched by the search unit
  • a task placement optimization program characterized by functioning is provided.
  • the reason is that a task arrangement with good performance can be obtained by calculating an evaluation function value, which is an index representing the good performance of the task arrangement candidate, and performing optimization using the evaluation function value.
  • the reason for this is that the cumulative value of each response time (the time from when the task activation is instructed until the execution of the task is completed) of each of the plurality of core arrangement determination target tasks is calculated. This is because, by performing optimization that minimizes the cumulative value of the response times of the tasks, a task arrangement in which the response time of each task is as short as possible can be obtained.
  • Task Placement Automatic Optimization System 110 Search Unit 111 Branching Unit 112 Limiting Unit 112-1 Fixed Fixed Task Accumulated Response Time Calculation Instruction Unit 112-2 Unfixed Task Shortest Response Time Accumulation Unit 112-3 Unfixed Task Execution Time Total Unit 112-4 Unfixed task execution time accumulation unit 113 Limitation suppression unit 120 Cumulative response unit calculation unit 120-1 Response time calculation unit 120-2 Response time accumulation unit 130 High evaluation candidate holding unit 140 Approximate solution search unit 200 Computer 210 Processor 220 Auxiliary storage device 221 Task automatic placement optimization program 222-1, 222-2, 222-3 Task 223 Task optimum placement definition file 224 Task set definition file 230 Main storage device 300 Schedulability determination unit
  • FIG. 1 is a block diagram showing the overall configuration of an automatic optimization system 100 according to an embodiment of the present invention.
  • the automatic optimization system 100 includes a search unit 110, an accumulated response time calculation unit 120, and a high evaluation candidate holding unit 130.
  • the search unit 110 further includes a branching unit 111 and a limiting unit 112.
  • the branching unit 111 is a part related to child problem generation.
  • the limiting unit 112 is a part related to unnecessary candidate elimination.
  • the accumulated response time calculation unit 120 further includes a response time calculation unit 120-1 and a response time accumulation unit 120-2.
  • the automatic optimization system 100 described above is realized by reading a program (software) by a hardware resource such as a processor.
  • FIG. 3 and FIG. 4 show a computer 200 as a specific implementation example of the data processing apparatus 100.
  • the computer 200 includes a processor 210, an auxiliary storage device 220, and a main storage device 230.
  • the processor 210 is an arithmetic processing unit.
  • the auxiliary storage device 220 is a storage device represented by HDD (Hard disk drive) and SSD (solid disk drive), and stores various data and programs.
  • HDD Hard disk drive
  • SSD solid disk drive
  • the main storage device 230 is a storage device represented by RAM (Random Access Memory), and is a storage unit used when the processor 210 performs arithmetic processing.
  • the automatic task placement optimization program 221 that is read from the auxiliary storage device 220 and executed by the processor 210 executes information on the tasks 222-1 to be optimized, the task 222-2, and the task 222-3 from the auxiliary storage device 220.
  • the task placement is optimized while reading and using the storage device 230.
  • the task optimum arrangement obtained as a result of the optimization is output as a task optimum arrangement definition file 223 on the auxiliary storage device 220.
  • the auxiliary storage device 220 has a task set definition file 224 instead of the task 222-1, the task 222-2, and the task 222-3.
  • the automatic task placement optimization program 221 read from the auxiliary storage device 220 and executed by the processor 210 executes the task set definition file 224 in which information on a plurality of optimization target tasks is defined from the auxiliary storage device 220.
  • the task placement is optimized while reading and using the storage device 230.
  • the task optimum arrangement obtained as a result of the optimization is output as a task optimum arrangement definition file 223 on the auxiliary storage device 220.
  • the search unit 110 searches for a core arrangement of a plurality of tasks and generates task arrangement candidates.
  • the search uses a branch and bound method that includes a branch that generates a child problem and a limiting operation that eliminates unnecessary candidates.
  • the cumulative response time calculation unit 120 receives the task placement candidates, calculates the response times of each of the plurality of core placement determination target tasks, and calculates the cumulative value as an evaluation function value that is an index representing the good task placement. ,Output.
  • the high evaluation candidate holding unit 130 holds a candidate having a good evaluation function value among task placement candidates.
  • the branching unit 111 and the limiting unit 112 in the search unit 110 will be described.
  • the branching unit 111 generates a child problem (represented by a circle in FIG. 5) by fixing it to a core from a task having a high priority (from the top to the bottom in FIG. 5). Then, exhaustively generate task placement candidates to be searched. At this time, the generation of the child problem is repeated and the arrangement of all the tasks is completed as the task arrangement candidate (the lowermost stage in FIG. 5).
  • FIG. 5 is described assuming a two-core system.
  • the present method for comprehensively generating task placement candidates is not limited to two cores, and can be similarly extended to a system having an arbitrary number of cores of three or more cores.
  • the limit value of the evaluation function that can be taken by the child problem (a value that can be determined as not better than that, and when an evaluation function that represents a good arrangement with a small value is used, a lower bound value and a good arrangement value with a large value. If the evaluation function value shown is used, it will be the upper bound value), and the evaluation function value calculated using the task that has already been fixed to the core and the task that has already fixed the core placement will have the highest priority among the cores. The calculation is performed using at least one of a response time of a task with a low degree and an execution time of a task whose core arrangement is undetermined.
  • the response time calculation unit 120-1 calculates, for each of a plurality of tasks, the response time of the task (the time from when the task activation is instructed until the execution of the task is completed).
  • the response time accumulating unit 120-2 adds up the response times of the tasks calculated by the response time calculating unit 120-1, and calculates the accumulated response time.
  • step S11 the search unit 110 determines whether or not the currently handled child problem is a task candidate.
  • the task candidate corresponds to a child problem in which all tasks are fixed. If it is not a task candidate (No in step S11), the process proceeds to step S12. If it is a task candidate (Yes in step S11), the process proceeds to step S16.
  • step S12 the limiting unit 112 in the search unit 110 calculates a limiting formula, and calculates a limit value of an evaluation function value that can be taken by the child problem (a value that can be determined if it does not improve any more).
  • step S13 the limiting unit 112 compares the limit value of the evaluation function value with the evaluation function value calculated by the cumulative response time calculation unit 120 for the task placement candidates held in the high evaluation candidate holding unit 130. . If the evaluation function value may be updated as a result of the comparison (Yes in step S13), the process proceeds to step S14. If there is no possibility (No in step S13), the process is limited, and the process ends without generating any further child problems.
  • step S13 If there is a possibility that the evaluation function value is updated in step S13 (Yes in step S13), the branching unit 111 generates a child problem in which the core arrangement of the task to be fixed next is set to 0 in step S14.
  • the generated child problem is processed based on the flowchart of FIG. 6 in the same manner as the operation described here.
  • step S15 the branching unit 111 generates a child problem in which the core arrangement of the task to be fixed next is 1.
  • the generated child problem is similarly processed based on the flowchart of FIG.
  • step S11 if the child problem currently handled in step S11 is a task candidate (Yes in step S11), the search unit 110 passes the task placement candidate to the cumulative response time generation unit 120 in step S16, thereby task placement candidate.
  • the evaluation function value of is calculated.
  • step S ⁇ b> 17 the search unit 110 compares the evaluation function value calculated in step S ⁇ b> 16 with the evaluation function value of the task placement candidate held by the high evaluation candidate holding unit 130.
  • it is desirable that the evaluation function value of the task placement candidate held by the high evaluation candidate holding unit 130 is not calculated every time, but is stored once calculated.
  • the search unit 110 sets the current task placement candidate as a high evaluation candidate in step S18. Register in the holding unit 130 and end the process. If the evaluation function value of the current task placement candidate is not good (No in step S17), the process ends without performing anything.
  • the cumulative response time calculation unit 120 calculates an evaluation function value, which is an index representing the good performance of the task placement candidate, and performs optimization using the evaluation function value, thereby obtaining the performance.
  • an evaluation function value which is an index representing the good performance of the task placement candidate
  • the cumulative response time calculation unit 120 calculates the cumulative value of the response times (the time from when the task activation is instructed until the task execution is completed) of each of the plurality of core arrangement determination target tasks, By performing optimization that minimizes the cumulative response time of each of the plurality of tasks to be determined for core placement, it is possible to obtain a task placement in which the response time of each task is as short as possible. Therefore, it is possible to increase the margin from the deadline, which is an important index from the viewpoint of system stability in a real-time system. Further, when searching for task placement candidates, the limiting unit is limited so as not to search for unnecessary task placement candidates. For this reason, the time required for the optimization can be reduced.
  • the basic configuration and the operation of the first embodiment are the same as the configuration and operation of the task placement automation system 100 shown as the embodiment in FIGS. 1, 2, and 6, but refer to FIG. 7 in the first embodiment.
  • a specific configuration example of the limiting unit 112 will be described.
  • a calculation method in the response time calculation unit 120-1 will also be described.
  • the limiting unit 112 includes a fixed task accumulated response time calculation instruction unit 112-1, an unfixed task shortest response time integration unit 112-2, and an unfixed task execution time total unit 112-3. .
  • the fixed task accumulated response time calculation instruction unit 112-1, the unfixed task shortest response time integration unit 112-2, and the unfixed task execution time total unit 112-3 are the limit values of the evaluation function among the functions of the limit unit 112. I am in charge of the action of seeking. There are two cases: a case where a higher evaluation function value is better arranged and a case where a smaller evaluation function value is better arrangement. A case where a smaller evaluation function value is a better arrangement will be described as an example. Further, in the following description, a fixed task refers to a task whose core arrangement has already been fixed in a child problem. An unfixed task refers to a task that is not yet fixed in the child problem and is fixed in the subsequent processing.
  • the fixed limit cumulative response time calculation instructing unit 112-1 performs calculation of the definite limit value.
  • the increase limit value is calculated by the unfixed task shortest response time integrating unit 112-2 and the unfixed task execution time totaling unit 112-3.
  • the fixed task cumulative response time calculation instruction unit 112-1 gives an instruction to calculate the cumulative response time by passing the core arrangement of the fixed task to the cumulative response time calculation unit 120.
  • the accumulated response time calculation unit 120 calculates the accumulated response time based on the core arrangement of the already fixed task, and passes it to the limiting unit 112 to calculate the definite limit value.
  • the unfixed task shortest response time accumulating unit 112-2 calculates the increase limit value using the following.
  • the unfixed task has a lower priority than the fixed task.
  • the response time of the unfixed task is the shortest response time compared to the response time of the fixed task with the lowest priority in each core (hereinafter referred to as “unfixed task shortest response time”). Longer than). For this reason, the evaluation function value that is increased by fixing all remaining tasks is larger than the unfixed task shortest response time multiplied by the number of remaining tasks.
  • the unfixed task shortest response time accumulating unit 112-2 calculates a value obtained by multiplying the unfixed task shortest response time by the number of remaining tasks as a part of the increase limit value.
  • the unfixed task execution time totaling unit 112-3 calculates an increase limit value using the following.
  • the unfixed task execution time totaling unit 112-3 calculates a part of the increase limit value by summing all the execution times of the unfixed tasks.
  • the increase limit values calculated by the unfixed task shortest response time integrating unit 112-2 and the unfixed task execution time totaling unit 112-3 are independent elements, the total of both is increased. It can be used as a limit value.
  • the workload for task ⁇ m Is Represents the sum of the work of the processor performed by the task ⁇ m to which the activation instruction is given in the period and all the tasks having higher priority than the task ⁇ m, and is obtained by the following equation.
  • T exists, that is, if there is a point where the accumulated work amount by time t is equal to the elapsed time t, the remaining work amount of the processor becomes zero at that point.
  • This t is the worst response time of the task ⁇ m .
  • t is (D m is deadline time of the task tau m) can be determined to be in the range of, task tau m satisfies the deadline constraint.
  • the calculation of the worst response time is
  • the workload equation is constructed using only the task on the same core as the task ⁇ m .
  • the response time accumulating unit 120-2 adds up the response times of the tasks calculated by the response time calculating unit 120-1 to calculate the accumulated response time.
  • the basic operation of the first embodiment is the same as the operation shown in the flowchart of FIG. Moreover, by setting it as the structure of this Example 1, there can exist an effect similar to the effect mentioned above as an effect of embodiment.
  • the fixed unit cumulative response time calculation instruction unit 112-1, the unfixed task shortest response time integration unit 112-2, and the unfixed task execution time total unit 112- 3 was included.
  • these three elements each calculate an independent element of the limit value of the evaluation function, it may be configured to have only a part of them. Specifically, the following variations can be considered.
  • the limiting unit 112 includes a fixed task accumulated response time calculation instruction unit 112-1 and an unfixed task shortest response time integration unit 112-2
  • the limiting unit 112 includes a fixed task cumulative response time calculation instruction unit 112-1 and an unfixed task execution time total unit 112-3
  • limiting unit 112 includes an unfixed task shortest response time integrating unit 112-2 and an execution time totaling unit 112-3
  • the task allocation optimization system 100 according to the second embodiment is not fixed in place of the unfixed task execution time totaling unit 112-3 constituting the limiting unit 112 of the task optimization system according to the first embodiment.
  • the second embodiment is the same as the first embodiment except that the task execution time integrating unit 112-4 is provided.
  • each unit other than the unfixed task execution time integration unit 112-4 functions in the same manner as in the first embodiment, and thus description thereof is omitted here.
  • the overall operation of the second embodiment is the same as that of the first embodiment except for the calculation of the increase limit value by the unfixed task execution time integrating unit 112-4, and thus the description thereof is omitted.
  • the unfixed task execution time accumulating unit 112-4 calculates the increase limit value using the following.
  • the unfixed task execution time totaling unit 112-3 of the first embodiment all execution times of unfixed tasks are simply summed up, but the unfixed task execution time integrating unit 112-4 uses a different calculation method.
  • the response time of unfixed tasks in a single core consider the response time of unfixed tasks in a single core.
  • the response time of the unfixed task A is at least added to the execution time of the unfixed task A in addition to the minimum fixed task response time.
  • the response time of the unfixed task B is at least the execution time of the unfixed task B in addition to the minimum fixed task response time and the execution time of the unfixed task A. Is added.
  • the evaluation function is a cumulative response time
  • the execution time of the unfixed task A is added twice to the evaluation function value that increases when the unfixed task A and the unfixed task B are added. It will be.
  • the number of unfixed tasks to be added is x
  • the execution time of the unfixed task A is added x times
  • the execution time of the unfixed task B is added x ⁇ 1 times.
  • the core to which unfixed task A is added is not necessarily the same as the core to which unfixed task B and other unfixed tasks are added. It should be noted that the number of times is approximately 1 / p.
  • the number of times that the execution times of the unfixed task A and the unfixed task B are added may be increased depending on the subsequent core allocation of the unfixed task. If the maximum number of times is added, an error occurs. Therefore, by sorting the execution times of the unfixed tasks in ascending order and calculating them from the shortest ones that are added many times, a problem-free value can be calculated as the increase limit value.
  • This process is expressed as follows. First, the execution times of unfixed tasks are sorted in ascending order. After that, for each unfixed task, the execution time of unfixed tasks sorted in ascending order is multiplied by the product of the number of unfixed tasks divided by the number of cores rounded up to the nearest decimal point. Repeat this operation for all unfixed tasks.
  • n is the total number of tasks
  • m is the number of fixed tasks
  • p is the number of cores
  • Is calculated by sorting the remaining task execution times in ascending order.
  • the increase limit values calculated by the unfixed task shortest response time accumulation unit 112-2 and the unfixed task execution time accumulation unit 112-4 are calculated as independent elements, the total of both is increased. It can be used as a limit value.
  • the fixed task accumulated response time calculation instruction unit 112-1 the unfixed task shortest response time integration unit 112-2, and the unfixed task execution time integration unit 112- 4.
  • these three elements each calculate an independent element of the limit value of the evaluation function, a configuration including only a part of them can be adopted. The following is considered as what is not described in Example 1 among specific variations.
  • the limiting unit 112 includes a fixed task cumulative response time calculation instruction unit 112-1 and an unfixed task execution time integration unit 112-4
  • the limiting unit 112 includes an unfixed task shortest response time integrating unit 112-2 and an execution time integrating unit 112-4
  • the task placement optimization system 100 according to the third embodiment is the same except that it further includes an approximate solution search unit 140 in addition to the task optimization system 100 according to the first or second embodiment. is there.
  • Example 3 which provides the approximate solution search part 140 may be combined with the limiting part 112 of Example 1, and may be combined with the limiting part 112 of Example 2.
  • the approximate solution search unit 140 finds task placement candidates at a higher speed than the search unit 110 by a method simpler than the optimization performed by the search unit 110 and registers the candidates in the high evaluation candidate holding unit 130.
  • a simple method a general approximate solution for optimization, such as a hill-climbing method, can be used. This search does not have any problem even if the evaluation function value of the candidate is somewhat inferior, but the speed needs to be sufficiently higher than that of the search unit 110.
  • step S21 the approximate solution search unit 140 creates task placement candidates by an approximate solution method. Thereafter, in step S22, the approximate solution search unit 140 registers the created candidate. Thereafter, in step S23, the search unit 110 performs optimization, but the operation here is the same as the operation shown in the flowchart of FIG. Next, the effect in Example 3 of this invention is demonstrated.
  • the fourth embodiment is an example in which the limitation is not performed in the first half of the optimization and the limitation is applied after the latter half.
  • the task placement optimization system 100 according to the fourth embodiment is the same except that the search unit 110 of the task optimization system according to the first embodiment or the second embodiment further includes a limitation deterring unit 113. It is. Note that it is possible to combine the approximate solution search unit 140 and the limitation suppression unit 113 illustrated in FIG. 9, that is, to combine the third embodiment and the fourth embodiment.
  • the function of the limitation deterring unit 113 will be described. Note that the same elements as those in the first or second embodiment other than the limitation suppressing unit 113 function in the same manner as in the first or second embodiment, and thus the description thereof is omitted.
  • the limitation deterring unit 113 deters the limitation by the limiting unit 112 when the number of fixed tasks is small.
  • the number of fixed tasks to be suppressed is calculated from the total number of tasks (for example, 1/2 of the total number of tasks), and the number of fixed tasks for which the suppression is effective for each total task number is measured in advance. Any method such as a method of recording a value can be used.
  • step S31 the limit inhibiting unit 113 determines whether or not the number of fixed tasks exceeds a specified value. If not exceeded (No in step S31), the process proceeds to step S32. When exceeding (Yes in Step S31), the process proceeds to Step S34.
  • the branching unit 111 If the number of fixed tasks does not exceed the specified value, the branching unit 111 generates a child problem with the core arrangement of the task to be fixed next being 0 in step S32.
  • the child problem generated at this time performs processing based on the flowchart of FIG. 12 as in the operation described here, and does not perform processing related to limitation. That is, only the child problem is generated.
  • step S33 the branching unit 111 generates a child problem in which the core arrangement of the task to be fixed next is 1. The generated child problem is similarly processed based on the flowchart of FIG.
  • the branching unit 111 If the number of fixed tasks exceeds the specified value, the branching unit 111 generates a child problem in which the core layout of the task to be fixed next is 0 in step S34. Unlike the operation described here, the generated child problem is processed based on the flowchart of FIG. 6 as in the first embodiment. That is, the limiting process by the limiting unit 112 is started from this stage. Subsequently, in step S35, the branching unit 111 generates a child problem in which the core arrangement of the task to be fixed next is 1. The generated child problem is similarly processed based on the flowchart of FIG. Next, the effect in Example 4 of this invention is demonstrated.
  • the fourth embodiment of the present invention is configured not to perform limit processing and not to calculate a limit value for a child problem with a small number of fixed tasks. As a result, it is possible to eliminate the limit value calculation overhead in a child problem with a small number of fixed tasks for which a limited effect cannot be obtained, and it is possible to speed up the optimization process.
  • the first effect is that a layout with good performance can be searched from among a plurality of task layouts that can be scheduled.
  • the accumulated response time calculation unit calculates an evaluation function value that is an index indicating the good performance of the task placement candidate, and performs optimization using this evaluation function value, so that task placement with good performance is performed. This is because
  • the second effect is that it is possible to increase the margin from the deadline, which is an important index from the viewpoint of system stability in a real-time system.
  • the cumulative response time calculation unit calculates the cumulative value of the response time (the time from when the task activation is instructed until the task execution is completed) of each of the plurality of tasks to be determined for core placement. This is because, by performing optimization that minimizes the cumulative response time of each of the plurality of tasks to be determined for core placement, a task placement in which the response time of each task is minimized can be obtained.
  • the third effect is that the time required for optimization can be reduced.
  • the first reason is that, when searching for task placement candidates, the limiting unit does not search for unnecessary task placement candidates.
  • the second reason is that prior to optimization, relatively good solution candidates are obtained and registered by a fast approximate solution method, and at the start of optimization, limitation is performed based on the evaluation function value. is there.
  • the third reason is that the child problem with a small number of fixed tasks does not perform the limiting process and does not calculate the limit value. This is because the overhead of calculating the limit value in the problem is eliminated.
  • the task allocation optimization system can be realized by hardware, but a program for causing a computer to function as the task allocation optimization system is recorded on a computer-readable recording medium. It can also be realized by reading and executing.
  • the task allocation optimization method according to the embodiment of the present invention can be realized by hardware, but the computer reads a program for causing the computer to execute the method from a computer-readable recording medium and executes the program. Can also be realized.
  • a task allocation optimization system for multi-cores having a plurality of cores, A response time of each of a plurality of tasks that are core placement determination targets, and a cumulative response time calculation unit that outputs the calculated cumulative value of the response time as an evaluation function value that is an index representing the goodness of task placement; Based on the evaluation function value, a search unit that searches for a task arrangement for which a good evaluation function value is calculated; A high evaluation candidate holding unit that holds candidates with good evaluation function values among a plurality of task placement candidates searched by the search unit;
  • a task placement optimization system characterized by comprising:
  • the search unit A branch that generates child problems by placing tasks in the core in order from the task with the highest priority to the task with the lower priority, A limit unit that calculates a limit value of the evaluation function value that can be taken by the child problem, and that does not perform an unnecessary core arrangement candidate search using the calculated limit value of the evaluation function value;
  • the limitation unit includes a fixed task cumulative response time calculation instruction unit that calculates the limit value using the evaluation function value calculated using a task that has already been arranged in the core. .
  • the limiting part is By comparing the response time of fixed tasks that are already assigned to the core with the lowest priority within each core for each core, the limit value is obtained by multiplying the shortest response time by the number of remaining tasks as a result of the comparison.
  • a task placement optimizing system comprising an unfixed task shortest response time accumulating unit for calculating
  • the search unit A branch that generates child problems by placing tasks in the core in order from the task with the highest priority to the task with the lower priority, A limit unit that calculates a limit value of the evaluation function value that can be taken by the child problem, and that does not perform an unnecessary core arrangement candidate search using the calculated limit value of the evaluation function value;
  • the limiting part is A task placement optimizing system comprising an unfixed task execution time totaling unit that calculates a limit value by summing all execution times of unfixed tasks that are tasks whose placement has not yet been fixed.
  • the search unit A branch that generates child problems by placing tasks in the core in order from the task with the highest priority to the task with the lower priority, A limit unit that calculates a limit value of the evaluation function value that can be taken by the child problem, and that does not perform an unnecessary core arrangement candidate search using the calculated limit value of the evaluation function value;
  • the limiting part is Sort the execution times of unfixed tasks, which are tasks that have not been fixed yet, in ascending order, and for each unfixed task, the execution times of unfixed tasks sorted in ascending order, the number of unfixed tasks divided by the number of cores It has an unfixed task execution time integration unit that calculates the limit value by accumulating the value obtained by multiplying the value after the decimal point and multiplying the number of unfixed tasks by 1 for all unfixed tasks.
  • the said search part is further provided with the limitation suppression part which suppresses not performing limitation by the said limitation part, when the number of the tasks which have already fixed arrangement
  • positioning is less than a regulation value.
  • the task placement optimization system according to any one of 1 to 5.
  • An approximate solution search unit is further provided that discovers task placement candidates faster than the search unit by performing an approximate solution search in advance and registers the found task placement candidates in the high evaluation candidate holding unit.
  • the task placement optimizing system according to any one of appendices 1 to 6, characterized in that:
  • a task placement optimization method comprising:
  • the searching step includes A branching step for generating a child problem by placing tasks in the core in order from a task with a higher priority to a task with a lower priority; A limiting step of calculating a limit value of the evaluation function value that can be taken by the child problem, and limiting an unnecessary core arrangement candidate search by using the calculated limit value of the evaluation function value,
  • the limitation step includes a fixed task cumulative response time calculation instruction step for calculating the limit value using the evaluation function value calculated using a task already arranged in the core. .
  • the searching step includes A branching step for generating a child problem by placing tasks in the core in order from a task with a higher priority to a task with a lower priority; A limiting step of calculating a limit value of the evaluation function value that can be taken by the child problem, and limiting an unnecessary core arrangement candidate search by using the calculated limit value of the evaluation function value,
  • the limiting step includes By comparing the response time of fixed tasks that are already assigned to the core with the lowest priority within each core for each core, the limit value is obtained by multiplying the shortest response time by the number of remaining tasks as a result of the comparison.
  • a task placement optimizing method characterized by including an unfixed task shortest response time integration step for calculating.
  • the searching step includes A branching step for generating a child problem by placing tasks in the core in order from a task with a higher priority to a task with a lower priority; A limiting step of calculating a limit value of the evaluation function value that can be taken by the child problem, and limiting an unnecessary core arrangement candidate search by using the calculated limit value of the evaluation function value,
  • the limiting step includes A task placement optimization method comprising: an unfixed task execution time total step for calculating a limit value by summing all execution times of unfixed tasks that are tasks whose placement has not yet been fixed.
  • the searching step includes A branching step for generating a child problem by placing tasks in the core in order from a task with a higher priority to a task with a lower priority; A limiting step of calculating a limit value of the evaluation function value that can be taken by the child problem, and limiting an unnecessary core arrangement candidate search by using the calculated limit value of the evaluation function value,
  • the limiting step includes Sort the execution times of unfixed tasks, which are tasks that have not been fixed yet, in ascending order, and for each unfixed task, the execution times of unfixed tasks sorted in ascending order, the number of unfixed tasks divided by the number of cores It includes an unfixed task execution time integration step that calculates the limit value by repeating the operation of subtracting the number of unfixed tasks by 1 for all the unfixed tasks.
  • the said search step further includes the limitation suppression step which suppresses not performing limitation by the said limitation step, when the number of the tasks which have already fixed arrangement
  • the task placement optimization method according to any one of items 12 to 12.
  • a task placement optimization program incorporated in a task placement optimization system for a multi-core having a plurality of cores, A response time of each of a plurality of tasks that are core placement determination targets, and a cumulative response time calculation unit that outputs the calculated cumulative value of the response time as an evaluation function value that is an index representing the goodness of task placement; Based on the evaluation function value, a search unit that searches for a task arrangement for which a good evaluation function value is calculated; A high evaluation candidate holding unit that holds candidates with good evaluation function values among a plurality of task placement candidates searched by the search unit; A task placement optimization program for causing a computer to function as a system comprising:
  • the search unit A branch that generates child problems by placing tasks in the core in order from the task with the highest priority to the task with the lower priority, A limit unit that calculates a limit value of the evaluation function value that can be taken by the child problem, and that does not perform an unnecessary core arrangement candidate search using the calculated limit value of the evaluation function value;
  • the limiting unit causes the computer to function as a task allocation optimization system having a fixed task cumulative response time calculation instruction unit that calculates the limit value using the evaluation function value calculated using a task that has already been allocated to the core.
  • the search unit A branch that generates child problems by placing tasks in the core in order from the task with the highest priority to the task with the lower priority,
  • a limit unit that calculates a limit value of the evaluation function value that can be taken by the child problem, and that does not perform an unnecessary core arrangement candidate search using the calculated limit value of the evaluation function value;
  • the limiting part is By comparing the response time of fixed tasks that are already assigned to the core with the lowest priority within each core for each core, the limit value is obtained by multiplying the shortest response time by the number of remaining tasks as a result of the comparison.
  • a task placement optimization program comprising an unfixed task shortest response time integration unit for calculating
  • the search unit A branch that generates child problems by placing tasks in the core in order from the task with the highest priority to the task with the lower priority, A limit unit that calculates a limit value of the evaluation function value that can be taken by the child problem, and that does not perform an unnecessary core arrangement candidate search using the calculated limit value of the evaluation function value;
  • the limiting part is A task placement optimizing program comprising an unfixed task execution time total section for calculating a limit value by summing all execution times of unfixed tasks that are tasks whose placement has not yet been fixed.
  • the search unit A branch that generates child problems by placing tasks in the core in order from the task with the highest priority to the task with the lower priority, A limit unit that calculates a limit value of the evaluation function value that can be taken by the child problem, and that does not perform an unnecessary core arrangement candidate search using the calculated limit value of the evaluation function value;
  • the limiting part is Sort the execution times of unfixed tasks, which are tasks that have not been fixed yet, in ascending order, and for each unfixed task, the execution times of unfixed tasks sorted in ascending order, the number of unfixed tasks divided by the number of cores It has an unfixed task execution time integration unit that calculates the limit value by accumulating the value obtained by multiplying the value after the decimal point and multiplying the number of unfixed tasks by 1 for all unfixed tasks.
  • the said search part is further provided with the limitation suppression part which suppresses not performing limitation by the said limitation part, when the number of the tasks which have already fixed arrangement
  • positioning is less than a regulation value.
  • a task placement optimization program according to any one of items 19 to 19.
  • the present invention is suitable for a development tool for a device using hardware having a multi-core configuration.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

複数の周期タスクから構成される開発対象のシステムにおいて、スケジューリング可能な複数のタスク配置の中から性能がよい配置を探索可能な自動最適化システムを提供する。 複数のコアを有するマルチコア向けのタスク配置最適化システムが、コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する。前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する。探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する。

Description

リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラム
 本発明はタスク配置に関し、より詳細にはリアルタイムシステム用マルチコア向けのタスク配置に関する。
 近年のデジタル機器の高性能化と低消費電力化要求の高まりを受け、組み込みLSI(Large Scale Integration)に複数のプロセッサを搭載するマルチコア(Multi-core)構成が有望な解決手段として注目を集めている。このようなマルチコア化は、システムの制御を目的とするリアルタイムシステム等においても主要な流れになりつつある。
 一方で、このようなマルチコアを搭載したリアルタイムシステムにおいては、並列に実行されるアプリケーションがデッドラインミスすることなくスケジューリング可能であることを保障する必要がある。この課題を解決する手法の一例としては、特許文献1に記載されている「リアルタイムスケジューリング可能性判定方法及びリアルタイムシステム」が挙げられる。
 特許文献1に記載の技術においては、マルチコアを搭載したリアルタイムシステムにおいて、一つのタスクの実行に同時に複数のプロセッサを必要とする場合のスケジューリング可能性判定方法を提供している。
 次に、図13を参照して特許文献1に記載の技術について説明する。なお図13は特許文献1の図2に相当する図である。図13に示されるスケジューリング可能性判定部300が以下に示す判定方法によりスケジューリングが可能か否かを判定する。
 具体的には、
Lk:タスクkがデッドラインミスを起こす場合には、ある期間の実際の平均負荷が必ずこれ以上となる値
Uk,i:タスクkがデッドラインミスを起こす場合に、タスクkの平均負荷期間におけるタスクiの平均単一負荷時間以上になっていることが保障されている値
Mi:タスクiによって同時に使用されるプロセッサ数
と定義した場合において、
全てのタスクが
Σi=1…N Mi*Uk,i≦Lk
を満たす場合にリアルタイムスケジューリングすることが可能であると判定する。このような方法を用いることにより、特許文献1に記載の技術では、一つのタスクの実行に同時に複数のプロセッサを必要とする場合のスケジューリング可能性が判定できる。
特許第4016010号
白石洋充/竹垣盛一著「リアルタイムシステムとその応用」朝倉書店、2001年9月1日、pp.35-56
 上述したように特許文献1に記載の技術を用いることによりスケジューリングが可能か否かが判定できる。
 しかしながら、この特許文献1に記載の技術に代表されるような、一般的な技術には下述するような複数の問題点が存在する。
 第1の問題点は、スケジューリング可能な複数のタスク配置の中から性能が良い配置を探索できないことである。
 その理由は、一般的な技術ではリアルタイムスケジューリングが可能か否かのみ判定が可能であり、スケジューリングが可能な複数の候補それぞれの性能の良さは判定できないためである。
 第2の問題点は、リアルタイムシステムにおいてシステムの安定性の観点から重要な指標である、デッドラインからの余裕度を大きくできないことである。
 その理由は、一般的な技術のリアルタイムスケジューリングが可能か否かを判定する手法では、デッドラインからの余裕度が大きい場合も小さい場合も区別なく扱われるからである。
 そこで、本発明は、スケジューリング可能な複数のタスク配置の中から性能が良い配置を探索可能な、リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラムを提供することを第1の目的とする。
 また、本発明は、リアルタイムシステムにおいてシステムの安定性の観点から重要な指標である、デッドラインからの余裕度を大きくすることが可能なリアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラムを提供することを第2の目的とする。
 本発明の第1の観点によれば、複数のコアを有するマルチコア向けのタスク配置最適化システムにおいて、コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出部と、前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索部と、前記探索部により探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持部と、を備えることを特徴とするタスク配置最適化システムが提供される。
 本発明の第2の観点によれば、複数のコアを有するマルチコア向けのタスク配置最適化方法において、コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出ステップと、前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索ステップと、前記探索ステップにより探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持ステップと、を備えることを特徴とするタスク配置最適化方法が提供される。
 本発明の第3の観点によれば、複数のコアを有するマルチコア向けのタスク配置最適化システムに組み込まれるタスク配置最適化プログラムにおいて、コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出部と、前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索部と、前記探索部により探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持部と、を備えるシステムとしてコンピュータを機能させることを特徴とするタスク配置最適化プログラム提供される。
 本発明によれば、スケジューリング可能な複数のタスク配置の中から性能がよい配置を探索可能となる。
 その理由は、タスク配置候補の性能の良好さを表す指標である評価関数値を算出し、この評価関数値を用いて最適化を行うことにより、性能がよいタスク配置が得られるからである。
 また、本発明によれば、リアルタイムシステムにおいてシステムの安定性の観点から重要な指標である、デッドラインからの余裕度を大きくすることが可能となる。
 その理由は、コア配置決定対象の複数のタスクの各々の応答時間(タスク起動が指示されてから、そのタスクの実行が終了するまでの時間)の累積値を算出し、コア配置決定対象の複数のタスクの各々の応答時間の累積値を最小化する最適化を行うことにより、各タスクの応答時間が極力短くなるタスク配置が得られるからである。
本発明の実施形態及び各実施例における基本的構成を表すブロック図である。 本発明の実施形態及び各実施例における累積応答時間算出部の基本的構成を表す図である。 本発明のハードウェア及びソフトウェアによる実装例(1/2)について示した図である。 本発明のハードウェア及びソフトウェアによる実装例(2/2)について示した図である 本発明の実施形態及び各実施例における動作について説明するための分枝図である。 本発明の実施形態及び各実施例における基本的動作を表すフローチャートである。 本発明の実施例1における限定部について示すブロック図である。 本発明の実施例2における限定部について示すブロック図である。 本発明の実施例3における基本的構成を表すブロック図である。 本発明の実施例3における近似解探索部の動作について示すフローチャートである。 本発明の実施例4における基本的構成を表すブロック図である。 本発明の実施例4における基本的動作を表すフローチャートである。 特許文献1に記載の技術について説明するための図である。
100 タスク配置自動最適化システム
110 探索部
111 分枝部
112 限定部
112-1 既固定タスク累積応答時間算出指示部
112-2 未固定タスク最短応答時間積算部
112-3 未固定タスク実行時間合計部
112-4 未固定タスク実行時間積算部
113 限定抑止部
120 累積応答部算出部
120-1 応答時間算出部
120-2 応答時間累積部
130 高評価候補保持部
140 近似解探索部
200 コンピュータ
210 プロセッサ
220 補助記憶装置
221 タスク自動配置最適化プログラム
222-1、222-2、222-3 タスク
223 タスク最適配置定義ファイル
224 タスクセット定義ファイル
230 主記憶装置
300 スケジューリング可能性判定部
 次に、具体的な実施形態を用いて本発明を実施するためのタスク配置最適化システムの構成及び動作を説明する。
 本明細書においては例えばコアが複数存在し、そのそれぞれを識別するためにコア番号など番号付けを行う際は、コア0、コア1、コア2…のように0番から付番するものとする。
[実施形態]
 図1は、本発明の実施形態による自動最適化システム100の全体構成を示すブロック図である。図1において、自動最適化システム100は、探索部110、累積応答時間算出部120、及び高評価候補保持部130を有する。探索部110は、更に分枝部111と、限定部112を有する。なお、後述するが分枝部111は、子問題生成に関する部分である。また、限定部112は、不要候補排除に関する部分である。
 次に図2を用いて、累積応答時間算出部120の詳細について説明する。図2に示すように、累積応答時間算出部120はさらに、応答時間算出部120-1と、応答時間累積部120-2を有する。
 なお、上述した自動最適化システム100は、プロセッサ等のハードウェア資源がプログラム(ソフトウェア)を読み込むことにより実現される。
 すなわち、ソフトウェアがコンピュータに組み込まれることにより、ソフトウェアとハードウェア資源とが協働した具体的部分によって、使用目的に応じた情報の演算または加工を実現することにより、使用目的に応じた特有の情報処理装置(機械)またはその動作方法が構築される。
 具体的なデータ処理装置100の実装例としてコンピュータ200を図3及び図4に示す。
 図3を参照するとコンピュータ200は、プロセッサ210、補助記憶装置220及び主記憶装置230を有している。
 プロセッサ210は演算処理装置である。また、補助記憶装置220は、HDD(Hard disk drive)やSSD(solid state drive)に代表される記憶装置であり、各種のデータや、プログラムが格納される。図3においては、タスク自動配置最適化プログラム221、タスク(タスク222-1、タスク222-2及びタスク222-3を図示する。)及びタスク最適配置定義ファイル223を図示する。また、主記憶装置230はRAM(Random Access Memory)に代表される記憶装置であり、プロセッサ210が演算処理を行うにあたり利用される記憶部である。
 プロセッサ210によって補助記憶装置220から読み出されて実行されるタスク自動配置最適化プログラム221は、補助記憶装置220から最適化対象のタスク222-1、タスク222-2及びタスク222-3の情報を読み出し、記憶装置230を利用しながらタスク配置の最適化を行う。最適化を行った結果得られたタスク最適配置は、補助記憶装置220上にタスク最適配置定義ファイル223として出力される。
 次に、図4を参照すると補助記憶装置220は、タスク222-1、タスク222-2及びタスク222-3に代わりタスクセット定義ファイル224を有している。
 そして、プロセッサ210によって補助記憶装置220から読み出されて実行されるタスク自動配置最適化プログラム221は、補助記憶装置220から最適化対象の複数のタスクに関する情報が定義されたタスクセット定義ファイル224を読み出し、記憶装置230を利用しながらタスク配置の最適化を行う。最適化を行った結果得られたタスク最適配置は、補助記憶装置220上にタスク最適配置定義ファイル223として出力される。
 次に、図1及び図2を参照して説明した各部の機能について具体的に説明する。
 探索部110は、複数あるタスクのコア配置を探索し、タスク配置候補を生成する。探索には、子問題を生成する分枝と、不要な候補を排除する限定操作からなる分枝限定法を用いる。
 累積応答時間算出部120は、タスク配置候補を入力とし、コア配置決定対象の複数のタスク各々の応答時間を計算し、その累積値をタスク配置の良さを表す指標である評価関数値として算出し、出力する。
 高評価候補保持部130は、タスク配置候補のうち評価関数値が良好であった候補を保持する。
 次に探索部110内の分枝部111及び限定部112について説明する。
 分枝部111は、図5に示すように、優先度が高いタスクからコアに固定して子問題(図5中では丸で表す)を生成する(図5の上から下に向かう)ことで、探索するタスク配置候補を網羅的に生成する。このとき、子問題の生成が繰り返されて全てのタスクの配置が終了したものがタスク配置候補(図5の最下段)となる。なお、説明の便宜上図5は2コアのシステムを想定した記載となっている。しかし、タスク配置候補を網羅的に生成する本手法は、その対象が2コアに限定されるものではなく、3コア以上の任意のコア数のシステムにおいても同様に拡張が可能である。
 限定部112では、子問題が取り得る評価関数の限界値(それ以上良くならないと断定できる値で、良い配置が小さい値で表わされる評価関数を用いた場合は下界値、良い配置が大きい値で表わされる評価関数値を用いた場合は上界値となる)を、既にコアに固定したタスクを用いて算出した評価関数値と、既にコア配置を固定したタスクのうち各コアの中で最も優先度が低いタスクの応答時間と、コア配置が未決定なタスクの実行時間のうち少なくともいずれか1つを用いて算出する。
 この評価関数値の限界値が、既に見つかっている他のタスク配置候補のスコアより悪い場合には、それ以上その子問題の探索を行っても他のタスク配置候補よりも良いタスク配置候補は得られないため、探索を打ち切る限定処理を行う。限定が行われる場合、それ以上分枝部111による子問題の生成が行われなくなる。
 次に、図2に示す累積応答時間算出部120内の応答時間算出部120-1及び応答時間累積部120-2について説明する。
 応答時間算出部120-1は、複数のタスクそれぞれについて、そのタスクの応答時間(タスク起動が指示されてから、そのタスクの実行が終了するまでの時間)を算出する。
 応答時間累積部120-2は、応答時間算出部120-1によって算出された各タスクの応答時間を合計し、累積応答時間を算出する。
 次に、図6のフローチャートを用いて、本発明の実施形態における自動最適化システムの動作について説明する。
 なお、便宜上ここでは2コアのシステムを想定した動作を記述しているが、本手法は、その適用対象が2コアに限定されるものではなく、3コア以上の任意のコア数のシステムにおいても同様に適用が可能である。
 まずステップS11において、探索部110は現在扱っている子問題がタスク候補であるか否かを判定する。ここでタスク候補は、全てのタスクが固定された子問題に相当する。タスク候補でない場合(ステップS11においてNo)はステップS12に進む。タスク候補であった場合は(ステップS11においてYes)ステップS16に進む。
 次にステップS12では、探索部110内の限定部112が限定式の計算を行い、子問題が取り得る評価関数値の限界値(それ以上良くならないと断定できる値)を算出する。
 その後、限定部112はステップS13において、評価関数値の限界値と、高評価候補保持部130に保持されているタスク配置候補について累積応答時間算出部120によって算出される評価関数値とを比較する。比較の結果、評価関数値を更新する可能性がある場合(ステップS13においてYes)はステップS14に進む。可能性がない場合(ステップS13においてNo)には限定を行い、それ以上子問題の生成は行わずに処理を終了する。
 ステップS13において評価関数値を更新する可能性がある場合(ステップS13においてYes)、分枝部111はステップS14において、次に固定するタスクのコア配置を0とした子問題を生成する。生成された子問題は、ここで述べている動作と同様に図6のフローチャートに基づいた処理を行う。引き続き分枝部111はステップS15において、次に固定するタスクのコア配置を1とした子問題を生成する。生成された子問題は同様に図6のフローチャートに基づいた処理を行う。
 一方でステップS11において現在扱っている子問題がタスク候補であった場合(ステップS11においてYes)、探索部110はステップS16において、累積応答時間生成部120にタスク配置候補を渡すことでタスク配置候補の評価関数値の算出を行う。その後探索部110はステップS17において、ステップS16で算出した評価関数値と、高評価候補保持部130によって保持されているタスク配置候補の評価関数値を比較する。ここで、高評価候補保持部130によって保持されているタスク配置候補の評価関数値は毎回計算するのではなく、一度計算したものを保持しておく構成とすることが望ましい。比較した結果、現在のタスク配置候補の評価関数値がより良好な値を示した場合(ステップS17においてYes)、探索部110はステップS18において、現在のタスク配置候補を高評価候補として高評価候補保持部130に登録し、処理を終了する。現在のタスク配置候補の評価関数値が良好でない場合(ステップS17においてNo)には何も行わずに処理を終了する。
 次に、本発明の実施形態における効果を説明する。
 本発明の実施形態では、累積応答時間算出部120によって、タスク配置候補の性能の良好さを表す指標である評価関数値を算出し、この評価関数値を用いて最適化を行うことにより、性能がよいタスク配置を得ることが可能である。このため、スケジューリング可能な複数のタスク配置の中から性能がよい配置を探索可能な自動最適化システムの提供が可能となる。また、累積応答時間算出部120によって、コア配置決定対象の複数のタスクの各々の応答時間(タスク起動が指示されてから、そのタスクの実行が終了するまでの時間)の累積値を算出し、コア配置決定対象の複数のタスクの各々の応答時間の累積値を最小化する最適化を行うことにより、各タスクの応答時間が極力短くなるタスク配置を得ることが可能である。このため、リアルタイムシステムにおいてシステムの安定性の観点から重要な指標である、デッドラインからの余裕度を大きくすることが可能となる。更に、タスク配置候補の探索の際に、限定部によって不要なタスク配置候補を探索しないよう限定する。このため、最適化に必要な時間の削減が可能である。
 次に、具体的な実施例を用いて本発明を実施するためのタスク配置最適化システム100の構成及び動作を説明する。
 なお、実施例1の基本的構成及びは、図1、図2及び図6に実施形態として示したタスク配置自動化システム100の構成及び動作と同じであるが、本実施例1では図7を参照して、限定部112の具体的な構成例について説明する。また、応答時間算出部120-1における算出方法についても説明する。
 図7を参照すると、限定部112は、既固定タスク累積応答時間算出指示部112-1と、未固定タスク最短応答時間積算部112-2と、未固定タスク実行時間合計部112-3を有する。
 既固定タスク累積応答時間算出指示部112-1、未固定タスク最短応答時間積算部112-2、未固定タスク実行時間合計部112-3は、限定部112の機能のうち、評価関数の限界値を求める作用を担当する。なお、評価関数値がより大きいものがより良い配置であるようにする場合と、評価関数値がより小さいものがより良い配置であるようにする場合との2つの場合が考えられるが、以下では、評価関数値がより小さいものがより良い配置である場合を例として説明する。また、以下の説明において、既固定タスクとは、子問題中で既にコア配置を固定されたタスクを指すものとする。未固定タスクとは、まだ子問題中でコア配置を固定されておらず、以後の処理で固定していくタスクを指すものとする。
 まず、評価関数の限界値の計算においては、既固定タスクによって既に評価関数値が確定している部分(以後、「確定限界値」と呼ぶ)の計算と、未固定タスクが今後タスク配置を固定されることによって増加が見込まれる評価関数値(以後、「増加限界値」と呼ぶ)の計算の大きく2つが存在する。このうち確定限界値の計算を、既固定タスク累積応答時間算出指示部112-1が行う。増加限界値の計算は、未固定タスク最短応答時間積算部112-2、未固定タスク実行時間合計部112-3が行う。
 既固定タスク累積応答時間算出指示部112-1は、累積応答時間算出部120に対して既固定タスクのコア配置を渡すことで、累積応答時間を算出する指示を与える。累積応答時間算出部120はこの既固定タスクのコア配置を基に累積応答時間を算出し、限定部112に渡すことで、確定限界値の計算が行われる。
 次に、未固定タスク最短応答時間積算部112-2は、次のことを利用して増加限界値の計算を行う。
 まず、既に数段階の子問題生成が行われ、いくつかの既固定タスクが存在する状態を考える。ここで新たに未固定タスクを追加したとき、未固定タスクは既固定タスクより優先度が低い。このことから、未固定タスクの応答時間は、各コア内で最低優先度の既固定タスクの応答時間を、それぞれのコアについて比較して最も短い応答時間(以後、「未固定タスク最短応答時間」と呼ぶ)よりも長くなる。このため、残りのタスクをすべて固定することによって増加する評価関数値は、未固定タスク最短応答時間に残りのタスク数を乗じたものよりも大きい。未固定タスク最短応答時間積算部112-2は、未固定タスク最短応答時間に残りのタスク数を乗じたものを増加限界値の一部として算出する。
 最後に、未固定タスク実行時間合計部112-3は、次のことを利用して増加限界値の計算を行う。
 まず、既に数段階の子問題生成が行われ、いくつかの既固定タスクが存在する状態を考える。ここで新たに未固定タスクを追加したとき、未固定タスクの応答時間は、既固定タスク最短応答時間に加えて、追加したタスクの実行時間が少なくとも加算される。このため、未固定タスク実行時間合計部112-3は、未固定タスクの実行時間を全て合計することで、増加限界値の一部を算出する。
 ここで、未固定タスク最短応答時間積算部112-2及び未固定タスク実行時間合計部112-3が算出する増加限界値はそれぞれ独立した要素を計算しているため、双方を合計したものを増加限界値として用いることが可能である。
 次に、応答時間算出部120-1における応答時間の算出について説明する。応答時間の算出においては、非特許文献1に記載の最悪応答時間を算出する手法を応用することができる。以下でその手法の概要について述べる。
 まず、シングルコアにおいて、タスクτに対するワークロードである
Figure JPOXMLDOC01-appb-M000001
は、
Figure JPOXMLDOC01-appb-M000002
の期間で起動指示が与えられるタスクτとそれより優先度が高い全てのタスクによってなされるプロセッサの仕事量の総和を表し、次の式で求められる。
Figure JPOXMLDOC01-appb-M000003
ここで、
Figure JPOXMLDOC01-appb-M000004
はxより大きいか等しい最小の整数で、小数点以下を繰り上げたものに相当する。また、ここで、仕事量が1であるとは、時間1においてプロセッサの処理が終了することを表す。このため、貼って
Figure JPOXMLDOC01-appb-M000005
となるtが存在する、すなわち、時刻tまでに蓄積した仕事量が、経過した時間tと等しくなる点が存在すれば、そのtにおいてプロセッサの残り仕事量が0になる。このtがタスクτの最悪応答時間である。この時、tが
Figure JPOXMLDOC01-appb-M000006
(Dはタスクτのデッドライン時刻)の範囲であれば、タスクτがデッドライン制約を満たすと判定することができる。
 ここで、最悪応答時間の計算は
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000008
の回帰関係を用いて求める。
 この回帰関係において、
Figure JPOXMLDOC01-appb-M000009
の範囲において
Figure JPOXMLDOC01-appb-M000010
となったときに計算を停止する。
 一方、
Figure JPOXMLDOC01-appb-M000011
の範囲で
Figure JPOXMLDOC01-appb-M000012
が成立しない場合はデッドラインミスとなる。
 マルチコアにおけるタスクτの最悪応答時間の計算には、タスクτと同じコア上のタスクのみを用いてWorkloadの式を構築する。
 最後に応答時間累積部120-2は、応答時間算出部120-1によって算出された各タスクの応答時間を合計し、累積応答時間を算出する。
 なお、実施例1の基本的動作は、図6のフローチャートに示した動作と同様であるため説明を省略する。また、本実施例1の構成とすることにより、実施形態の効果として上述した効果と同様の効果を奏することができる。
 なお、実施例1においては、限定部112を構成する要素として既固定タスク累積応答時間算出指示部112-1、未固定タスク最短応答時間積算部112-2、未固定タスク実行時間合計部112-3が含まれるものとした。一方でこれら3つの要素はそれぞれ評価関数の限界値の独立した要素を計算していることから、このうちの一部のみを有する構成とすることもできる。具体的には次のようなバリエーションが考えられる。
 (1)限定部112が既固定タスク累積応答時間算出指示部112-1を有する構成
 (2)限定部112が未固定タスク最短応答時間積算部112-2を有する構成
 (3)限定部112が未固定タスク実行時間合計部112-3を有する構成
 (4)限定部112が既固定タスク累積応答時間算出指示部112-1及び未固定タスク最短応答時間積算部112-2を有する構成
 (5)限定部112が既固定タスク累積応答時間算出指示部112-1及び未固定タスク実行時間合計部112-3を有する構成
 (6)限定部112が未固定タスク最短応答時間積算部112-2及び実行時間合計部112-3を有する構成
 次に、本発明の実施例2におけるタスク配置最適化システム100の構成及び動作を説明する。
 実施例2のタスク配置最適化システム100は、図8に示すように、実施例1のタスク最適化システムの限定部112を構成する未固定タスク実行時間合計部112-3に代えて、未固定タスク実行時間積算部112-4を有する点を除いて実施例1と同一である。
 次に、未固定タスク実行時間積算部112-4の機能について説明する。なお、未固定タスク実行時間積算部112-4以外の各部は実施例1と同様の働きをするため、ここでは説明を省略する。また、実施例2の全体的な動作については、未固定タスク実行時間積算部112-4による増加限界値の計算以外は実施例1と同様であるため説明を省略する。
 未固定タスク実行時間積算部112-4は、次のことを利用して増加限界値の計算を行う。
 実施例1の未固定タスク実行時間合計部112-3では、未固定タスクの実行時間を全て単純に合計していたが、未固定タスク実行時間積算部112-4においては異なる計算手法を用いる。
 ここで、シングルコアにおける未固定タスクの応答時間について考える。
 まず、既に数段階の子問題生成が行われ、いくつかの既固定タスクが存在する状態を考える。ここで新たに1つ未固定タスクAを追加したとき、未固定タスクAの応答時間は、既固定タスク最短応答時間に加えて、未固定タスクAの実行時間が少なくとも加算される。この状態で更に1つ未固定タスクBを追加すると、未固定タスクBの応答時間は、既固定タスク最短応答時間及び未固定タスクAの実行時間に加えて、未固定タスクBの実行時間が少なくとも加算される。ここで、評価関数は応答時間の累積であることから、未固定タスクA及び未固定タスクBを追加したときに増加する評価関数値には、未固定タスクAの実行時間は2回加算されることになる。同様に、追加される未固定タスクの数がx個の場合には、未固定タスクAの実行時間はx回、未固定タスクBの実行時間はx-1回加算されることになる。
 マルチコアの場合は、未固定タスクAを追加したコアと未固定タスクB、及びその他の未固定タスクを追加するコアは必ずしも同一でないことから、p個のコアからなるマルチコアにおいては加算される応答時間の回数が概ね1/pとなることに注意が必要である。
 更に、未固定タスクAと未固定タスクBの実行時間が加算される回数は、その後の未固定タスクのコア配置次第では未固定タスクBが多くなることが十分あり得るため、実行時間が長いタスクを最大回数加算してしまうと誤りが生じる。そのため、未固定タスクの実行時間を短い順にソートし、短いものから多数回加算されるものとして算出することで、増加限界値として問題のない値を算出することができる。
 この処理は次のように表わされる。まず、未固定タスクの実行時間を昇順にソートする。その後未固定タスク1つごとに、昇順にソートされた未固定タスクの実行時間に、未固定タスク数÷コア数の小数点以下を繰り上げたものを乗じた値を積算し、未固定タスク数を1つ減じる操作を全ての未固定タスクについて繰り返す。
 つまり、nを総タスク数、mを既固定タスクの数、pをコア数、
Figure JPOXMLDOC01-appb-M000013
を、残りタスクの実行時間を短い順にソートしたものとしたとき、計算式
Figure JPOXMLDOC01-appb-M000014
を用いて増加限界値の一部を算出する。
 ここで、未固定タスク最短応答時間積算部112-2及び未固定タスク実行時間積算部112-4が算出する増加限界値はそれぞれ独立した要素を計算しているため、双方を合計したものを増加限界値として用いることが可能である。
 なお、実施例2においては、限定部112を構成する要素として既固定タスク累積応答時間算出指示部112-1、未固定タスク最短応答時間積算部112-2、未固定タスク実行時間積算部112-4を有するものとした。一方でこれら3つの要素はそれぞれ評価関数の限界値の独立した要素を計算していることから、このうちの一部のみを備える構成をとることができる。具体的なバリエーションのうち実施例1で述べていないものとして、以下が考えられる。
 (1)限定部112が未固定タスク実行時間積算部112-4を備える構成
 (2)限定部112が既固定タスク累積応答時間算出指示部112-1及び未固定タスク実行時間積算部112-4を備える構成
 (3)限定部112が未固定タスク最短応答時間積算部112-2及び実行時間積算部112-4を備える構成
 次に、本発明の実施例3におけるタスク配置最適化システムの構成及び動作を説明する。
 実施例3のタスク配置最適化システム100は、図9に示すように、実施例1または実施例2のタスク最適化システム100に加えて、近似解探索部140を更に有する点を除いて同一である。
 次に、近似解探索部140の機能について説明する。なお、近似解探索部140以外の各部は実施例1又2と同様の働きをするため、ここでは説明を省略する。なお、近似解探索部140を設ける実施例3は、実施例1の限定部112と組み合わせてもよいし、実施例2の限定部112と組み合わせてもよい。
 近似解探索部140は、探索部110が行う最適化より簡便な手法により、探索部110より高速にタスク配置候補を発見し、高評価候補保持部130に候補を登録する。簡便な方法には、最適化の一般的な近似解法、例えば山登り法などを用いることができる。この探索は、候補の評価関数値は多少劣っていても問題ないが、速度は探索部110に比べて十分高速である必要がある。
 次に、図10のフローチャートを用いて、本発明の実施例3における自動最適化システム100の動作について説明する。
 まずステップS21において、近似解探索部140は近似解法によるタスク配置候補作成を行う。その後ステップS22において、近似解探索部140は作成した候補を登録する。以後ステップS23において、探索部110が最適化を行うが、ここでの動作は実施例1及び実施例2の動作として図6のフローチャートに示した動作と同様であるため説明を省略する。
 次に、本発明の実施例3における効果を説明する。
 最適化を開始した初期の段階では、通常はまだスコアが低いタスク配置候補しか見つかっていない。このため、子問題が取り得る評価関数値の限界値として計算した値は現在見つかっているタスク配置候補のスコアを容易に上回るため、効果的な限定が行われないことがある。ここで本発明の実施例3では、探索部110による最適化前に、高速な近似解法によって比較的良好な解の候補を得て、高評価候補保持部130にあらかじめ登録している。このため、探索部110による最適化の開始時には、その評価関数値を元に限定を行うことが可能となり、処理の高速化を図ることができる。
 次に、本発明の実施例4におけるタスク配置最適化システム100の構成及び動作を説明する。実施例4は、概略、最適化の前半では限定を行わず、後半になってから限定を効かせるようにするという実施例である。
 実施例4のタスク配置最適化システム100は、図11に示すように、実施例1又は実施例2のタスク最適化システムの探索部110内に、限定抑止部113をさらに有する点を除いて同一である。なお、図9に示す近似解探索部140と限定抑止部113を組み合わせた構成とすること、すなわち実施例3と実施例4を組み合わせることも可能である。
 次に限定抑止部113の働きについて説明する。なお、限定抑止部113以外の実施例1又は実施例2と同一の要素については実施例1又は実施例2と同様の働きをするため説明を省略する。
 限定抑止部113は、既固定タスク数が少ないときに、限定部112による限定を行わないよう抑止する。抑止を行う既固定タスク数には、総タスク数から算出する方法(例えば総タスク数の1/2とするなど)、あらかじめ総タスク数ごとに抑止が効果的に働く既固定タスク数を計測した値を記録しておく方法等の任意の方法を利用することができる。
 次に、図12のフローチャートを用いて、実施例4における自動最適化システムの動作について説明する。
 なお、便宜上ここでは2コアのシステムを想定した動作を記述しているが、本手法は2コアに限定されるものではなく、3コア以上のシステムにおいても同様に適用が可能である。
 まずステップS31において、限定抑止部113は既固定タスク数が規定値を超えたか否かを判定する。超えていない場合(ステップS31においてNo)はステップS32に進む。超えている場合は(ステップS31においてYes)ステップS34に進む。
 既固定タスク数が規定値を超えていない場合、分枝部111はステップS32において、次に固定するタスクのコア配置を0とした子問題を生成する。このとき生成された子問題は、ここで述べている動作と同様に図12のフローチャートに基づいた処理を行い、限定に関する処理は行わない。つまり、子問題の生成のみを行う。引き続き分枝部111はステップS33において、次に固定するタスクのコア配置を1とした子問題を生成する。生成された子問題は同様に図12のフローチャートに基づいた処理を行う。
 既固定タスク数が規定値を超えている場合、分枝部111はステップS34において、次に固定するタスクのコア配置を0とした子問題を生成する。生成された子問題は、ここで述べている動作とは異なり、実施例1などと同様に図6のフローチャートに基づいた処理を行う。つまり、この段階から限定部112による限定処理が開始される。引き続き分枝部111はステップS35において、次に固定するタスクのコア配置を1とした子問題を生成する。生成された子問題は同様に図6のフローチャートに基づいた処理を行う。
 次に、本発明の実施例4における効果を説明する。
 既固定タスク数が少ない状態では、その後未固定タスクが追加されることによる評価関数値の変動幅が大きい。このため、限定を行うために計算する、子問題が取り得る評価関数値の限界値として悲観的な値しか算出されない。そのため、限定による子問題の減少による高速化よりも限界値の計算を行うことによるオーバヘッドのほうが大きいことがある。そこで本発明の実施例4では、既固定タスク数が少ない子問題では限定処理を行わず、限界値を計算しないよう構成されている。これにより、限定効果が得られない既固定タスク数が少ない子問題での限界値計算オーバヘッドを無くすことが可能となり、最適化処理の高速化が可能となる。
 以上説明した本発明の実施形態が奏する効果をまとめると、以下のようになる。
 第1の効果は、スケジューリング可能な複数のタスク配置の中から性能がよい配置を探索可能なことである。
 その理由は、累積応答時間算出部によって、タスク配置候補の性能の良好さを表す指標である評価関数値を算出し、この評価関数値を用いて最適化を行うことにより、性能がよいタスク配置が得られるからである。
 第2の効果は、リアルタイムシステムにおいてシステムの安定性の観点から重要な指標である、デッドラインからの余裕度を大きくすることが可能なことである。
 その理由は、累積応答時間算出部によって、コア配置決定対象の複数のタスクの各々の応答時間(タスク起動が指示されてから、そのタスクの実行が終了するまでの時間)の累積値を算出し、コア配置決定対象の複数のタスクの各々の応答時間の累積値を最小化する最適化を行うことにより、各タスクの応答時間が極力短くなるタスク配置が得られるからである。
 第3の効果は、最適化に必要な時間を削減可能なことである。
 その第1の理由は、タスク配置候補の探索の際に、限定部によって不要なタスク配置候補を探索しないよう限定するからである。
 その第2の理由は、最適化前に、高速な近似解法によって比較的良好な解の候補を得て登録しておき、最適化の開始時には、その評価関数値を元に限定を行うからである。
 また、その第3の理由は、既固定タスク数が少ない子問題では限定処理を行わず、限界値を計算しないよう構成されていることから、限定効果が得られない既固定タスク数が少ない子問題での限界値計算オーバヘッドを無くすからである。
 なお、本発明の実施形態であるタスク配置最適化システムは、ハードウェアにより実現することもできるが、コンピュータをそのタスク配置最適化システムとして機能させるためのプログラムをコンピュータがコンピュータ読み取り可能な記録媒体から読み込んで実行することによっても実現することができる。
 また、本発明の実施形態によるタスク配置最適化方法は、ハードウェアにより実現することもできるが、コンピュータにその方法を実行させるためのプログラムをコンピュータがコンピュータ読み取り可能な記録媒体から読み込んで実行することによっても実現することができる。
 また、上述した実施形態は、本発明の好適な実施形態ではあるが、上記実施形態のみに本発明の範囲を限定するものではなく、本発明の要旨を逸脱しない範囲において種々の変更を施した形態での実施が可能である。
 本願は、日本の特願2010-034736(2010年2月19日に出願)に基づいたものであり、又、特願2010-034736に基づくパリ条約の優先権を主張するものである。特願2010-034736の開示内容は、特願2010-034736を参照することにより本明細書に援用される。 本発明の代表的な実施の形態が詳細に述べられたが、様々な変更(changes)、置き換え(substitutions)及び選択(alternatives)が請求項で定義された発明の精神と範囲から逸脱することなくなされることが理解されるべきである。また、仮にクレームが出願手続きにおいて補正されたとしても、クレームされた発明の均等の範囲は維持されるものと発明者は意図する。
 上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
 (付記1) 複数のコアを有するマルチコア向けのタスク配置最適化システムにおいて、
 コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出部と、
 前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索部と、
 前記探索部により探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持部と、
 を備えることを特徴とするタスク配置最適化システム。
 (付記2) 付記1に記載のタスク配置最適化システムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、既にコアに配置したタスクを用いて算出した前記評価関数値を用いて前記限界値を算出する既固定タスク累積応答時間算出指示部を有することを特徴とするタスク配置最適化システム。
 (付記3) 付記1に記載のタスク配置最適化システムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、
 各コア内で最低優先度の既にコアに配置したタスクである既固定タスクの応答時間をそれぞれのコアについて比較して、当該比較の結果最も短い応答時間に残りのタスク数を乗じることで限界値を算出する未固定タスク最短応答時間積算部を有することを特徴とするタスク配置最適化システム。
 (付記4) 付記1に記載のタスク配置最適化システムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、
 まだ配置を固定されていないタスクである未固定タスクの実行時間を全て合計することで限界値を算出する未固定タスク実行時間合計部を有することを特徴とするタスク配置最適化システム。
 (付記5) 付記1に記載のタスク配置最適化システムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、
 まだ配置を固定されていないタスクである未固定タスクの実行時間を昇順にソートし、未固定タスク1つ毎に、昇順にソートされた未固定タスクの実行時間に、未固定タスク数÷コア数の小数点以下を繰り上げたものを乗じた値を積算し、未固定タスク数を1つ減じる操作を全ての未固定タスクについて繰り返すことで限界値を算出する未固定タスク実行時間積算部を有することを特徴とするタスク配置最適化システム。
 (付記6) 前記探索部は、既に配置を固定したタスクの数が規定値より少ない場合には、前記限定部による限定を行わないよう抑止する限定抑止部を更に備えることを特徴とする付記2乃至5の何れかに記載のタスク配置最適化システム。
 (付記7) 予め近似解探索を行うことにより、前記探索部より高速にタスク配置候補を発見しておき、発見したタスク配置候補を前記高評価候補保持部に登録する近似解探索部を更に備えることを特徴とする付記1乃至6の何れかに記載のタスク配置最適化システム。
 (付記8) 複数のコアを有するマルチコア向けのタスク配置最適化方法において、
 コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出ステップと、
 前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索ステップと、
 前記探索ステップにより探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持ステップと、
 を備えることを特徴とするタスク配置最適化方法。
 (付記9) 付記8に記載のタスク配置最適化方法において、
 前記探索ステップは、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝ステップと、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定ステップと、を含み、
 前記限定ステップは、既にコアに配置したタスクを用いて算出した前記評価関数値を用いて前記限界値を算出する既固定タスク累積応答時間算出指示ステップを含むことを特徴とするタスク配置最適化方法。
 (付記10) 付記8に記載のタスク配置最適化方法において、
 前記探索ステップは、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝ステップと、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定ステップと、を含み、
 前記限定ステップは、
 各コア内で最低優先度の既にコアに配置したタスクである既固定タスクの応答時間をそれぞれのコアについて比較して、当該比較の結果最も短い応答時間に残りのタスク数を乗じることで限界値を算出する未固定タスク最短応答時間積算ステップを含むことを特徴とするタスク配置最適化方法。
 (付記11) 付記8に記載のタスク配置最適化方法において、
 前記探索ステップは、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝ステップと、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定ステップと、を含み、
 前記限定ステップは、
 まだ配置を固定されていないタスクである未固定タスクの実行時間を全て合計することで限界値を算出する未固定タスク実行時間合計ステップを含むことを特徴とするタスク配置最適化方法。
 (付記12) 付記8に記載のタスク配置最適化方法において、
 前記探索ステップは、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝ステップと、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定ステップと、を含み、
 前記限定ステップは、
 まだ配置を固定されていないタスクである未固定タスクの実行時間を昇順にソートし、未固定タスク1つ毎に、昇順にソートされた未固定タスクの実行時間に、未固定タスク数÷コア数の小数点以下を繰り上げたものを乗じた値を積算し、未固定タスク数を1つ減じる操作を全ての未固定タスクについて繰り返すことで限界値を算出する未固定タスク実行時間積算ステップを含むことを特徴とするタスク配置最適化方法。
 (付記13) 前記探索ステップは、既に配置を固定したタスクの数が規定値より少ない場合には、前記限定ステップによる限定を行わないよう抑止する限定抑止ステップを更に含むことを特徴とする付記9乃至12の何れかに記載のタスク配置最適化方法。
 (付記14) 予め近似解探索を行うことにより、前記探索ステップより高速にタスク配置候補を発見しておき、発見したタスク配置候補を前記高評価候補保持ステップに登録する近似解探索ステップを更に含むことを特徴とする付記8乃至13の何れかに記載のタスク配置最適化方法。
 (付記15) 複数のコアを有するマルチコア向けのタスク配置最適化システムに組み込まれるタスク配置最適化プログラムにおいて、
 コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出部と、
 前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索部と、
 前記探索部により探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持部と、
 を備えるシステムとしてコンピュータを機能させることを特徴とするタスク配置最適化プログラム。
 (付記16) 付記15に記載のタスク配置最適化プログラムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、既にコアに配置したタスクを用いて算出した前記評価関数値を用いて前記限界値を算出する既固定タスク累積応答時間算出指示部を有するタスク配置最適化システムとしてコンピュータを機能させることを特徴とするタスク配置最適化プログラム。
 (付記17) 付記15に記載のタスク配置最適化プログラムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、
 各コア内で最低優先度の既にコアに配置したタスクである既固定タスクの応答時間をそれぞれのコアについて比較して、当該比較の結果最も短い応答時間に残りのタスク数を乗じることで限界値を算出する未固定タスク最短応答時間積算部を有することを特徴とするタスク配置最適化プログラム。
 (付記18) 付記15に記載のタスク配置最適化プログラムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、
 まだ配置を固定されていないタスクである未固定タスクの実行時間を全て合計することで限界値を算出する未固定タスク実行時間合計部を有することを特徴とするタスク配置最適化プログラム。
 (付記19) 付記15に記載のタスク配置最適化プログラムにおいて、
 前記探索部は、
 優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
 前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
 前記限定部は、
 まだ配置を固定されていないタスクである未固定タスクの実行時間を昇順にソートし、未固定タスク1つ毎に、昇順にソートされた未固定タスクの実行時間に、未固定タスク数÷コア数の小数点以下を繰り上げたものを乗じた値を積算し、未固定タスク数を1つ減じる操作を全ての未固定タスクについて繰り返すことで限界値を算出する未固定タスク実行時間積算部を有することを特徴とするタスク配置最適化プログラム。
 (付記20) 前記探索部は、既に配置を固定したタスクの数が規定値より少ない場合には、前記限定部による限定を行わないよう抑止する限定抑止部を更に備えることを特徴とする付記16乃至19の何れかに記載のタスク配置最適化プログラム。
 (付記21) 予め近似解探索を行うことにより、前記探索部より高速にタスク配置候補を発見しておき、発見したタスク配置候補を前記高評価候補保持部に登録する近似解探索部を前記タスク配置最適化システムが更に備えることを特徴とする付記15乃至20の何れかに記載のタスク配置最適化プログラム。
 本発明は、マルチコア構成をとるハードウェアを用いた機器に向けた開発ツール等に好適である。

Claims (9)

  1.  複数のコアを有するマルチコア向けのタスク配置最適化システムにおいて、
     コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出部と、
     前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索部と、
     前記探索部により探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持部と、
     を備えることを特徴とするタスク配置最適化システム。
  2.  請求項1に記載のタスク配置最適化システムにおいて、
     前記探索部は、
     優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
     前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
     前記限定部は、既にコアに配置したタスクを用いて算出した前記評価関数値を用いて前記限界値を算出する既固定タスク累積応答時間算出指示部を有することを特徴とするタスク配置最適化システム。
  3.  請求項1に記載のタスク配置最適化システムにおいて、
     前記探索部は、
     優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
     前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
     前記限定部は、
     各コア内で最低優先度の既にコアに配置したタスクである既固定タスクの応答時間をそれぞれのコアについて比較して、当該比較の結果最も短い応答時間に残りのタスク数を乗じることで限界値を算出する未固定タスク最短応答時間積算部を有することを特徴とするタスク配置最適化システム。
  4.  請求項1に記載のタスク配置最適化システムにおいて、
     前記探索部は、
     優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
     前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
     前記限定部は、
     まだ配置を固定されていないタスクである未固定タスクの実行時間を全て合計することで限界値を算出する未固定タスク実行時間合計部を有することを特徴とするタスク配置最適化システム。
  5.  請求項1に記載のタスク配置最適化システムにおいて、
     前記探索部は、
     優先度が高いタスクから低いタスクへと順にタスクをコアに配置することにより子問題を生成する分枝部と、
     前記子問題が取り得る前記評価関数値の限界値を算出し、算出した当該評価関数値の限界値を用いて不要なコア配置候補探索をしないよう限定する限定部と、を有し、
     前記限定部は、
     まだ配置を固定されていないタスクである未固定タスクの実行時間を昇順にソートし、未固定タスク1つ毎に、昇順にソートされた未固定タスクの実行時間に、未固定タスク数÷コア数の小数点以下を繰り上げたものを乗じた値を積算し、未固定タスク数を1つ減じる操作を全ての未固定タスクについて繰り返すことで限界値を算出する未固定タスク実行時間積算部を有することを特徴とするタスク配置最適化システム。
  6.  前記探索部は、既に配置を固定したタスクの数が規定値より少ない場合には、前記限定部による限定を行わないよう抑止する限定抑止部を更に備えることを特徴とする請求項2乃至5の何れか1項に記載のタスク配置最適化システム。
  7.  予め近似解探索を行うことにより、前記探索部より高速にタスク配置候補を発見しておき、発見したタスク配置候補を前記高評価候補保持部に登録する近似解探索部を更に備えることを特徴とする請求項1乃至6の何れか1項に記載のタスク配置最適化システム。
  8.  複数のコアを有するマルチコア向けのタスク配置最適化方法において、
     コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出ステップと、
     前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索ステップと、
     前記探索ステップにより探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持ステップと、
     を備えることを特徴とするタスク配置最適化方法。
  9.  複数のコアを有するマルチコア向けのタスク配置最適化システムに組み込まれるタスク配置最適化プログラムにおいて、
     コア配置決定対象である複数のタスク各々の応答時間を算出し、算出した当該応答時間の累積値を、タスク配置の良好さを表す指標である評価関数値として出力する累積応答時間算出部と、
     前記評価関数値に基づいて、良好な評価関数値が算出されるタスク配置を探索する探索部と、
     前記探索部により探索された、複数のタスク配置候補のうち評価関数値が良好であった候補を保持する高評価候補保持部と、
     を備えるシステムとしてコンピュータを機能させることを特徴とするタスク配置最適化プログラム。
PCT/JP2011/052084 2010-02-19 2011-02-02 リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラム WO2011102219A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2012500546A JPWO2011102219A1 (ja) 2010-02-19 2011-02-02 リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラム
US13/579,865 US8887165B2 (en) 2010-02-19 2011-02-02 Real time system task configuration optimization system for multi-core processors, and method and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010034736 2010-02-19
JP2010-034736 2010-02-19

Publications (1)

Publication Number Publication Date
WO2011102219A1 true WO2011102219A1 (ja) 2011-08-25

Family

ID=44482812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/052084 WO2011102219A1 (ja) 2010-02-19 2011-02-02 リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラム

Country Status (3)

Country Link
US (1) US8887165B2 (ja)
JP (1) JPWO2011102219A1 (ja)
WO (1) WO2011102219A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013094156A1 (ja) * 2011-12-19 2013-06-27 日本電気株式会社 タスク配置最適化システム、タスク配置最適化方法、及びタスク配置最適化プログラム
WO2015092873A1 (ja) * 2013-12-18 2015-06-25 株式会社日立製作所 情報処理システム及び情報処理方法
CN109783224A (zh) * 2018-12-10 2019-05-21 平安科技(深圳)有限公司 基于负载调配的任务分配方法、装置及终端设备
JP7193771B1 (ja) 2021-06-30 2022-12-21 三菱電機株式会社 スケジューリング方法及びスケジューリング設計支援装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5786863B2 (ja) * 2010-10-28 2015-09-30 日本電気株式会社 タスク配置最適化システム、タスク配置最適化方法、及びタスク配置最適化プログラム
US9824130B1 (en) * 2013-12-13 2017-11-21 Open Text Corporation Optimizing synchronization of enterprise content management systems
US9323574B2 (en) * 2014-02-21 2016-04-26 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Processor power optimization with response time assurance
TR201608894A3 (tr) * 2016-06-27 2018-03-21 Tusas Tuerk Havacilik Ve Uzay Sanayii Anonim Sirketi Bir gerçek zamanlı çalışma yöntemi.
CN109918195B (zh) * 2019-01-18 2023-06-20 华南理工大学 基于热感知动态任务迁移的众核系统处理器资源调度方法
US11249801B2 (en) * 2019-04-11 2022-02-15 Mastercard International Incorporated Flexible computing job scheduling systems and methods
CN112559032B (zh) * 2019-09-25 2023-06-13 无锡江南计算技术研究所 基于循环段的众核程序重构方法
EP3805924A1 (en) 2019-10-11 2021-04-14 Unify Patente GmbH & Co. KG Method of scheduling an additional new processing task to be executed by a processor, scheduler, and central processing unit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09218861A (ja) * 1996-02-08 1997-08-19 Fuji Xerox Co Ltd スケジューラ
JP2002278945A (ja) * 2001-03-21 2002-09-27 Nec Corp マルチプロセッサ構成の計算機間におけるトランザクション負荷分散方法及び方式並びにプログラム
JP2007018268A (ja) * 2005-07-07 2007-01-25 Sumitomo Heavy Ind Ltd タスクスケジューリング方法、タスクスケジューリング装置、及びタスクスケジューリングプログラム

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07121486A (ja) 1993-10-21 1995-05-12 Hitachi Ltd 問題解決装置
US6957431B2 (en) * 2001-02-13 2005-10-18 International Business Machines Corporation System for incrementally computing the maximum cost extension allowable for subsequent execution of each task using fixed percentage of the associated cost
JP3914230B2 (ja) 2004-11-04 2007-05-16 株式会社東芝 プロセッサシステム及びその制御方法
GB0519981D0 (en) * 2005-09-30 2005-11-09 Ignios Ltd Scheduling in a multicore architecture
JP2007133723A (ja) * 2005-11-11 2007-05-31 Hitachi Ltd マルチプロセッサ、タスクスケジューリング方法、及びコンパイラ
JP4931220B2 (ja) * 2007-03-12 2012-05-16 インターナショナル・ビジネス・マシーンズ・コーポレーション 検出装置、システム、プログラムおよび検出方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09218861A (ja) * 1996-02-08 1997-08-19 Fuji Xerox Co Ltd スケジューラ
JP2002278945A (ja) * 2001-03-21 2002-09-27 Nec Corp マルチプロセッサ構成の計算機間におけるトランザクション負荷分散方法及び方式並びにプログラム
JP2007018268A (ja) * 2005-07-07 2007-01-25 Sumitomo Heavy Ind Ltd タスクスケジューリング方法、タスクスケジューリング装置、及びタスクスケジューリングプログラム

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013094156A1 (ja) * 2011-12-19 2013-06-27 日本電気株式会社 タスク配置最適化システム、タスク配置最適化方法、及びタスク配置最適化プログラム
JPWO2013094156A1 (ja) * 2011-12-19 2015-04-27 日本電気株式会社 タスク配置最適化システム、タスク配置最適化方法、及びタスク配置最適化プログラム
US9535757B2 (en) 2011-12-19 2017-01-03 Nec Corporation Task allocation optimizing system, task allocation optimizing method and task allocation optimizing program
WO2015092873A1 (ja) * 2013-12-18 2015-06-25 株式会社日立製作所 情報処理システム及び情報処理方法
CN109783224A (zh) * 2018-12-10 2019-05-21 平安科技(深圳)有限公司 基于负载调配的任务分配方法、装置及终端设备
CN109783224B (zh) * 2018-12-10 2022-10-14 平安科技(深圳)有限公司 基于负载调配的任务分配方法、装置及终端设备
JP7193771B1 (ja) 2021-06-30 2022-12-21 三菱電機株式会社 スケジューリング方法及びスケジューリング設計支援装置
WO2023276075A1 (ja) * 2021-06-30 2023-01-05 三菱電機株式会社 スケジューリング方法及びスケジューリング設計支援装置

Also Published As

Publication number Publication date
US20120331474A1 (en) 2012-12-27
US8887165B2 (en) 2014-11-11
JPWO2011102219A1 (ja) 2013-06-17

Similar Documents

Publication Publication Date Title
WO2011102219A1 (ja) リアルタイムシステム用マルチコア向けタスク配置最適化システム、その方法及びそのプログラム
US10402225B2 (en) Tuning resources based on queuing network model
Chen et al. Improving MapReduce performance using smart speculative execution strategy
US9875135B2 (en) Utility-optimized scheduling of time-sensitive tasks in a resource-constrained environment
Li et al. Work stealing for interactive services to meet target latency
Ibrahim et al. Handling partitioning skew in mapreduce using leen
US8250557B2 (en) Configuring a dependency graph for dynamic by-pass instruction scheduling
JP2008547106A (ja) 検索用バックオフメカニズム
Jeon et al. TPC: Target-driven parallelism combining prediction and correction to reduce tail latency in interactive services
Liu et al. Preemptive hadoop jobs scheduling under a deadline
JP6659724B2 (ja) 並列プロセッサカーネルのディスパッチサイズのコンカレンシーファクタを決定するシステム及び方法
US20120054762A1 (en) Scheduling apparatus and method for a multicore device
Wang et al. A fast work-efficient sssp algorithm for gpus
JP2017211788A (ja) 情報処理装置、ジョブ投入方法、およびジョブ投入プログラム
US8196146B2 (en) Information processing apparatus, parallel processing optimization method, and program
Fu et al. Optimizing speculative execution in spark heterogeneous environments
US10599472B2 (en) Information processing apparatus, stage-out processing method and recording medium recording job management program
US9588817B2 (en) Scheduling method and scheduling system for assigning application to processor
KR102195886B1 (ko) 분산 처리 시스템 및 이의 동작 방법
Marinho et al. LABAREDA: a predictive and elastic load balancing service for cloud-replicated databases
Tang et al. A network load perception based task scheduler for parallel distributed data processing systems
JP5983623B2 (ja) タスク配置装置及びタスク配置方法
Tanaka et al. Disk cache-aware task scheduling for data-intensive and many-task workflow
Lin et al. Impact of MapReduce policies on job completion reliability and job energy consumption
Liu et al. A survey of speculative execution strategy in MapReduce

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: 11744507

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012500546

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 13579865

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 11744507

Country of ref document: EP

Kind code of ref document: A1