WO2022144973A1 - スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム - Google Patents

スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム Download PDF

Info

Publication number
WO2022144973A1
WO2022144973A1 PCT/JP2020/049139 JP2020049139W WO2022144973A1 WO 2022144973 A1 WO2022144973 A1 WO 2022144973A1 JP 2020049139 W JP2020049139 W JP 2020049139W WO 2022144973 A1 WO2022144973 A1 WO 2022144973A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
schedule
tasks
executed
run
Prior art date
Application number
PCT/JP2020/049139
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 JP2021529328A priority Critical patent/JP7012905B1/ja
Priority to PCT/JP2020/049139 priority patent/WO2022144973A1/ja
Priority to TW110114881A priority patent/TW202226085A/zh
Publication of WO2022144973A1 publication Critical patent/WO2022144973A1/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

Definitions

  • the present disclosure relates to a technique for generating a schedule for executing a plurality of tasks in a multi-core processor having a plurality of cores.
  • the real-time system is a computer system that is subject to time constraints that the processing of the task must be completed by the deadline, which is the time limit determined for each task. Therefore, in a real-time system, it is necessary to allocate an appropriate processor execution time to each task so that the execution completion time of each task does not exceed the deadline. In other words, it is necessary to allocate an appropriate processor execution time to each task so as to satisfy the deadline constraint, which is the constraint to complete the task by the deadline. Allocating an appropriate processor execution time to a task in this way is called real-time scheduling. Further, in the following, when the task execution completion time exceeds the deadline, it is referred to as a deadline miss.
  • multi-core processors have also been adopted for real-time systems. By processing multiple tasks in parallel using a multi-core processor, it is expected that the calculation throughput will increase and the processing time will decrease.
  • the response time is the time from the instruction to start the task to the completion of the execution of the task.
  • the execution time of a plurality of periodic tasks, the period, and the deadline are input, and the cumulative value of the response time of all the tasks is used as the evaluation value, and the core allocation that minimizes the evaluation value is searched.
  • the execution time of the target program may be longer than when the target program is executed independently due to the conflict of computer resources with the programs executed simultaneously in other cores.
  • a long execution time may be referred to as performance deterioration.
  • Typical examples of computer resources include shared caches and memory buses. The mechanism of performance degradation will be explained using a shared cache error as an example. When a task uses a shared cache, the capacity of the shared cache that can be used by tasks executed in other cores at the same time decreases, and performance degradation occurs due to an increase in cache misses.
  • the schedule generator is A schedule generator that generates a schedule for executing multiple tasks on a multi-core processor with multiple cores.
  • the Co-run influence degree when each of the plurality of tasks is the task to be executed, and the execution time when the task to be executed is executed independently is compared with the single execution time of the execution target.
  • a characteristic data acquisition unit that acquires characteristic data indicating the degree of Co-run influence, which is the degree to which the execution time becomes longer when a task is executed at the same time as other tasks.
  • a schedule generation unit for generating a schedule for executing the plurality of tasks is provided in consideration of the Co-run influence degree for each of the plurality of tasks indicated by the characteristic data acquired by the characteristic data acquisition unit.
  • a schedule for executing a plurality of tasks is generated in consideration of the degree of influence of Co-run. This makes it possible to generate an appropriate schedule.
  • FIG. The block diagram of the schedule generation system 100 which concerns on Embodiment 1.
  • FIG. The hardware configuration diagram of the schedule generation apparatus 10 which concerns on Embodiment 1.
  • FIG. The hardware block diagram of the measuring apparatus 50 which concerns on Embodiment 1.
  • FIG. The figure which shows the configuration example of the processor 51 which concerns on Embodiment 1.
  • FIG. An explanatory diagram of terms used in the description of the operation of the schedule generation system 100 according to the first embodiment.
  • the flowchart which shows the flow of operation of the measuring apparatus 50 which concerns on Embodiment 1.
  • the figure shows the characteristic data and task setting information which concerns on Embodiment 1.
  • the flowchart which shows the flow of operation of the problem generation part 23 which concerns on Embodiment 1.
  • FIG. The figure which shows the example of the schedule which concerns on Embodiment 3.
  • the schedule generation system 100 includes a schedule generation device 10 and a measurement device 50.
  • the schedule generation device 10 and the measurement device 50 are connected to each other via a transmission line 90.
  • the schedule generation device 10 generates a schedule for executing a task by inputting task setting information such as the number of cores of the execution system, a task cycle and a deadline, and characteristic data indicating performance characteristics measured by the measuring device 50. It is a computer to do.
  • the schedule generation device 10 includes a characteristic data acquisition unit 21 and a schedule generation unit 22 as functional components.
  • the schedule generation unit 22 includes a problem generation unit 23 and a problem solving unit 24.
  • the problem generation unit 23 includes an influence constraint generation unit 25, a deadline constraint generation unit 26, a core number constraint generation unit 27, and an objective function generation unit 28.
  • the measuring device 50 is a computer having the same or a similar configuration as the execution system, which is a real-time system in which the task for which the schedule is generated by the schedule generation device 10 is finally executed.
  • the measuring device 50 takes a task execution file group as an input and measures the performance characteristics of each task in the real-time system.
  • the measuring device 50 includes an execution time measuring unit 61 and a characteristic data measuring unit 62 as functional components.
  • the hardware configuration of the schedule generation device 10 according to the first embodiment will be described with reference to FIG.
  • the schedule generator 10 includes hardware such as a processor 11, a memory 12, a storage 13, and a communication interface 14.
  • the processor 11 is connected to other hardware via the signal line 15 and controls these other hardware.
  • the hardware configuration of the measuring device 50 according to the first embodiment will be described with reference to FIG.
  • the measuring device 50 includes hardware of a processor 51, a memory 52, a storage 53, and a communication interface 54.
  • the processor 51 is connected to other hardware via the signal line 55 and controls these other hardware.
  • Processors 11 and 51 are ICs (Integrated Circuits) that perform processing. Specific examples of the processors 11 and 51 are a CPU (Central Processing Unit), a DSP (Digital Signal Processor), and a GPU (Graphics Processing Unit).
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • GPU Graphics Processing Unit
  • the memories 12 and 52 are storage devices for temporarily storing data. Specific examples of the memories 12 and 52 are SRAM (Static Random Access Memory) and DRAM (Dynamic Random Access Memory).
  • the storages 13 and 53 are storage devices for storing data.
  • the storages 13 and 53 are ROMs (Read Only Memory).
  • the storages 13 and 53 include SD (registered trademark, Secure Digital) memory card, CF (CompactFlash, registered trademark), NAND flash, flexible disk, optical disk, compact disk, Blu-ray (registered trademark) disk, and DVD (Digital Versaille Disk). ) May be a portable recording medium.
  • Communication interfaces 14 and 54 are interfaces for communicating with an external device. Specific examples of the communication interfaces 14 and 54 are Ethernet (registered trademark), USB (Universal Serial Bus), and HDMI (registered trademark, High-Definition Multimedia Interface) ports.
  • each functional component of the schedule generator 10 are realized by software.
  • the storage 13 stores a program that realizes the functions of each functional component of the schedule generation device 10. This program is read into the memory 12 by the processor 11 and executed by the processor 11. As a result, the functions of each functional component of the schedule generation device 10 are realized.
  • each functional component of the measuring device 50 is realized by software.
  • the storage 53 stores a program that realizes the functions of each functional component of the measuring device 50. This program is read into the memory 52 by the processor 51 and executed by the processor 51. As a result, the functions of each functional component of the measuring device 50 are realized.
  • the processor 51 includes a plurality of cores 511.
  • the processor 51 includes n cores 511 from cores 511-1 to 511-n. Further, the processor 51 includes a shared cache 512 commonly used by each core 511.
  • the measuring device 50 is not limited to the configurations shown in FIGS. 3 and 4.
  • the measuring device 50 may be a configuration of a general real-time system including a multi-core processor, or may be a simulator having a virtual configuration shown in FIGS. 3 and 4.
  • the operation of the schedule generation system 100 according to the first embodiment will be described with reference to FIGS. 5 to 10.
  • the operation procedure of the schedule generation system 100 according to the first embodiment corresponds to the schedule generation method according to the first embodiment.
  • the program that realizes the operation of the schedule generation system 100 according to the first embodiment corresponds to the schedule generation program according to the first embodiment.
  • the task is a periodic task that is repeatedly executed at a fixed cycle.
  • the execution unit of each cycle of a task is called a job.
  • the time when the task becomes ready for execution is called the release time. Jobs corresponding to that cycle can be started at any time after the release time.
  • Being able to start execution means that processing can be started by the processor of the execution system.
  • the execution time is the time from the start of execution of the job to the completion of execution. However, if the execution right is transferred to another task or interrupt, that time is not included in the execution time.
  • the execution time of a task is set to a unique value by statistical processing from the execution time of each job.
  • the longest value (worst value) of the job execution time is taken as the execution time.
  • the time indicating the deadline of each job is called the absolute deadline.
  • the time from the release time to the absolute deadline is called the relative deadline.
  • the execution time is not limited to the worst value, and may be a percentile or the like.
  • Step S11 Processing end determination processing
  • the execution time measurement unit 61 determines whether or not the measurement has been completed for all the tasks included in the task execution file group.
  • a task execution file group is a set of files in an executable format of all tasks to be scheduled.
  • the execution time measurement unit 61 advances the process to step S12 when there are remaining tasks for which measurement has not been completed.
  • the execution time measurement unit 61 ends the process when the measurement is completed for all the tasks.
  • Step S12 Execution time measurement process
  • the execution time measurement unit 61 selects one task whose measurement has not been completed as the task to be executed.
  • the execution time measuring unit 61 measures the execution time when the task to be executed is executed independently as the independent execution time. That is, the execution time measuring unit 61 measures the execution time when only the task to be executed is executed without executing the other task in the other core 511 as the independent execution time.
  • the execution time is one execution time of the periodic task, and the longest measured one (worst execution time) is used.
  • Step S13 Co-run selection process
  • the execution time measuring unit 61 simultaneously executes the task to be executed selected in step S12 and one task other than the task to be executed on separate cores 511, and measures the execution time of the task to be executed. .. Executing at the same time is called Co-run.
  • the characteristic data measurement unit 62 calculates the Co-run influence degree, which is the influence degree on the execution target task, for each task co-runned with the task to be executed.
  • the characteristic data measurement unit 62 selects the task having the largest Co-run influence as the Co-run task for measurement. Further, the characteristic data measurement unit 62 sets the largest Co-run influence degree to the Co-run influence degree of the task to be calculated when the number of Co-run tasks is 1.
  • the Co-run influence degree RX with X tasks is defined by the equation (1).
  • RX X tasks and execution time at Co-run / single execution time
  • the Co-run influence degree is the single execution time, which is the execution time when the task to be executed is executed independently.
  • the execution time becomes long.
  • the Co-run influence degree R1 was calculated when the number of tasks to be co-run was one.
  • the Co-run influence degree RX is calculated for each of the number of tasks to be co-run from 2 to the number of cores-1.
  • the characteristic data measurement unit 62 needs to select a Co-run task for measurement for each task.
  • Step S14 Sensitive task determination process
  • the characteristic data measurement unit 62 determines that the task to be executed is a sensitive task.
  • the sensitive task is a task in which the execution time of the other task tends to be long when the task is co-run with the other task.
  • a task that uses a large amount of shared cache can be considered.
  • the characteristic data measurement unit 62 determines whether or not the task is a sensitive task based on the degree of influence of the Co-run at the time of the Co-run with the Co-run task for measurement. However, the characteristic data measurement unit 62 determines whether the task to be executed is a sensitive task based on the average value or the median of the Co-run influence degree at the time of Co-run with each of the other tasks. It may be determined whether or not. Further, here, the characteristic data measurement unit 62 determines whether or not the task susceptible to Co-run from other tasks is a sensitive task based on the assumption that the task is likely to affect other tasks. Was judged. However, the characteristic data measurement unit 62 may measure the susceptibility to influence on other tasks again and determine the sensitive task.
  • Step S15 Calculation end determination process
  • the execution time measuring unit 61 determines whether or not the calculation of the Co-run influence degree is completed for all the number of tasks from the number of tasks to be co-run to the number of cores-1. If the number of tasks for which the calculation has not been completed remains, the execution time measuring unit 61 advances the process to step S16. On the other hand, the execution time measuring unit 61 returns the process to step S11 when the calculation is completed for all the number of tasks.
  • the execution time measurement unit 61 selects the number of tasks for which calculation has not been completed as the number of target tasks.
  • the execution time measurement unit 61 selects a combination of tasks of the number of target tasks in order from tasks other than the task to be executed, and the task to be executed and each task included in the selected combination are separated by a core 511. Execute at the same time and measure the execution time of the task to be executed.
  • the characteristic data measurement unit 62 calculates the Co-run influence degree, which is the influence degree on the execution target task, for the task of the combination of the execution target task and the Co-run.
  • the characteristic data measurement unit 62 sets the largest influence degree among the Co-run influence degrees for each combination as the Co-run influence degree of the task to be executed when the number of Co-run tasks is the number of target tasks.
  • the characteristic data acquisition unit 21 determines the independent execution time, the determination result of the sensitive task, and the Co-run influence degree for each Co-run task number.
  • the characteristic data indicating the above is acquired from the measuring device 50. Further, the characteristic data acquisition unit 21 acquires the number of cores of the execution system and the task setting information such as the task cycle and the deadline, which are input by the user operating the input device or the like.
  • the characteristic data and the task setting information are information as shown in FIG. 7. In FIG.
  • P is the independent execution time
  • D is the relative deadline
  • S is the period
  • Sens is the sensitive task determination. It means the result (Y: sensitive task, N: non-sensitive task), respectively.
  • the schedule generation unit 22 generates a schedule for executing a plurality of tasks in consideration of the Co-run influence degree for each of the plurality of tasks indicated by the characteristic data acquired by the characteristic data acquisition unit 21.
  • Step S21 Impact constraint generation process
  • the influence constraint generation unit 25 generates an influence reflection constraint for acquiring the number of times a task is co-run with a sensitive task in each cycle in the scheduling design result which is the solution of the optimization problem.
  • the influence constraint generation unit 25 generates an influence reflection constraint for defining the optimization variable ⁇ represented by the equation 11.
  • Creating a constraint means specifying a constraint for the linear programming problem solver (linear programming solver).
  • the optimization variable is a variable to be optimized in a linear programming problem. i and j are task IDs. t is the time of day.
  • n co is the number of sensitive tasks to be co-run, and 1 ⁇ n co ⁇ N c ⁇ 2.
  • Js is a set of sensitive tasks.
  • Nc is the number of cores in the execution system.
  • Z is an optimization variable that takes 1 if the task i is executed at time t and 0 if it is not executed.
  • ⁇ nco, i, t are optimization variables that take 1 if the number of sensitive tasks to be co -run with task i at time t is nco and task i is executed, otherwise 0. be. It is assumed that the time t is a discretized time and takes an integer value. The unit of discretization when the time is discretized is called a time step.
  • nco in ⁇ nco, i, t means n co .
  • nco is a subscript, it means nco .
  • the number 11 is a non-linear equation. Therefore, the influence constraint generation unit 25 generates a linear constraint equation of equation 12 as an impact reflection constraint, and defines an optimization variable ⁇ having the property of equation 11.
  • ⁇ nco, i, t are optimization variables satisfying 0 or 1.
  • ⁇ nco, i, t are optimization variables satisfying 0 or 1.
  • the influence constraint generation unit 25 expresses the constraint of the negative sign by converting it into a constraint using an inequality sign as follows. (Before conversion): A ⁇ B ⁇ (After conversion) (A ⁇ B) ⁇ (A> B)
  • the deadline constraint generation unit 26 uses the optimization variable ⁇ defined by the constraint for impact reflection to indicate that each of a plurality of tasks completes processing by the deadline when the Co-run impact degree is taken into consideration. Generate a deadline constraint.
  • the deadline constraint is a constraint that prevents each of the tasks from making a deadline mistake, taking into account the execution time that increases according to the number of times each of the tasks is co-runned with the sensitive task. be.
  • the deadline constraint generation unit 26 generates the linear constraint equation shown in Equation 15 as a deadline constraint.
  • k is a job ID.
  • S i and k are the k-th release times of task i.
  • Di and k are the kth absolute deadlines of task i.
  • P i is the independent execution time of the task i.
  • R nco and i are n co sensitive tasks of task i and the Co-run influence degree at the time of Co-run.
  • the release times S i and k and the absolute deadlines D i and k shall appear as multiples of the time steps, and thus become integer values.
  • the left side of the equation (1) of the equation 15 is the time when the task i is executed in a certain cycle.
  • the second term on the right side of the equation (1) of Eq. 15 corresponds to the increase in execution time due to Co-run. Therefore, in the equation (1) of Eq. 15, the execution time equal to or greater than the sum of the single execution time Pi of the task i and the increase in the execution time by the Co-run calculated using the Co-run influence degree is the task i. Is an expression that is allocated as the time to be executed.
  • the reason why the equation (1) of the number 15 is an inequality is that the Co-run influence degree includes the decimal point, and the second term on the right side may also include the decimal point, whereas the left side is an integer. be.
  • the deadline constraint generation unit 26 may add the linear constraint expression shown in Equation 16 to the deadline constraint so as not to give the task execution time more than necessary.
  • Equation (2) of the number 15 is an equation that the task is not executed at the time when the deadline is exceeded in each cycle.
  • Step S23 Core number constraint generation process
  • the core number constraint generation unit 27 generates a core number constraint indicating that the task is not executed at a degree of parallelism exceeding the number of cores of the execution system. Specifically, the core number constraint generation unit 27 generates the linear constraint equation shown in the equation 17 as the core number constraint. NT is the number of tasks to be scheduled.
  • the objective function generation unit 28 generates an objective function as shown in Equation 18.
  • the objective function shown in Equation 18 is an objective function that minimizes the total execution time, that is, the CPU usage rate.
  • the objective function is not limited to this.
  • the objective function generation unit 28 may, for example, generate an objective function that minimizes the margin time to the deadline, or may not generate the objective function itself.
  • the operation of the problem solving unit 24 according to the first embodiment will be described with reference to FIG. 9.
  • S31 Solution processing
  • the problem solving unit 24 is generated in step S24 with the influence reflection constraint generated in step S21, the deadline constraint generated in step S22, and the core number constraint generated in step S23 as constraints.
  • the existing method may be used for the calculation method of the solution of the linear programming problem.
  • step S32 Solution determination process
  • the problem solving unit 24 determines whether or not a solution has been obtained in step S31. If a solution is obtained, the problem-solving unit 24 advances the process to step S33. On the other hand, if the problem solving unit 24 does not obtain a solution, the process proceeds to step S34.
  • the problem solving unit 24 outputs the solution obtained in step S31, that is, the schedule, via the communication interface 14.
  • the output form may be a form of outputting as a character string to the console, a form of outputting as a character string to a file, or another form.
  • the problem solving unit 24 outputs a schedule table indicating whether or not each task is executed at each time. In FIG. 10, when a circle is shown in the column where the task and the time intersect, it means that the task is executed at that time, and when a blank is shown, the task is executed. It means that it will not be executed at that time.
  • the problem solving unit 24 outputs a message that the target task set cannot be scheduled in the execution system via the communication interface 14.
  • the output form may be a form of outputting as a character string to the console, a form of outputting as a character string to a file, or another form.
  • the schedule generation device 10 generates a schedule for executing a plurality of tasks in consideration of the degree of influence of Co-run. This makes it possible to generate an appropriate schedule. More specifically, the schedule generation device 10 according to the first embodiment considers the influence reflection constraint for reflecting the influence of the Co-run with the sensitive task and the influence reflected by the influence reflection constraint. Use the deadline constraint to protect the deadline above. This makes it possible to generate a schedule that does not cause a deadline mistake even if the execution time is extended by the Co-run task.
  • the execution time increases due to the performance deterioration caused by the Co-run task being executed in the core 1, and a deadline error occurs in the task A.
  • the conventional real-time scheduling method may cause a deadline error due to a decrease in performance due to computer resource contention with such a Co-run task.
  • the schedule generation device 10 since the schedule generation device 10 according to the first embodiment considers the degree of influence of Co-run, it is possible to generate a schedule that does not cause such a deadline error.
  • each functional component of the schedule generation device 10 is realized by software.
  • each functional component of the schedule generation device 10 may be realized by hardware. The difference between the first modification and the first embodiment will be described.
  • the schedule generator 10 When each functional component is realized by hardware, the schedule generator 10 includes an electronic circuit instead of the processor 11, the memory 12, and the storage 13.
  • the electronic circuit is a dedicated circuit that realizes the functions of each functional component, the memory 12, and the storage 13.
  • each functional component may be realized by one electronic circuit, or each functional component may be distributed and realized by a plurality of electronic circuits.
  • Modification 2> As a modification 2, some functional components may be realized by hardware, and other functional components may be realized by software.
  • the processor 11, the memory 12, the storage 13, and the electronic circuit are called processing circuits. That is, the function of each functional component is realized by the processing circuit.
  • Embodiment 2 In the first embodiment, the constraint equation is generated so as to accurately reflect the degree of influence of Co-run.
  • the second embodiment is different from the first embodiment in that the constraint conditions are relaxed as compared with the first embodiment. In the second embodiment, these different points will be described, and the same points will be omitted.
  • the influence constraint generation unit 25 generates the equations (1) and (2) of the equation 12 as the influence reflection constraints, and does not generate the equations (3) and (4).
  • the optimization variables ⁇ nco, i. t can be eliminated.
  • ⁇ nco, i, t may be overestimated.
  • the influence of Co-run is overestimated by the equation (1) of Eq. 15, but it does not violate the deadline constraint or the core number constraint. do not have.
  • Embodiment 3 In the first and second embodiments, it was assumed that only a single criticality level (sometimes referred to as CL) task exists.
  • the third embodiment is different from the first and second embodiments in that tasks of different criticity levels exist. In the third embodiment, these different points will be described, and the same points will be omitted. In the third embodiment, a case where a change is made to the first embodiment will be described. However, it is possible to make changes to the second embodiment.
  • the criticity level is set for each task according to the degree of influence at the time of deadline mistake, and there is a system in which multiple tasks with different criticity levels are mixed in the system.
  • a mixed criticity system Such a system is called a mixed criticity system, and a schedulerability determination method for the mixed criticity system has been proposed (for example, literature: Sanjoy Baruah, Steve Vestal, "Schedulability analysis of spectral system”). ..
  • the techniques described in this document have information that defines the worst execution time for each task in the system, corresponding to the criticality level of that task and all criticality levels, including other criticality levels. .. It is assumed that the execution time of each task has jitter, and the worst execution time for each criticality level is defined within the range of the execution time measured repeatedly in advance. The higher the criticality level, the larger the execution time is defined. That is, the higher the criticality level, the more pessimistic (longer) worst-case execution time is defined.
  • the task schedule for the mixed criticality system meets the scheduling policy of ensuring that if all tasks are completed within a certain criticality level execution time, tasks above that criticality level will meet the deadline constraint. In other words, a task with a criticality level lower than the criticality level of the target task does not have to meet the deadline.
  • the configuration of the schedule generation system 100 according to the third embodiment will be described with reference to FIG.
  • the schedule generation system 100 is different from the schedule generation system 100 shown in FIG. 1 in that the problem generation unit 23 of the schedule generation device 10 includes the inter-table constraint generation unit 29.
  • the function of the inter-table constraint generation unit 29 is realized by software or hardware like other functional components. Further, it differs from the schedule generation system 100 shown in FIG. 1 in that information indicating the criticality level for each of the plurality of tasks is given as input to the schedule generation device 10 and the measurement device 50.
  • step S41 is the same as the process of step S11 of FIG.
  • step S45 to step S48 is the same as the process from step S13 to step S16 in FIG.
  • Step S42 Level determination process
  • the execution time measurement unit 61 selects one task whose measurement has not been completed as the task to be executed.
  • the execution time measurement unit 61 determines whether or not the correction execution time of the task to be executed has been determined for all the criticity levels equal to or higher than the criticity level of the task to be executed.
  • the execution time measurement unit 61 advances the process to step S43 when the criticality level for which the correction execution time has not been determined remains. On the other hand, when the correction execution time is determined for all the criticity levels, the process proceeds to step S44.
  • Step S43 First execution time determination process
  • the execution time measurement unit 61 selects one criticity level for which the correction execution time has not been determined from among the criticity levels equal to or higher than the criticity level for the task to be executed.
  • the execution time measurement unit 61 determines the execution time when the task to be executed is executed independently at the criticality level to be determined as the correction execution time. For example, assume that the criticity level of the task to be executed is 2. Further, here, it is assumed that the larger the numerical value is, the higher the criticity level is. In this case, the correction execution time is determined for two or more criticity levels.
  • Step S44 Second execution time determination process
  • the execution time measurement unit 61 determines the correction execution time to be 0 for the criticity level lower than the criticity level for the task to be executed.
  • the method of determining the correction execution time corresponding to each criticity level does not matter as long as the following two conditions (1) and (2) are satisfied.
  • (1) The correction execution time is longer as the criticity level is higher. In other words, the higher the criticality level, the more pessimistic worst-case execution time is assumed.
  • (2) The correction execution time corresponding to the criticity level lower than the criticity level of the task is set to 0. Therefore, in step S43, the correction execution time is determined so as to satisfy the condition (1). For example, it is conceivable to measure the single execution time as in step S12 of FIG. 6 and multiply it by the correction coefficient for each criticity level to determine the correction execution time for each criticity level.
  • the characteristic data acquisition unit 21 determines the correction execution time, the determination result of the sensitive task, and the Co-run influence degree for each Co-run task number.
  • the characteristic data indicating the above is acquired from the measuring device 50. Further, the characteristic data acquisition unit 21 inputs the number of cores of the execution system, the task cycle, the deadline, and the task setting information such as the criticality level of each task, which are input by the user operating the input device or the like. get.
  • the characteristic data and the task setting information are information as shown in FIG. In FIG.
  • CL is the criticality level
  • D is the deadline
  • S is the cycle
  • Co-run influence degree and Sens mean sensitive task determination results (Y: sensitive task, N: non-sensitive task), respectively.
  • Step S51 Impact constraint generation process
  • the influence constraint generation unit 25 generates an influence reflection constraint for defining the optimization variable ⁇ represented by the equation 19.
  • l is the criticality level.
  • Li is the criticality level of task i .
  • Z i, l, and t are optimization variables that take 1 if the task i is executed at time t and 0 if the task i is not executed in the schedule table whose criticality level is l.
  • ⁇ nco, i, l, t is 1 if the number of sensitive tasks to be co-run with task i at time t is n co and the task i is executed in the schedule table with the criticality level l.
  • it is an optimization variable that takes 0.
  • a method of counting the number of sensitive tasks according to the third embodiment will be described with reference to FIG.
  • the number of cores of the execution system is 2
  • the criticity level of task a is 3
  • the criticism level of task b is 2
  • the criticism level of task c is 1.
  • the larger the value the higher the criticity level.
  • all tasks are sensitive tasks.
  • a schedule (schedule table) is generated for each criticity level, and the task execution time for the correction execution time is secured in the schedule table for each criticity level.
  • Equation (1) of Eq. 19 is a non-linear equation. Therefore, the influence constraint generation unit 25 generates a linear constraint equation of Eq. 20 as an influence reflection constraint, and defines an optimization variable ⁇ having the property of Eq. (1) of Eq. 19. ⁇ nco, i, l, t are optimization variables satisfying 0 or 1.
  • the equation (2) of the equation 19 is a non-linear equation. Therefore, the influence constraint generation unit 25 generates a linear constraint equation of equation 21 as an impact reflection constraint, and defines an optimization variable ⁇ having the property of equation (2) of equation 19. M co is any integer greater than the maximum of the other terms.
  • Step S52 Deadline constraint generation process
  • the deadline constraint generation unit 26 generates the linear constraint equation shown in Equation 22 as a deadline constraint.
  • P - i and l are correction execution times corresponding to the criticity level l of the task i.
  • " - " in P - i, l means that-is drawn on P.
  • Step S53 Core number constraint generation process
  • the core number constraint generation unit 27 generates the linear constraint equation shown in Equation 23 as a core number constraint.
  • the objective function generation unit 28 generates an objective function as shown in Equation 24.
  • the objective function shown in Equation 24 is an objective function that minimizes the total execution time, that is, the CPU usage rate.
  • the objective function is not limited to this.
  • the objective function generation unit 28 may minimize the CPU usage rate of the schedule table of the lowest criticality level. This is based on the assumption that the CPU usage corresponding to the lowest criticality level is the most frequent, and aims to maximize the effective CPU usage. Further, the objective function generation unit 28 may, for example, generate an objective function that minimizes the margin time to the deadline, or may not generate the objective function itself.
  • Step S55 Inter-table constraint generation process
  • the inter-table constraint generation unit 29 generates an inter-table constraint, which is a constraint for ensuring consistency between schedules of each criticity level. Specifically, the inter-table constraint generation unit 29 generates the linear constraint expression shown in Equation 25 as an inter-table constraint. l 1 and l 2 are certain criticity levels. t 1 and t 2 are certain times.
  • the run-time scheduler operates when executing a task in the execution system according to the schedule generated by the schedule generation device 10. As shown in FIG. 16, a schedule is generated for each criticity level, and the run-time scheduler controls which task is executed so that the tasks are not executed at the same time as the number of cores or more.
  • the run-time scheduler is activated at time step intervals and executes the processes of steps S61 to S63.
  • Step S61 Task identification process
  • the run-time scheduler refers to the schedule generated by the schedule generator 10 and identifies tasks that may be executed at the current time. In the case of the schedule table of FIG. 16, the tasks that may be executed at time 2 are task a, task b, and task c.
  • Step S62 Incomplete task identification process
  • the run-time scheduler identifies a task that has not been processed at the current time among the tasks identified in step S61.
  • Step S63 Execution matter granting process
  • the run-time scheduler grants execution rights in order from the task with the highest criticality level among the tasks specified in step S62. If the number of tasks specified in step S62 is equal to or greater than the number of cores, the task with a low criticality level may not be executed. However, this does not violate the scheduling policy of mixed criticity scheduling.
  • Each of the multiple criticality levels is the target criticity level, and each of the multiple tasks is the target task to be generated.
  • the inter-table constraint applies to the target criticity level schedule for the generated task with respect to the period until the processing for the generated task is completed in the schedule with the criticity level lower than the target criticity level. It is a constraint to be the same as the schedule of the criticality level higher than the criticality level of.
  • FIG. 18 shows an example of a problem that occurs when the inter-table constraint shown in Equation 25 is not provided.
  • FIG. 18 shows a High level table and a Low level table, which are schedules of two criticality levels, High and Low, for a task.
  • the run-time scheduler cannot determine if this task should be executed at time t. This is because, when executed, other tasks may not be able to be executed in the Low level table. As a result, even if this task is completed in the execution time corresponding to the Low level (3 time steps in FIG. 18), another task may make a deadline miss.
  • the problem solving unit 24 calculates the solution of the linear programming problem and generates a schedule.
  • a schedule table indicating whether or not each task is executed at each time is output for each criticality level.
  • a circle is shown in the column where the task and the time intersect, it means that the task is executed at that time, and when a blank is shown, the task is executed. It means that it will not be executed at that time.
  • the schedule generation device 10 according to the third embodiment generates a schedule for executing a plurality of tasks in consideration of the Co-run influence degree even when tasks of different criticity levels exist. .. This makes it possible to generate an appropriate schedule. More specifically, the schedule generation device 10 according to the third embodiment uses a constraint between tables to make the schedule consistent for each criticality level. This makes it possible to generate a schedule that satisfies the scheduling policy of mixed criticity scheduling while considering the degree of influence of Co-run.
  • schedule generation system 10 schedule generation device, 11 processor, 12 memory, 13 storage, 14 communication interface, 15 signal line, 21 characteristic data acquisition unit, 22 schedule generation unit, 23 problem generation unit, 24 problem solution unit, 25 influence Constraint generation unit, 26 deadline constraint generation unit, 27 core number constraint generation unit, 28 objective function generation unit, 29 inter-table constraint generation unit, 50 measuring device, 51 processor, 511 cores, 512 shared cache, 52 memory, 53 storage , 54 communication interface, 55 signal line, 61 execution time measurement unit, 62 characteristic data measurement unit, 90 transmission line.

Abstract

スケジュール生成装置(10)は、複数のコアを有するマルチコアプロセッサにおいて複数のタスクを実行するスケジュールを生成する。特性データ取得部(21)は、複数のタスクそれぞれを実行対象のタスクとした場合のCo-run影響度であって、実行対象のタスクを単独で実行した場合の実行時間である単独実行時間に対して、実行対象のタスクを他のタスクと同時に実行した場合の実行時間が長くなる度合であるCo-run影響度を示す特性データを取得する。スケジュール生成部(22)は、特性データが示す複数のタスクそれぞれについてのCo-run影響度を考慮して、複数のタスクを実行するスケジュールを生成する。

Description

スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム
 本開示は、複数のコアを有するマルチコアプロセッサにおいて複数のタスクを実行するスケジュールを生成する技術に関する。
 リアルタイムシステムは、タスク毎に決められた制限時刻であるデッドラインまでに必ず当該タスクの処理を完了させなければならないという時間的制約を受けたコンピュータシステムである。そのため、リアルタイムシステムでは、それぞれのタスクの実行完了時刻がデッドラインを超過しないように、それぞれのタスクに適切なプロセッサの実行時間を割り当てることが必要である。つまり、デッドラインまでにタスクを完了させる制約であるデッドライン制約を満たすように、それぞれのタスクに適切なプロセッサの実行時間を割り当てることが必要である。このように、タスクに適切なプロセッサの実行時間を割り当てることをリアルタイムスケジューリングと言う。また、以下では、タスクの実行完了時刻がデッドラインを超過することをデッドラインミスと呼ぶ。
 近年リアルタイムシステムに求められる機能の高度化により、リアルタイムシステムにおいてもマルチコアプロセッサが採用されてきている。マルチコアプロセッサを用いて複数のタスクを並列に処理することにより、演算スループットの増加と処理時間の低減とが期待できる。
 従来のマルチコアプロセッサ向けリアルタイムスケジューリングの方法として、タスクの応答時間の累積値を最小にするようなタスクのコア配置を求める技術が存在する(特許文献1参照)。応答時間とはタスクの起動が指示されてから、そのタスクの実行が完了するまでの時間である。この技術では、複数の周期タスクの実行時間と、周期と、デッドラインとを入力とし、全てのタスクの応答時間の累積値を評価値として、評価値が最小となるコア割当てが探索される。
国際公開第2011/10219号
 マルチコアプロセッサでは、他コアで同時に実行するプログラムとのコンピュータリソースの競合により、単独で対象のプログラムを実行した場合に比べて対象のプログラムの実行時間が長くなる場合がある。以下では、実行時間が長くなることを、性能劣化と呼ぶ場合がある。
 コンピュータリソースの典型的な例として、共有キャッシュ及びメモリバスが挙げられる。共有キャッシュミスを例に性能劣化のメカニズムを説明する。あるタスクが共有キャッシュを使用することにより、同時に他のコアで実行されるタスクが使用できる共有キャッシュの容量が低下し、キャッシュミスの増加による性能劣化が発生する。
 従来のマルチコアプロセッサ向けリアルタイムスケジューリングでは、他コアで同時にプログラムを実行することによる性能劣化が考慮されておらず、適切なスケジュールが生成できない恐れがあった。
 本開示は、適切なスケジュールを生成可能にすることを目的とする。
 本開示に係るスケジュール生成装置は、
 複数のコアを有するマルチコアプロセッサで複数のタスクを実行するスケジュールを生成するスケジュール生成装置であり、
 前記複数のタスクそれぞれを実行対象のタスクとした場合のCo-run影響度であって、前記実行対象のタスクを単独で実行した場合の実行時間である単独実行時間に対して、前記実行対象のタスクを他のタスクと同時に実行した場合の実行時間が長くなる度合であるCo-run影響度を示す特性データを取得する特性データ取得部と、
 前記特性データ取得部によって取得された前記特性データが示す前記複数のタスクそれぞれについての前記Co-run影響度を考慮して、前記複数のタスクを実行するスケジュールを生成するスケジュール生成部と
を備える。
 本開示では、Co-run影響度を考慮して、複数のタスクを実行するスケジュールを生成する。これにより、適切なスケジュールの生成が可能になる。
実施の形態1に係るスケジュール生成システム100の構成図。 実施の形態1に係るスケジュール生成装置10のハードウェア構成図。 実施の形態1に係る計測装置50のハードウェア構成図。 実施の形態1に係るプロセッサ51の構成例を示す図。 実施の形態1に係るスケジュール生成システム100の動作の説明で用いる用語の説明図。 実施の形態1に係る計測装置50の動作の流れを示すフローチャート。 実施の形態1に係る特性データ及びタスク設定情報を示す図。 実施の形態1に係る問題生成部23の動作の流れを示すフローチャート。 実施の形態1に係る問題求解部24の動作の流れを示すフローチャート。 実施の形態1に係るスケジュールの例を示す図。 実施の形態1に係る効果の説明図。 実施の形態3に係るスケジュール生成システム100の構成図。 実施の形態3に係る計測装置50の動作の流れを示すフローチャート。 実施の形態3に係る特性データ及びタスク設定情報を示す図。 実施の形態3に係る問題生成部23の動作の流れを示すフローチャート。 実施の形態3におけるセンシティブタスク数のカウント方法の説明図。 実行システムで動作する実行時スケジューラの動作の流れを示すフローチャート。 実施の形態3に係るテーブル間制約の必要性の説明図。 実施の形態3に係るスケジュールの例を示す図。
 実施の形態1.
 ***構成の説明***
 図1を参照して、実施の形態1に係るスケジュール生成システム100の構成を説明する。
 スケジュール生成システム100は、スケジュール生成装置10と、計測装置50とを備える。スケジュール生成装置10と計測装置50とは、伝送路90を介して接続されている。
 スケジュール生成装置10は、実行システムのコア数と、タスクの周期及びデッドラインといったタスク設定情報と、計測装置50で計測された性能特性を示す特性データとを入力として、タスクを実行するスケジュールを生成するコンピュータである。
 スケジュール生成装置10は、機能構成要素として、特性データ取得部21と、スケジュール生成部22とを備える。スケジュール生成部22は、問題生成部23と、問題求解部24とを備える。問題生成部23は、影響制約生成部25と、デッドライン制約生成部26と、コア数制約生成部27と、目的関数生成部28とを備える。
 計測装置50は、スケジュール生成装置10によってスケジュールが生成される対象のタスクが最終的に実行されるリアルタイムシステムである実行システムと同じ、又は、類似した構成のコンピュータである。計測装置50は、タスク実行ファイル群を入力として、各タスクのリアルタイムシステムでの性能特性を計測する。
 計測装置50は、機能構成要素として、実行時間計測部61と、特性データ計測部62とを備える。
 図2を参照して、実施の形態1に係るスケジュール生成装置10のハードウェア構成を説明する。
 スケジュール生成装置10は、プロセッサ11と、メモリ12と、ストレージ13と、通信インタフェース14とのハードウェアを備える。プロセッサ11は、信号線15を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
 図3を参照して、実施の形態1に係る計測装置50のハードウェア構成を説明する。
 計測装置50は、プロセッサ51と、メモリ52と、ストレージ53と、通信インタフェース54とのハードウェアを備える。プロセッサ51は、信号線55を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
 プロセッサ11,51は、プロセッシングを行うIC(Integrated Circuit)である。プロセッサ11,51は、具体例としては、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、GPU(Graphics Processing Unit)である。
 メモリ12,52は、データを一時的に記憶する記憶装置である。メモリ12,52は、具体例としては、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)である。
 ストレージ13,53は、データを保管する記憶装置である。ストレージ13,53は、具体例としては、ROM(Read Only Memory)である。また、ストレージ13,53は、SD(登録商標,Secure Digital)メモリカード、CF(CompactFlash,登録商標)、NANDフラッシュ、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD(Digital Versatile Disk)といった可搬記録媒体であってもよい。
 通信インタフェース14,54は、外部の装置と通信するためのインタフェースである。通信インタフェース14,54は、具体例としては、Ethernet(登録商標)、USB(Universal Serial Bus)、HDMI(登録商標,High-Definition Multimedia Interface)のポートである。
 スケジュール生成装置10の各機能構成要素の機能はソフトウェアにより実現される。ストレージ13には、スケジュール生成装置10の各機能構成要素の機能を実現するプログラムが格納されている。このプログラムは、プロセッサ11によりメモリ12に読み込まれ、プロセッサ11によって実行される。これにより、スケジュール生成装置10の各機能構成要素の機能が実現される。
 計測装置50の各機能構成要素の機能はソフトウェアにより実現される。ストレージ53には、計測装置50の各機能構成要素の機能を実現するプログラムが格納されている。このプログラムは、プロセッサ51によりメモリ52に読み込まれ、プロセッサ51によって実行される。これにより、計測装置50の各機能構成要素の機能が実現される。
 図4を参照して、実施の形態1に係るプロセッサ51の構成例を説明する。
 プロセッサ51は、複数のコア511を備える。図4では、プロセッサ51は、コア511-1からコア511-nのn個のコア511を備える。また、プロセッサ51は、各コア511が共通して使用する共有キャッシュ512を備える。
 なお、計測装置50は、図3及び図4に示す構成に限定されるものではない。計測装置50は、マルチコアプロセッサを備えた一般的なリアルタイムシステムの構成であってもよいし、図3及び図4に示す構成を仮想的に備えるシミュレータであってもよい。
 ***動作の説明***
 図5から図10を参照して、実施の形態1に係るスケジュール生成システム100の動作を説明する。
 実施の形態1に係るスケジュール生成システム100の動作手順は、実施の形態1に係るスケジュール生成方法に相当する。また、実施の形態1に係るスケジュール生成システム100の動作を実現するプログラムは、実施の形態1に係るスケジュール生成プログラムに相当する。
 図5を参照して、実施の形態1に係るスケジュール生成システム100の動作の説明で用いる用語を説明する。
 実施の形態1では、タスクは一定周期で繰り返し実行される周期タスクであるとする。
 タスクの各周期の実行単位をジョブと呼ぶ。タスクが実行可能な状態になる時刻をリリースタイムと呼ぶ。リリースタイム以降であればその周期に対応するジョブはいつでも実行開始できる。実行開始できるとは、実行システムのプロセッサで処理を開始できることを意味する。実行時間はジョブが実行開始してから、実行完了するまでの時間である。ただし、他のタスク又は割込み等に実行権が移った場合、その時間は実行時間には含まない。タスクの実行時間は各ジョブの実行時間から統計的な処理により一意の値に定められる。ここでは、ジョブの実行時間の最長の値(最悪値)を実行時間とする。各ジョブのデッドラインを示す時刻を絶対デッドラインと呼ぶ。リリースタイムから絶対デッドラインまでの時間を相対デッドラインと呼ぶ。
 なお、実行時間は、最悪値に限らず、パーセンタイル等でもよい。
 図6を参照して、実施の形態1に係る計測装置50の動作を説明する。
 (ステップS11:処理終了判定処理)
 実行時間計測部61は、タスク実行ファイル群に含まれる全てのタスクについて計測が完了したか否かを判定する。タスク実行ファイル群は、スケジューリング対象とする全タスクの、実行可能な形式のファイルの集合である。
 実行時間計測部61は、計測が完了していないタスクが残っている場合には、処理をステップS12に進める。一方、実行時間計測部61は、全てのタスクについて計測が完了している場合には、処理を終了する。
 (ステップS12:実行時間計測処理)
 実行時間計測部61は、計測が完了していないタスクを1つ実行対象のタスクとして選択する。実行時間計測部61は、実行対象のタスクを単独で実行したときの実行時間を単独実行時間として計測する。つまり、実行時間計測部61は、他のコア511で他のタスクを実行することなく、実行対象のタスクだけを実行したときの実行時間を単独実行時間として計測する。実行時間は、周期タスクの1回の実行時間であり、計測されたもののうち最長のもの(最悪実行時間)が用いられる。
 (ステップS13:Co-run選定処理)
 実行時間計測部61は、ステップS12で選択された実行対象のタスクと、実行対象のタスク以外の1つのタスクとを別々のコア511で同時に実行して、実行対象のタスクの実行時間を計測する。同時に実行することを、Co-runと呼ぶ。そして、特性データ計測部62は、実行対象のタスクとCo-runした各タスクについて、実行対象のタスクへの影響度であるCo-run影響度を計算する。特性データ計測部62は、Co-run影響度が最も大きかったタスクを計測用のCo-runタスクとして選定する。また、特性データ計測部62は、最も大きかったCo-run影響度を、Co-runタスク数が1の場合における計算対象のタスクのCo-run影響度に設定する。
 X個のタスクとのCo-run影響度RXは、式(1)で定義される。
(式1)RX=X個のタスクとCo-run時の実行時間/単独実行時間
 つまり、Co-run影響度は、実行対象のタスクを単独で実行した場合の実行時間である単独実行時間に対して、実行対象のタスクを他のタスクと同時に実行した場合の実行時間が長くなる度合である。
 なお、ステップS13の処理では、Co-runするタスク数が1つの場合のCo-run影響度R1が計算された。後述するステップS16の処理では、Co-runするタスク数が2からコア数-1までのそれぞれについてのCo-run影響度RXが計算される。
 なお、タスクの特性に応じてCo-runの影響が大きいタスクが異なるため、特性データ計測部62はタスク毎に計測用のCo-runタスクを選定する必要がある。
 (ステップS14:センシティブタスク判定処理)
 特性データ計測部62は、ステップS13で選定されたCo-runタスクのCo-run影響度が閾値以上の場合には、実行対象のタスクをセンシティブタスクと判定する。センシティブタスクは、他のタスクとCo-runした場合に、他のタスクの実行時間が長くなり易いタスクである。センシティブタスクは、具体例としては、共有キャッシュを多く使用するタスクが考えられる。
 ここでは、特性データ計測部62は、計測用のCo-runタスクとのCo-run時におけるCo-run影響度からセンシティブタスクであるか否かを判定した。しかし、特性データ計測部62は、実行対象のタスクについて、他のタスクそれぞれとのCo-run時におけるCo-run影響度の平均値又は中央値等から、実行対象のタスクがセンシティブタスクであるか否かを判定してもよい。
 また、ここでは、特性データ計測部62は、他タスクからのCo-runの影響を受けやすいタスクは、他タスクへ影響を与えやすいものであると仮定に基づいて、センシティブタスクであるか否かを判定した。しかし、特性データ計測部62は、他タスクへの影響の与えやすさを改めて測定し、センシティブタスクの判定を行ってもよい。
 (ステップS15:計算終了判定処理)
 実行時間計測部61は、Co-runするタスク数が2からコア数-1までの全てのタスク数について、Co-run影響度の計算が完了したか否かを判定する。
 実行時間計測部61は、計算が完了していないタスク数が残っている場合には、処理をステップS16に進める。一方、実行時間計測部61は、全てのタスク数について計算が完了している場合には、処理をステップS11に戻す。
 (ステップS16:影響度計算処理)
 実行時間計測部61は、計算が完了していないタスク数を対象タスク数として選択する。実行時間計測部61は、実行対象のタスク以外のタスクから、対象タスク数のタスクの組合せを順に選択し、実行対象のタスクと、選択された組合せに含まれる各タスクとを別々のコア511で同時に実行して、実行対象のタスクの実行時間を計測する。
 特性データ計測部62は、実行対象のタスクとCo-runした組合せのタスクについて、実行対象のタスクへの影響度であるCo-run影響度を計算する。特性データ計測部62は、各組合せについてのCo-run影響度のうち最も大きい影響度を、Co-runタスク数が対象タスク数の場合における実行対象のタスクのCo-run影響度に設定する。
 図7から図10を参照して、実施の形態1に係るスケジュール生成装置10のスケジュール生成部22の動作を説明する。
 以下に説明するスケジュール生成装置10の動作が実行される前提として、特性データ取得部21は、単独実行時間と、センシティブタスクの判定結果と、各Co-runタスク数についてのCo-run影響度とを示す特性データを計測装置50から取得する。また、特性データ取得部21は、ユーザによって入力装置が操作されること等により入力された、実行システムのコア数と、タスクの周期及びデッドラインといったタスク設定情報とを取得する。
 例えば、特性データとタスク設定情報とは図7に示すような情報である。図7では、Pは単独実行時間、Dは相対デッドライン、Sは周期、RX(X=1~3)はCo-runタスク数がXの時のCo-run影響度、Sensはセンシティブタスク判定結果(Y:センシティブタスク、N:非センシティブタスク)をそれぞれ意味する。
 スケジュール生成部22は、特性データ取得部21によって取得された特性データが示す複数のタスクそれぞれについてのCo-run影響度を考慮して、複数のタスクを実行するスケジュールを生成する。
 図8を参照して、実施の形態1に係る問題生成部23の動作を説明する。
 (ステップS21:影響制約生成処理)
 影響制約生成部25は、最適化問題の解であるスケジューリング設計結果において、あるタスクが各周期にセンシティブタスクとCo-runした回数を取得するための影響反映用制約を生成する。
 具体的には、影響制約生成部25は、数11で表される最適化変数εを定義するための影響反映用制約を生成する。制約を生成するとは、線形計画問題求解部(線形計画ソルバ)に対し制約を指定することを意味する。最適化変数とは、線形計画問題において最適化対象となる変数のことである。
Figure JPOXMLDOC01-appb-M000005
 i,jは、タスクIDである。tは、時刻である。ncoは、Co-runするセンシティブタスク数であり、1≦nco≦N-2である。Jsは、センシティブタスクの集合である。Nは、実行システムのコア数である。Zは、タスクiが時刻tで実行されるならば1、実行されないならば0をとる最適化変数である。εnco,i,tは、時刻tでタスクiとCo-runするセンシティブタスク数がncoであり、かつ、タスクiが実行されるならば1、それ以外ならば0をとる最適化変数である。時刻tは、時刻を離散化したものであり、整数値をとるとする。時刻を離散化した際の離散化の単位をタイムステップと称する。
 なお、εnco,i,tにおけるncoは、ncoを意味する。以下同様に、ncoが下付き文字の場合にはncoを意味する。
 数11は非線形式である。そのため、影響制約生成部25は、数12の線形制約式を影響反映用制約として生成し、数11の性質を持った最適化変数εを規定する。
Figure JPOXMLDOC01-appb-M000006
 φnco,i,tは、0又は1を満たす最適化変数である。γnco,i,tは、0又は1を満たす最適化変数である。数12の式(1)及び式(2)は、数11における数13の場合に、εnco,i,t=1とする制約を線形式で表したものである。
Figure JPOXMLDOC01-appb-M000007
 数12の式(3)及び式(4)は、数11における数14の場合に、εnco,i,t=0とする制約を線形式で表したものである。
Figure JPOXMLDOC01-appb-M000008
 なお、否定記号≠を入力できない線形計画ソルバを使用する場合は、影響制約生成部25は、以下のように不等号を用いた制約に変換することで、否定記号の制約を表現する。
(変換前):A≠B→(変換後)(A<B)∧(A>B)
 (ステップS22:デッドライン制約生成処理)
 デッドライン制約生成部26は、影響反映用制約で定義された最適化変数εを用いて、Co-run影響度を考慮した場合に複数のタスクそれぞれがデッドラインまでに処理を完了することを表すデッドライン制約を生成する。言い換えると、デッドライン制約は、複数のタスクそれぞれがセンシティブタスクとCo-runした回数に応じて増加した実行時間を考慮した上で、複数のタスクそれぞれがデッドラインミスを犯さないようにする制約である。
 具体的には、デッドライン制約生成部26は、数15に示す線形制約式をデッドライン制約として生成する。
Figure JPOXMLDOC01-appb-M000009
 kは、ジョブIDである。Si,kは、タスクiのk番目のリリースタイムである。Di,kは、タスクiのk番目の絶対デッドラインである。Pは、タスクiの単独実行時間である。Rnco,iは、タスクiのnco個のセンシティブタスクとCo-run時のCo-run影響度である。なお、リリースタイムSi,k及び絶対デッドラインDi,kは、タイムステップの倍数として表われるものとし、これにより整数値となる。
 数15の式(1)の左辺は、ある周期にタスクiが実行される時間である。数15の式(1)の右辺第2項はCo-runによる実行時間増加分に相当する。したがって、数15の式(1)は、タスクiの単独実行時間Pと、Co-run影響度を用いて計算されるCo-runによる実行時間増加分の和以上の実行時間が、タスクiが実行される時間として割り当てられるという式である。
 数15の式(1)を不等式としている理由は、Co-run影響度が小数点以下を含み、右辺第2項も小数点以下を含む可能性があるのに対して、左辺は整数であるためである。
 デッドライン制約生成部26は、必要以上にタスクに実行時間を与えないよう、数16に示す線形制約式をデッドライン制約に追加してもよい。
Figure JPOXMLDOC01-appb-M000010
 数15の式(2)は、各周期内でデッドラインを超えた時刻にはタスクが実行されないという式である。
 (ステップS23:コア数制約生成処理)
 コア数制約生成部27は、実行システムのコア数を超えた並列度でタスクが実行されないことを表すコア数制約を生成する。
 具体的には、コア数制約生成部27は、数17に示す線形制約式をコア数制約として生成する。
Figure JPOXMLDOC01-appb-M000011
 Nは、スケジューリング対象のタスク数である。
 (ステップS24:目的関数生成処理)
 目的関数生成部28は、数18に示すように目的関数を生成する。
Figure JPOXMLDOC01-appb-M000012
 数18に示す目的関数は、実行時間の総和、すなわちCPU使用率を最小にする目的関数である。
 目的関数はこれに限定されるものではない。目的関数生成部28は、例えば、デッドラインまでの余裕時間を最小化する目的関数を生成してもよいし、目的関数自体を生成しなくてもよい。
 図9を参照して、実施の形態1に係る問題求解部24の動作を説明する。
 (S31:求解処理)
 問題求解部24は、ステップS21で生成された影響反映用制約と、ステップS22で生成されたデッドライン制約と、ステップS23で生成されたコア数制約とを制約条件とし、ステップS24で生成された目的関数を目的関数とする線形計画問題の解を計算する。線形計画問題の解の計算方法については既存の方法を用いればよい。
 (S32:解判定処理)
 問題求解部24は、ステップS31で解が得られたか否かを判定する。
 問題求解部24は、解が得られた場合には、処理をステップS33に進める。一方、問題求解部24は、解が得られなかった場合には、処理をステップS34に進める。
 (S33:スケジュール出力処理)
 問題求解部24は、通信インタフェース14を介して、ステップS31で得られた解、つまりスケジュールを出力する。出力形態としては、コンソールに文字列として出力する形態でもよいし、ファイルに文字列として出力する形態でもよいし、その他の形態でもよい。
 具体例としては、図10に示すように、問題求解部24は、各タスクについて時刻毎に実行の有無を示すスケジュールテーブルを出力する。図10では、タスクと時刻とが交差する欄に〇が示されている場合には、そのタスクがその時刻に実行されることを意味し、空欄が示されている場合には、そのタスクがその時刻に実行されないことを意味する。
 (S34:メッセージ出力処理)
 問題求解部24は、通信インタフェース14を介して、対象とするタスクセットは実行システムにおいてスケジュールを組むことが不可能であるというメッセージを出力する。出力形態としては、コンソールに文字列として出力する形態でもよいし、ファイルに文字列として出力する形態でもよいし、その他の形態でもよい。
 ***実施の形態1の効果***
 以上のように、実施の形態1に係るスケジュール生成装置10は、Co-run影響度を考慮して、複数のタスクを実行するスケジュールを生成する。これにより、適切なスケジュールの生成が可能になる。
 より具体的には、実施の形態1に係るスケジュール生成装置10は、センシティブタスクとのCo-runの影響を反映するための影響反映用制約と、影響反映用制約により反映された影響を考慮した上でデッドラインを守るためのデッドライン制約とを用いる。これにより、Co-runタスクにより実行時間が延長してしまう場合でもデッドラインミスを起こさないようなスケジュールを生成することが可能である。
 図11に示すように、タスクAは常にコア0で実行され、相対デッドラインが周期と等しい、すなわち次の周期までに処理が完了する必要があるタスクであるとする。図11では、Co-runタスクがコア1で実行されることによる性能劣化により実行時間が増加し、タスクAにデッドラインミスが生じている。従来のリアルタイムスケジューリング方法は、このようなCo-runタスクとのコンピュータリソース競合により性能が低下することによりデッドラインミスを引き起こす可能性があった。これに対して、実施の形態1に係るスケジュール生成装置10は、Co-run影響度を考慮するため、このようなデッドラインミスを起こさないようなスケジュールを生成することが可能である。
 ***他の構成***
 <変形例1>
 実施の形態1では、スケジュール生成装置10の各機能構成要素がソフトウェアで実現された。しかし、変形例1として、スケジュール生成装置10の各機能構成要素はハードウェアで実現されてもよい。この変形例1について、実施の形態1と異なる点を説明する。
 各機能構成要素がハードウェアで実現される場合には、スケジュール生成装置10は、プロセッサ11とメモリ12とストレージ13とに代えて、電子回路を備える。電子回路は、各機能構成要素と、メモリ12と、ストレージ13との機能とを実現する専用の回路である。
 電子回路としては、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ロジックIC、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)が想定される。
 各機能構成要素を1つの電子回路で実現してもよいし、各機能構成要素を複数の電子回路に分散させて実現してもよい。
 <変形例2>
 変形例2として、一部の各機能構成要素がハードウェアで実現され、他の各機能構成要素がソフトウェアで実現されてもよい。
 プロセッサ11とメモリ12とストレージ13と電子回路とを処理回路という。つまり、各機能構成要素の機能は、処理回路により実現される。
 実施の形態2.
 実施の形態1では、Co-run影響度を正確に反映するように制約式を生成した。実施の形態2は、実施の形態1に比べて制約条件を緩和する点が実施の形態1と異なる。実施の形態2では、この異なる点を説明し、同一の点については説明を省略する。
 ***動作の説明***
 図8のステップS21で影響制約生成部25は、影響反映用制約として、数12の式(1)及び式(2)を生成し、式(3)及び式(4)を生成しない。これにより最適化変数γnco,i.tを不要にすることができる。その結果、最適化問題の求解時間を求解にかかる時間を減らすことが可能である。
 式(3)及び式(4)を生成しないことは、数11における数13の場合にεnco,i,t=0とする制約を無くしたことに相当する。その結果、εnco,i,tが過大評価される可能性がある。εnco,i,tが過大評価されると、数15の式(1)により、Co-runの影響が過大評価されることになるが、デッドライン制約又はコア数制約を侵害することは繋がらない。
 ***実施の形態2の効果***
 以上のように、実施の形態2に係るスケジュール生成装置10は、制約条件を緩和して最適化変数を削減する。これにより、求解にかかる時間を減らすことが可能である。
 実施の形態3.
 実施の形態1,2では、単一のクリティカリティレベル(CLと記載する場合がある)のタスクのみが存在することを想定していた。実施の形態3は、異なるクリティカリティレベルのタスクが存在する点が実施の形態1,2と異なる。実施の形態3では、この異なる点を説明し、同一の点については説明を省略する。
 実施の形態3では、実施の形態1に対して変更を加えた場合を説明する。しかし、実施の形態2に対して変更を加えることも可能である。
 タスク毎にデッドラインミス時の影響度に応じたクリティカリティレベルが設定され、システム内に異なるクリティカリティレベルを持つ複数のタスクを混在させるシステムが存在する。このようなシステムをミックスドクリティカリティシステムと呼び、ミックスドクリティカリティシステム向けのスケジューラビリティ判定手法が提案されている(例えば文献:Sanjoy Baruah, Steve Vestal, ”Schedulability analysis of sporadic tasks with multiple criticality specifications)。
 この文献に記載された技術では、システム内のタスク毎に、そのタスクのクリティカリティレベルと、他のクリティカリティレベルとを含めた全てのクリティカリティレベルに対応する最悪実行時間を定義した情報を持つ。これは、各タスクの実行時間がジッタを持つことが想定されており、事前に繰り返し計測した実行時間の範囲内でクリティカリティレベル毎の最悪実行時間が定義される。実行時間はクリティカリティレベルが高いほど大きい値が定義される。つまり、クリティカリティレベルが高いほど悲観的な(長い)最悪実行時間が定義される。
 ミックスドクリティカリティシステム用のタスクスケジュールは、全タスクがあるクリティカリティレベルの実行時間で完了した場合は、そのクリティカリティレベル以上のタスクがデッドライン制約を満たすことを保証するというスケジューリングポリシーを満たす。言い換えると、対象とするタスクのクリティカリティレベルより低いクリティカリティレベルのタスクはデッドラインを満たさなくてもよいということである。
 ***構成の説明***
 図12を参照して、実施の形態3に係るスケジュール生成システム100の構成を説明する。
 スケジュール生成システム100は、スケジュール生成装置10の問題生成部23が、テーブル間制約生成部29を備える点が図1に示すスケジュール生成システム100と異なる。テーブル間制約生成部29の機能は、他の機能構成要素と同様に、ソフトウェア又はハードウェアによって実現される。
 また、スケジュール生成装置10及び計測装置50に対して、複数のタスクそれぞれについてのクリティカリティレベルを示す情報が入力として与えられる点が図1に示すスケジュール生成システム100と異なる。
 ***動作の説明***
 図13から図19を参照して、実施の形態3に係るスケジュール生成システム100の動作を説明する。
 図13を参照して、実施の形態3に係る計測装置50の動作を説明する。
 ステップS41の処理は、図6のステップS11の処理と同じである。ステップS45からステップS48の処理は、図6のステップS13からステップS16の処理と同じである。
 (ステップS42:レベル判定処理)
 実行時間計測部61は、計測が完了していないタスクを1つ実行対象のタスクとして選択する。実行時間計測部61は、実行対象のタスクについてのクリティカリティレベル以上の全てのクリティカリティレベルについて、実行対象のタスクの補正実行時間が決定されたか否かを判定する。
 実行時間計測部61は、補正実行時間が決定されていないクリティカリティレベルが残っている場合には、処理をステップS43に進める。一方、全てのクリティカリティレベルについて補正実行時間が決定されている場合には、処理をステップS44に進める。
 (ステップS43:第1実行時間決定処理)
 実行時間計測部61は、実行対象のタスクについてのクリティカリティレベル以上のクリティカリティレベルのうち、補正実行時間が決定されていないクリティカリティレベルを1つ決定対象のクリティカリティレベルとして選択する。実行時間計測部61は、決定対象のクリティカリティレベルにおいて、実行対象のタスクを単独で実行したときの実行時間を補正実行時間として決定する。
 例えば、実行対象のタスクについてのクリティカリティレベルが2であるとする。また、ここでは、数値が大きいほどクリティカリティレベルが高いとする。この場合には、2以上のクリティカリティレベルについて補正実行時間が決定される。
 (ステップS44:第2実行時間決定処理)
 実行時間計測部61は、実行対象のタスクについてのクリティカリティレベルよりも低いクリティカリティレベルについて、補正実行時間を0に決定する。
 ここで、各クリティカリティレベルに対応する補正実行時間の決定方法は、以下の(1)(2)の2つの条件を満たせば方法は問わない。(1)補正実行時間はクリティカリティレベルが高いほど長い。つまり、クリティカリティレベルが高いほど悲観的な最悪実行時間が仮定される。(2)タスクのクリティカリティレベルより低いクリティカリティレベルに対応する補正実行時間は0とする。
 したがって、ステップS43では、(1)の条件を満たすように、補正実行時間が決定される。例えば、図6のステップS12のように単独実行時間を計測し、クリティカリティレベル毎の補正係数を乗じて、各クリティカリティレベルについての補正実行時間を決定することが考えられる。
 図14から図18を参照して、実施の形態3に係るスケジュール生成装置10のスケジュール生成部22の動作を説明する。
 以下に説明するスケジュール生成装置10の動作が実行される前提として、特性データ取得部21は、補正実行時間と、センシティブタスクの判定結果と、各Co-runタスク数についてのCo-run影響度とを示す特性データを計測装置50から取得する。また、特性データ取得部21は、ユーザによって入力装置が操作されること等により入力された、実行システムのコア数と、タスクの周期とデッドラインと各タスクのクリティカリティレベルといったタスク設定情報とを取得する。
 例えば、特性データとタスク設定情報とは図14に示すような情報である。図14では、CLはクリティカリティレベル、PL(L=1~3)は補正実行時間、Dはデッドライン、Sは周期、RX(X=1~3)はCo-runタスク数がXの時のCo-run影響度、Sensはセンシティブタスク判定結果(Y:センシティブタスク、N:非センシティブタスク)をそれぞれ意味する。
 図15を参照して、実施の形態3に係る問題生成部23の動作を説明する。
 (ステップS51:影響制約生成処理)
 影響制約生成部25は、数19で表される最適化変数εを定義するための影響反映用制約を生成する。
Figure JPOXMLDOC01-appb-M000013
 lは、クリティカリティレベルである。Lは、タスクiのクリティカリティレベルである。Zi,l,tは、クリティカリティレベルがlのスケジュールテーブルにおいて、タスクiが時刻tで実行されるならば1、実行されないならば0をとる最適化変数である。εnco,i,l,tは、クリティカリティレベルがlのスケジュールテーブルにおいて、時刻tでタスクiとCo-runするセンシティブタスク数がncoであり、かつ、タスクiが実行されるならば1、それ以外ならば0をとる最適化変数である。
 図16を参照して、実施の形態3におけるセンシティブタスク数のカウント方法を説明する。
 図16では、実行システムのコア数は2であり、タスクaのクリティカリティレベルは3、タスクbのクリティカリティレベルは2、タスクcのクリティカリティレベルは1であるとする。ここでは、値が大きいほどクリティカリティレベルが高いとする。また、全てタスクはセンシティブタスクであるとする。
 後述する処理では、クリティカリティレベル毎にスケジュール(スケジュールテーブル)が生成され、各クリティカリティレベルについてのスケジュールテーブルで補正実行時間分のタスク実行時間が確保される。
 各時刻でCo-runするセンシティブタスク数は、その時刻において、全クリティカリティレベルについてのスケジュールテーブルの中で実行される可能性があるタスク数でカウントされる。
 例えば、図16の時刻3において、タスクcとCo-runするセンシティブタスク数はタスクaの1つとカウントされる。CL=1のスケジュールテーブルではタスクcは時刻3においてタスクaとCo-runしないテーブルとなっている。しかし、タスクaがCL=3の実行時間を要した場合に時刻3で実行される可能性があるため、タスクaはCo-runタスクとしてカウントされる。
 また、図16の時刻2では、タスクcとCo-runする可能性があるのはタスクaとタスクbの2つである。しかし、この場合でも、後述する実行システムで動作する実行時スケジューラの動作により、コア数以上タスクが同時刻で実行されることはない。よって、数19の式(2)のように、各時刻でCo-runする可能性のあるタスク数がコア数を超える場合はCo-runするセンシティブタスク数はコア数-1となる。
 数19の式(1)は非線形式である。そのため、影響制約生成部25は、数20の線形制約式を影響反映用制約として生成し、数19の式(1)の性質を持った最適化変数εを規定する。
Figure JPOXMLDOC01-appb-M000014
 φnco,i,l,tは、0又は1を満たす最適化変数である。
 同様に、数19の式(2)は非線形式である。そのため、影響制約生成部25は、数21の線形制約式を影響反映用制約として生成し、数19の式(2)の性質を持った最適化変数εを規定する。
Figure JPOXMLDOC01-appb-M000015
 Mcoは、他の項の最大値よりも大きな任意の整数である。
 (ステップS52:デッドライン制約生成処理)
 デッドライン制約生成部26は、数22に示す線形制約式をデッドライン制約として生成する。
Figure JPOXMLDOC01-appb-M000016
 P i,lは、タスクiのクリティカリティレベルがlに対応する補正実行時間である。なお、P i,lにおける“”は、Pの上に-が引かれていることを表している。
 (ステップS53:コア数制約生成処理)
 コア数制約生成部27は、数23に示す線形制約式をコア数制約として生成する。
Figure JPOXMLDOC01-appb-M000017
 (ステップS54:目的関数生成処理)
 目的関数生成部28は、数24に示すように目的関数を生成する。
Figure JPOXMLDOC01-appb-M000018
 数24に示す目的関数は、実行時間の総和、すなわちCPU使用率を最小にする目的関数である。
 目的関数はこれに限定されるものではない。目的関数生成部28は、最低クリティカリティレベルのスケジュールテーブルのCPU使用率を最小化してもよい。これは最低クリティカリティレベルに対応するCPU使用率が最頻であるという仮定に基づき、実効的なCPU使用率を最大にすることを目的としている。また、目的関数生成部28は、例えば、デッドラインまでの余裕時間を最小化する目的関数を生成してもよいし、目的関数自体を生成しなくてもよい。
 (ステップS55:テーブル間制約生成処理)
 テーブル間制約生成部29は、各クリティカリティレベルのスケジュール間の整合性をとるための制約であるテーブル間制約を生成する。
 具体的には、テーブル間制約生成部29は、数25に示す線形制約式をテーブル間制約として生成する。
Figure JPOXMLDOC01-appb-M000019
 l,lは、あるクリティカリティレベルである。t,tは、ある時刻である。
 実行時スケジューラの動作を説明した上で、テーブル間制約の役割を説明する。
 実行時スケジューラは、スケジュール生成装置10によって生成されたスケジュールに従い、実行システムでタスクを実行する際に動作する。図16に示すように、各クリティカリティレベルについてのスケジュールが生成されるが、実行時スケジューラは、コア数以上タスクが同時刻で実行されないように、どのタスクを実行するかを制御する。
 図17を参照して、実行システムで動作する実行時スケジューラの動作について説明する。
 実行時スケジューラは、タイムステップ間隔で起動し、ステップS61からステップS63の処理を実行する。
 (ステップS61:タスク特定処理)
 実行時スケジューラは、スケジュール生成装置10によって生成されたスケジュールを参照し、現在時刻で実行される可能性のあるタスクを特定する。
 図16のスケジュールテーブルの場合、時刻2で実行される可能性のあるタスクは、タスクaとタスクbとタスクcとである。
 (ステップS62:未完了タスク特定処理)
 実行時スケジューラは、ステップS61で特定されたタスクのうち、現在時刻で処理が完了していないタスクを特定する。
 ここでは、タスクの実行時間は実行毎に変動することを想定している。すなわち、CL=3又はCL=2に対応する実行時間の場合、タスクa及びタスクbは時刻2では処理が完了していない。また、CL=1に対応する実行時間の場合、タスクa及びタスクbは時刻1で処理が完了している。
 (ステップS63:実行件付与処理)
 実行時スケジューラは、ステップS62で特定されたタスクのうち、クリティカリティレベルが高いタスクから順に実行権を与える。
 ステップS62で特定されたタスクがコア数以上となる場合、クリティカリティレベルが低いタスクは実行されない可能性がある。しかし、これはミックスドクリティカリティスケジューリングのスケジューリングポリシーに違反しない。
 テーブル間制約の役割を説明する。
 複数のクリティカリティレベルそれぞれを対象のクリティカリティレベルとし、複数のタスクそれぞれを生成対象のタスクとする。テーブル間制約は、対象のクリティカリティレベルよりも低いクリティカリティレベルのスケジュールにおいて生成対象のタスクについての処理が完了するまでの期間に関して、生成対象のタスクについての対象のクリティカリティレベルのスケジュールが、対象のクリティカリティレベルよりも高いクリティカリティレベルのスケジュールと同一になるようにする制約である。
 図18を参照して、テーブル間制約の必要性を説明する。
 図18では、数25に示すテーブル間制約を設けない場合に発生する問題の例が示されている。図18では、あるタスクのHigh、Lowの2つのクリティカリティレベルのスケジュールであるHighレベルテーブルとLowレベルテーブルとが示されている。
 図18のスケジュールが生成されると、実行時スケジューラは時刻tでこのタスクを実行すべきかどうか判断できない。
 なぜならば、実行する場合、Lowレベルテーブルで他のタスクが実行できない可能性がある。その結果、このタスクがLowレベルに対応する実行時間(図18では3タイムステップ)で完了した場合でも、他のタスクがデッドラインミスする可能性がある。つまり、本来実行しなくてもよかったタスクを実行したことにより、他のタスクがデッドラインミスをする可能性がある。これはミックスドクリティカリティスケジューリングのスケジューリングポリシーに違反する。
 一方、実行しない場合、このタスクがHighレベルに対応する実行時間(図18では6タイムステップ)で完了した場合には、Highレベル絶対デッドラインを超過してしまう。時刻tで実行しないので、Highレベル絶対デッドラインまでに6タイムステップ分の実行時間を確保できなくなるためである。これもミックスドクリティカリティスケジューリングのスケジューリングポリシーに違反する。
 そこで、数25に示すテーブル間制約を設定し、各周期にて、Lowレベルテーブルでの実行完了以前は、全てHighレベルテーブルと同一スケジュールであることを保証する。
 実施の形態1と同様に、問題求解部24によって線形計画問題の解が計算され、スケジュールが生成される。
 具体例としては、図19に示すように、クリティカリティレベル毎に、各タスクについて時刻毎に実行の有無を示すスケジュールテーブルを出力する。図19では、タスクと時刻とが交差する欄に〇が示されている場合には、そのタスクがその時刻に実行されることを意味し、空欄が示されている場合には、そのタスクがその時刻に実行されないことを意味する。
 ***実施の形態3の効果***
 以上のように、実施の形態3に係るスケジュール生成装置10は、異なるクリティカリティレベルのタスクが存在する場合にも、Co-run影響度を考慮して、複数のタスクを実行するスケジュールを生成する。これにより、適切なスケジュールの生成が可能になる。
 より具体的には、実施の形態3に係るスケジュール生成装置10は、テーブル間制約を用いて、クリティカリティレベル毎のスケジュールの整合性を持たせる。これにより、Co-run影響度を考慮しつつ、ミックスドクリティカリティスケジューリングのスケジューリングポリシーを満たすスケジュールを生成することが可能である。
 なお、以上の説明における「部」を、「回路」、「工程」、「手順」、「処理」又は「処理回路」に読み替えてもよい。
 以上、本開示の実施の形態及び変形例について説明した。これらの実施の形態及び変形例のうち、いくつかを組み合わせて実施してもよい。また、いずれか1つ又はいくつかを部分的に実施してもよい。なお、本開示は、以上の実施の形態及び変形例に限定されるものではなく、必要に応じて種々の変更が可能である。
 100 スケジュール生成システム、10 スケジュール生成装置、11 プロセッサ、12 メモリ、13 ストレージ、14 通信インタフェース、15 信号線、21 特性データ取得部、22 スケジュール生成部、23 問題生成部、24 問題求解部、25 影響制約生成部、26 デッドライン制約生成部、27 コア数制約生成部、28 目的関数生成部、29 テーブル間制約生成部、50 計測装置、51 プロセッサ、511 コア、512 共有キャッシュ、52 メモリ、53 ストレージ、54 通信インタフェース、55 信号線、61 実行時間計測部、62 特性データ計測部、90 伝送路。

Claims (12)

  1.  複数のコアを有するマルチコアプロセッサで複数のタスクを実行するスケジュールを生成するスケジュール生成装置であり、
     前記複数のタスクそれぞれを実行対象のタスクとした場合のCo-run影響度であって、前記実行対象のタスクを単独で実行した場合の実行時間である単独実行時間に対して、前記実行対象のタスクを他のタスクと同時に実行した場合の実行時間が長くなる度合であるCo-run影響度を示す特性データを取得する特性データ取得部と、
     前記特性データ取得部によって取得された前記特性データが示す前記複数のタスクそれぞれについての前記Co-run影響度を考慮して、前記複数のタスクを実行するスケジュールを生成するスケジュール生成部と
    を備えるスケジュール生成装置。
  2.  前記特性データは、前記複数のコアにおけるコア数より少ない個数それぞれを対象の個数とした場合の前記実行対象のタスクについての前記Co-run影響度であって、前記単独実行時間に対して、前記実行対象のタスクを前記対象の個数のタスクと同時に実行した場合の実行時間が長くなる度合であるCo-run影響度を示す
    請求項1に記載のスケジュール生成装置。
  3.  前記スケジュール生成部は、前記Co-run影響度を考慮した場合に前記複数のタスクがデッドラインまでに処理を完了することを表すデッドライン制約を含む線形計画問題を解くことにより、前記スケジュールを生成する
    請求項1又は2に記載のスケジュール生成装置。
  4.  前記デッドライン制約は、前記複数のタスクそれぞれを制約対象のタスクとして、前記制約対象のタスクについての前記単独実行時間と、前記Co-run影響度により増加する実行時間との和以上の時間を、前記制約対象のタスクに割り当てるという制約と、デッドラインよりも後の時間を、前記制約対象のタスクに割り当てないという制約とを含む
    請求項3に記載のスケジュール生成装置。
  5.  前記デッドライン制約は、数1に示す制約である
    請求項4に記載のスケジュール生成装置。
    Figure JPOXMLDOC01-appb-M000001
  6.  前記デッドライン制約は、数2のように定義された最適化変数εを用いて定義された
    請求項5に記載のスケジュール生成装置。
    Figure JPOXMLDOC01-appb-M000002
  7.  前記デッドライン制約は、数3のように定義された最適化変数εを用いて定義された
    請求項5に記載のスケジュール生成装置。
    Figure JPOXMLDOC01-appb-M000003
  8.  前記複数のタスクは、タスク毎にクリティカリティレベルが設定されており、
     前記スケジュール生成部は、クリティカリティレベルが高くなるほど時間が長くなるように前記単独実行時間を補正した補正実行時間を用いて、各クリティカリティレベルを対象のクリティカリティレベルとして、前記対象のクリティカリティレベルについて、前記対象のクリティカリティレベル以上のクリティカリティレベルが設定されたタスクがデッドラインまでに処理を完了するスケジュールを生成する
    請求項1又は2に記載のスケジュール生成装置。
  9.  前記スケジュール生成部は、数4に示すデッドライン制約を含む線形計画問題を解くことにより、前記スケジュールを生成する
    請求項8に記載のスケジュール生成装置。
    Figure JPOXMLDOC01-appb-M000004
  10.  前記スケジュール生成部は、前記複数のタスクそれぞれを生成対象のタスクとして、前記対象のクリティカリティレベルよりも低いクリティカリティレベルのスケジュールにおいて前記生成対象のタスクについての処理が完了するまでの期間に関して、前記生成対象のタスクについての前記対象のクリティカリティレベルのスケジュールを、前記対象のクリティカリティレベルよりも高いクリティカリティレベルのスケジュールと同一に設定する
    請求項8又は9に記載のスケジュール生成装置。
  11.  複数のコアを有するマルチコアプロセッサで複数のタスクを実行するスケジュールを生成するスケジュール生成方法であり、
     特性データ取得部が、前記複数のタスクそれぞれを実行対象のタスクとした場合のCo-run影響度であって、前記実行対象のタスクを単独で実行した場合の実行時間である単独実行時間に対して、前記実行対象のタスクを他のタスクと同時に実行した場合の実行時間が長くなる度合であるCo-run影響度を示す特性データを取得し、
     スケジュール生成部が、前記特性データが示す前記複数のタスクそれぞれについての前記Co-run影響度を考慮して、前記複数のタスクを実行するスケジュールを生成するスケジュール生成方法。
  12.  複数のコアを有するマルチコアプロセッサで複数のタスクを実行するスケジュールを生成するスケジュール生成プログラムであり、
     前記複数のタスクそれぞれを実行対象のタスクとした場合のCo-run影響度であって、前記実行対象のタスクを単独で実行した場合の実行時間である単独実行時間に対して、前記実行対象のタスクを他のタスクと同時に実行した場合の実行時間が長くなる度合であるCo-run影響度を示す特性データを取得する特性データ取得処理と、
     前記特性データ取得処理によって取得された前記特性データが示す前記複数のタスクそれぞれについての前記Co-run影響度を考慮して、前記複数のタスクを実行するスケジュールを生成するスケジュール生成処理と
    を行うスケジュール生成装置としてコンピュータを機能させるスケジュール生成プログラム。
PCT/JP2020/049139 2020-12-28 2020-12-28 スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム WO2022144973A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021529328A JP7012905B1 (ja) 2020-12-28 2020-12-28 スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム
PCT/JP2020/049139 WO2022144973A1 (ja) 2020-12-28 2020-12-28 スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム
TW110114881A TW202226085A (zh) 2020-12-28 2021-04-26 日程表產生裝置、日程表產生方法及日程表產生程式產品

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/049139 WO2022144973A1 (ja) 2020-12-28 2020-12-28 スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム

Publications (1)

Publication Number Publication Date
WO2022144973A1 true WO2022144973A1 (ja) 2022-07-07

Family

ID=80735331

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/049139 WO2022144973A1 (ja) 2020-12-28 2020-12-28 スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム

Country Status (3)

Country Link
JP (1) JP7012905B1 (ja)
TW (1) TW202226085A (ja)
WO (1) WO2022144973A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10143380A (ja) * 1996-11-07 1998-05-29 Hitachi Ltd マルチプロセッサシステム
JP2006065566A (ja) * 2004-08-26 2006-03-09 Casio Comput Co Ltd バッチ処理装置、および、プログラム

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3663968B2 (ja) * 1999-04-14 2005-06-22 日本電気株式会社 マルチタスクシステムの性能予測システム及び予測方法並びにその方法プログラムを記録した記録媒体

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10143380A (ja) * 1996-11-07 1998-05-29 Hitachi Ltd マルチプロセッサシステム
JP2006065566A (ja) * 2004-08-26 2006-03-09 Casio Comput Co Ltd バッチ処理装置、および、プログラム

Also Published As

Publication number Publication date
JPWO2022144973A1 (ja) 2022-07-07
TW202226085A (zh) 2022-07-01
JP7012905B1 (ja) 2022-01-28

Similar Documents

Publication Publication Date Title
US8069444B2 (en) Method and apparatus for achieving fair cache sharing on multi-threaded chip multiprocessors
US8869161B2 (en) Characterization and assignment of workload requirements to resources based on predefined categories of resource utilization and resource availability
Paolieri et al. Hardware support for WCET analysis of hard real-time multicore systems
US8522251B2 (en) Organizing task placement based on workload characterizations
EP2624135B1 (en) Systems and methods for task grouping on multi-processors
CN103942033A (zh) 基于推测度量将资源分配给线程
US20210019185A1 (en) Compute task state encapsulation
JP6895235B2 (ja) 環境的に調整されたスラックを割り当てるためのシステム及び方法
US8656405B2 (en) Pulling heavy tasks and pushing light tasks across multiple processor units of differing capacity
US20120198461A1 (en) Method and system for scheduling threads
CN108205469B (zh) 一种基于MapReduce的资源分配方法及服务器
US9684614B2 (en) System and method to convert lock-free algorithms to wait-free using a hardware accelerator
US20140215483A1 (en) Resource-usage totalizing method, and resource-usage totalizing device
Oehlert et al. Bus-aware static instruction SPM allocation for multicore hard real-time systems
US11954419B2 (en) Dynamic allocation of computing resources for electronic design automation operations
Wang et al. A fast work-efficient sssp algorithm for gpus
US7725643B1 (en) Methods and systems for detecting and avoiding an address dependency between tasks
US8972693B2 (en) Hardware managed allocation and deallocation evaluation circuit
JP6201591B2 (ja) 情報処理装置および情報処理装置の制御方法
WO2022144973A1 (ja) スケジュール生成装置、スケジュール生成方法及びスケジュール生成プログラム
US20180081581A1 (en) Device and method for determining data placement destination, and program recording medium
US20230109752A1 (en) Deterministic replay of a multi-threaded trace on a multi-threaded processor
WO2023107789A1 (en) Deterministic replay of a multi-threaded trace on a multi-threaded processor
Sousa et al. Runtime reconfigurable bus arbitration for concurrent applications on heterogeneous MPSoC architectures
US6915516B1 (en) Apparatus and method for process dispatching between individual processors of a multi-processor system

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021529328

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 20967986

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20967986

Country of ref document: EP

Kind code of ref document: A1