Method and apparatus for planning tasks for controlling hardware equipment
The method ensures real-time performance in virtualized systems by allocating guaranteed time slots for critical tasks and adjusting execution rights, addressing the unpredictability of uptime in existing virtualization methods.
Patent Information
- Application Number
- DE102010043569
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2010-10-01
- Filing Date
- 2010-11-08
- Publication Date
- 2024-09-26
- Estimated Expiration
- 2030-11-08
AI Technical Summary
Existing virtualization methods fail to guarantee real-time performance for tasks scheduled on virtual machines due to unpredictable uptime assignments, leading to potential delays in critical systems like vehicle-mounted equipment.
A method for scheduling tasks that ensures real-time performance by allocating specific time slots with guaranteed uptime for certain tasks and flexible execution rights for others, using a planning process that adjusts priorities and execution times based on task completion and event expectations.
This approach guarantees that time-guaranteed tasks are activated without delay, while non-time-guaranteed tasks are efficiently scheduled, maintaining real-time performance in systems with dynamic task additions or removals.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
BACKGROUND OF THE INVENTION [Technical field of the invention]
[0001] The present invention relates to a method and a device for planning tasks in order to Hardware components necessary to perform desired functions in a device such as vehicles to realize, to control. [State of the art]
[0002] Virtualization methods in which an operating system (OS), an application and the like are placed on The features that can be activated on a virtualized computer are generally known. When using such a system... In virtualization processes, a computer that controls an existing system is virtualized, and a program that Used to control the existing setup, it is activated on the virtualized computer in order to... A simple way to replicate the existing setup.
[0003] Thanks to such a virtualization method, a virtual machine (hereinafter also referred to as a “virtual” (Computer), which is a program for replicating an existing setup, for each of several existing facilities can be used. Furthermore, the multiple existing facilities can be expanded by Operating these virtual machines within a single system will be combined into a single facility.
[0004] Simultaneously with the merging of several existing facilities into a single facility, New functions, different from those of existing facilities, will be added. In this case A dedicated application can be made available to implement each of the new features, and a The virtual machine and the dedicated application can be scheduled as a single task for parallel operation. existing facilities and tasks.
[0005] Thus, when virtual machines and corresponding dedicated applications are planned as tasks, a Operating time (i.e., a duration for execution) is required to be adequately assigned to each of the tasks. For example, if a virtual machine is used to control a vehicle and a dedicated application is used as a task To plan, it is necessary to ensure real-time performance of the task. This requires... that it is guaranteed that an operating time is allocated to each task in each predetermined period.
[0006] In this regard, a known publication JP 2008 - 234 116 A discloses a virtual computer controller. The virtual computer controller includes tasks and interrupt handlers for each virtual computer. Priorities are assigned uniformly. In the event of an interruption, the priority of the task in operation is automatically adjusted. the virtual computer located with the priority of the interrupt handler according to the interrupt that The occurrence of the interrupt handler was compared to determine whether or not it should be executed.
[0007] According to the virtual computer controller disclosed in the preceding patent document, it is avoided that that an interrupt handler is executed according to a lower priority virtual machine when A virtual machine with higher priority is running. Therefore, the virtual machine with higher priority can to operate smoothly. However, even when priorities are assigned to individual tasks, an allocation may occur. Operating time for each virtual computer in every predetermined time period cannot be guaranteed. This means that that the real-time performance of every virtual computer is not necessarily guaranteed.
[0008] Reference is further made to the prior art documents US 6 757 897 B1, US 2003 / 0 018 680 A1, US 2005 / 0 146 425 A1 and US Reference is made to 2009 / 0113426A1, which was determined to be state of the art. US 6757897B1 describes a process. and a device for scheduling tasks. US 2003 / 0018680A1 describes a method for a Architecture of an operating system that performs multiple tasks simultaneously. US 2005 / 0146425A1 describes a Device for warning of a task that will be performed over a predetermined time frame. US 2009 / 0113426A1 describes a virtual computer system for managing a schedule for allocating a CPU. multiple guest operating systems. SUMMARY
[0009] Thus, it is a task to provide a planning procedure that is capable of To ensure real-time performance of specific tasks among those subject to scheduling.
[0010] The problem is solved by the features of claim 1 and the dependent claims. Advantageous Further training opportunities are reflected in the dependent entitlements.
[0011] One embodiment presents a method for scheduling multiple tasks in a device that performs periodic tasks. Reference cycles are generated and made available, with each reference cycle being given as a time slot, for the tasks Execution rights are granted successively, and the procedure comprises the following steps: first execution of the Tasks, where each of the tasks is given an activation time, the tasks being tasks of a first type, of each task necessarily has the right to execute during its activation time in each of the time slots. is given, and include tasks of a second type, not every task of which necessarily includes the The right to execute is granted during its activation time in each of the time slots, a sum of the Activation times given to the tasks of the first type in each of the time slots are less than one period. Each of the time slots is assigned a first priority to the tasks of the first type, which is used to... The right to execute is to be granted, and a second priority is given to each of the tasks of the second type, which is used to grant the right to execute; completing a specified task among the tasks to which the The right to execute is granted in a current time slot of the time slots by assigning the specified task the The right to execute is withdrawn if the period during which the right to execute continues exceeds the activation period. achieved, which is given to the specified task, wherein the current time slot is a time slot that is after the last reference cycle begins; second execution of identification processing when each of the reference cycles is complete. was completed or each of the tasks was completed, whereby in the case of identification processing i) in cases where Remaining tasks of the first type that are not in the current time slot have been completed, remain a task of the first type, whose first priority is at most among the remaining Tasks of the first type are identified and ii) in cases where there are no tasks of the first type that are in the were not completed in the current time slot, from remaining tasks of the second type of tasks that were in the If the current time slot is not yet completed, then a second-type task remains, whose second priority is... The maximum is identified; and the allocation of the right to execute to the identified task by the Identification processing.
[0012] It should be noted that tasks can each be configured as a virtual machine which runs a program for replicating a function that is realized by a device. Alternatively, tasks can each be considered as one Application consisting of a single processing unit or multiple processing units for the realization of The function exists and can be configured.
[0013] Thus, the time-guaranteed tasks are activated in each time slot without any loss of activation time, to guarantee operating time within a predetermined cycle. This allows the term "activation time" to be used. even defined as a duration that is longer than the shortest operating time that any time-guaranteed task This is given. The tasks not guaranteed by time are successively granted the right to execute them during a period. starting from the time the activations of all time-guaranteed tasks are completed until the arrival of the assigned to the following reference cycle. Thus, according to the planning procedure of the first aspect, the Time-guaranteed tasks and non-time-guaranteed tasks are activated in parallel to improve real-time performance. to ensure each of the time-guaranteed tasks.
[0014] It should be noted that the identification step does not necessarily have to be carried out after a straight The activated task (hereinafter also referred to as "active task") was deprived of its right to execute.
[0015] It can sometimes happen, when certain conditions are met during an active task, that it is necessary for the The task is no longer required; its activation (hereinafter also referred to as "being active") in the present to continue in the time slot.
[0016] Preferably, the procedure further includes the following steps: Determining whether a predetermined termination condition (or assignment condition) for a task among the tasks is fulfilled or not, whereby the provision that the The termination condition is met, allowing the task to voluntarily relinquish its given right of execution; and Consider that the task was completed in the current time slot if the task had the right to execute. resigns.
[0017] Thus, when it is no longer necessary for a task to which a right of execution has been assigned, in To be active in the current time slot, the task activation is terminated, so that the task's operating time is one can be assigned to a different task. Consequently, each time slot becomes more effective for activating the individual task. Tasks exploited.
[0018] Furthermore, a task to which a right of execution has been assigned can interrupt its own task if Once certain conditions are met, it can begin waiting for an event to be generated.
[0019] Thus, it is desirable that the method further comprises the following steps: Determining whether a predetermined The event expectancy condition for a task among the tasks is met or not, whereby the determination that the The event expectation condition is fulfilled, allowing the task to voluntarily relinquish its given right of execution and to... to wait for an event generated for the task; removing the task, which relinquishes the right to execute and to Waiting begins, from the tasks to which the right of execution is to be granted, so that the remote task is directed to the Event awaits; returning the waiting task to the tasks to which the right of execution is to be given when the An event is generated, with the second execution step being a step of applying the identification processing to the tasks that do not wait, and a step of allowing the identification processing to be carried out, This includes when the task is removed from the tasks to which the right of execution is to be granted in the removal step. becomes.
[0020] Thus, when a task has interrupted its activation and has begun to focus on generating a Waiting for an event allows the task to be in standby mode until an event is generated, thus extending the operating time of the Assigning one task to another. Therefore, each time slot is used for activating the individual tasks. more effectively utilized.
[0021] Preferably, the second execution right includes a step of executing the identification processing in order to to identify the task returned by the return step, and the procedure includes a step the withdrawal of the powers of execution includes the tasks for which the powers of execution are currently granted, when the execution step identifies the returned task in the return step.
[0022] Thus, when an event suitable for the available task is generated, the available task Task activated by replacing the active task (the task to which an execution right has been assigned), under which The condition is that the priority of the active task is lower than the priority of the available task. Therefore Response time is reduced, where response time is the time taken before processing begins. the generated event is carried out.
[0023] It can sometimes happen that a ready task is restored as a task to which a The right to execute is assigned when one of the tasks is to be assigned a right to execute (that is, when (any of the tasks is active). Of course, in this case, the active task must be activated within the The current time slot will be completed. In this case, the task with the highest number will be selected during the identification step. Priority among tasks, including the active task whose activations still need to be completed, identified.
[0024] As mentioned above, non-time-guaranteed tasks are assigned during the period starting from Time of completion of the activation of time-guaranteed tasks until the arrival of the next Reference cycle activated. Therefore, the non-time-guaranteed tasks do not necessarily require an operating time in each case. each time slot will be assigned.
[0025] It is preferred that the method further includes a step to update the second priority, which addresses the tasks is assigned the second type, depending on whether each of the second types of tasks is in the current time slot. Whether it was completed or not, includes.
[0026] Thus, if a non-time-guaranteed task is assigned an execution right that extends beyond its activation time, Effectively, the second priority of the task is lowered, making it unlikely that you will encounter the task in the Subsequent time slots are assigned a right of execution. If a task without a guaranteed time slot is not assigned a right of execution, then no right of execution is assigned to it. The right to execute, which is effective over its activation time, increases the second priority of the task. that it is likely that you will be assigned a right to execute the task in the following time slots This will result in a distribution of operating times to non-time-guaranteed tasks over a period of several Time slots are controlled.
[0027] The second priority can be calculated as follows.
[0028] Method according to claim 5, wherein Specifically, the second priority is based on a fixed priority, which provides a fixed priority value, and a Suspension level, which represents how many of the tasks of the second type were not completed in each of the time slots, calculated, and the update step updates the tasks of the second type by updating the Suspension level depends on whether every task of the second type has been completed in the current time window or not.
[0029] Thus, the distribution of operating times to non-time-guaranteed tasks in the period over several Time slots can be controlled by setting the individual priorities according to the properties of the non-time-guaranteed Tasks are determined and taken into consideration.
[0030] For each time-guaranteed task, a maximum activation duration and a minimum activation time are specified. The maximum activation time is set to guarantee normal activation. The minimum Activation time is required to guarantee normal activation in each activation cycle. Assuming that a time-guaranteed task 1 and a time-guaranteed task 2 are provided, and that these Tasks are to be planned. Task 1, which has a guaranteed timeframe, has the maximum [number] in each activation cycle. The activation duration is set to 1 ms, and the minimum activation time is set to 0.2 ms. Time-guaranteed task 2 has a maximum activation duration in each activation cycle, which is set to 4 ms, and The activation time is set to 2 ms. Since at least 2 ms is required for the activation of the time-guaranteed task 2. Because the time-guaranteed task 1 is required, it cannot be activated at a cycle time of 1 ms. This means that the Normal activation of the time-guaranteed task 1 cannot be guaranteed.
[0031] It is also preferred that each of the tasks of the second type has a maximum activation duration and a required activation time, the maximum activation duration is a maximum activation duration for which Normal activation of functions implemented by tasks of the first type is permitted, the required Activation time is a period of time provided by the execution right that is minimal enough to activate the The procedure involves the following steps if functions are required within the maximum activation duration: Determining the maximum activation duration, which is the shortest among the maximum activation durations of the tasks to be planned by the The first type is the time slot; and calculating a value by dividing the necessary activation time for each the tasks of the first type to be planned are determined by the maximum activation duration for each of the The first type of planning tasks is defined; calculating a minimum activation time for each of the tasks of the of the first type by multiplying the calculated value by the time slot; and setting a time that is longer than the minimum activation time of each of the tasks of the first type, as the activation time such that a sum of the The activation times of all tasks of the first type are limited within the time slot.
[0032] Thus, the time-guaranteed tasks are activated by using a time slot as a cycle, which a time period equal to or less than the maximum activation duration. Therefore, the interval is prevented from exceeding the maximum activation duration. The time between activations of a time-guaranteed task becomes longer than the maximum activation duration. Similarly, the Minimum activation time for each time-guaranteed task by dividing the required activation time by the Maximum activation duration is calculated by multiplying the result value by the time slot. In each time slot Every task with a guaranteed time will be activated for at least the minimum activation time. Thus, even for a Time-guaranteed task with a maximum activation duration longer than the time slot, at least one Operating time is ensured in accordance with the required activation time within each maximum activation duration. This is based on... In this way, the time-guaranteed tasks can be activated in parallel in a normal state.
[0033] The tasks to be included in the planning can sometimes be dynamically added or removed. In such a case In this case, a configuration as explained below can be provided.
[0034] Preferably, the method further comprises the following steps: removing the task to be planned, so that the task not planned; and adding the task that was not planned, so that the task is newly considered one to be planned. A task is added, including the time slot setting step, the value calculation step, and the calculation step for The minimum activation time and the activation time setting step are repeated at intervals.
[0035] Thus, when tasks to be scheduled are added or removed, the time slot and the The activation time of each time-guaranteed task is appropriately updated.
[0036] If the number of time-guaranteed tasks to be scheduled is increased too much, it may be that not all tasks will be able to be scheduled over The corresponding activation times are activated in the time slot. Consequently, the real-time performance of the Tasks with guaranteed timeframes have deteriorated.
[0037] More preferably, the method further comprises the following steps: Determining whether, if a new task that the Since the new task belongs to the tasks of the first type that are to be planned, it is possible to add it to the tasks to be planned. to add or not, based on the maximum activation duration and the minimum activation time of the new task and the maximum activation durations and the minimum activation times of the tasks to be planned of the of the first type, where the addition step adds the new task to the tasks to be planned, if the The determination step determines that it is possible to add the new task to the tasks to be planned.
[0038] Thus, a new time-guaranteed task is only added if the activation exceeds the activation time in the Time slot for each of the new time-guaranteed tasks to be added, and the time-guaranteed tasks, which are already permitted to be planned, is ensured. Consequently, it is avoided that the Real-time performance of time-guaranteed tasks through the addition of the new time-guaranteed task is worsening.
[0039] If the time slot, activation time or the like is updated while a task is over its If activation time is active, the activation time of the task cannot be adequately ensured.
[0040] It is preferred that the time slot determination step, the value calculation step, the calculation step for The minimum activation time and the activation time setting step are executed each time a The timing, defined by the reference cycles, is synchronized.
[0041] Thus, the time slot and the activation times of the corresponding tasks are determined at the time, when a round of tasks is completed, ensuring that the activation time for each task is adequately guaranteed.
[0042] As mentioned above, each task can be considered an application consisting of a single A processing unit or multiple processing units are used to implement a function and can be configured.
[0043] Alternatively, at least one of the tasks is a virtual machine formed by a program that performs a Replicates a function that is implemented in a device.
[0044] Thus, if, for example, several facilities are combined into a single facility, by the Virtualization methods are used to guarantee real-time performance for each of the specific virtual machines. become.
[0045] The planning procedure according to the first to eleventh aspects as described above can be considered a virtual Machine control program for implementing the planning process by a computer (twelfth aspect) marketed become.
[0046] Alternatively, the planning procedure can be described as a planning device for implementing the planning procedure. (thirteenth aspect) are marketed. In these cases, similar effects are achieved as in the planning process, which as described above, has been achieved.
[0047] The following describes the planning of tasks, each of which is run as a virtual machine in a hardware real-time system. how it is configured, such as vehicle-specific equipment, is explained. In such a case Given that vehicle-integrated equipment is a hardware real-time system, it is likely that a fatal problem will occur. even if time requirements are not met for a moment. In such a case, a maximum Activation duration and a minimum activation time can be set for each task. The maximum The activation time allows for a normal activation to be guaranteed. For the minimum activation time, it is... required that it guarantees normal activation in each activation cycle.
[0048] It is assumed that a task 1 and a task 2 are provided, and that these tasks are to be planned are. Task 1 has a maximum activation duration of 1 ms and a minimum activation duration of 1 ms in each activation cycle. Activation time of 0.2 ms. Task 2 has a maximum activation duration of 4 ms in each activation cycle. the minimum activation time of 2 ms. Since at least 2 ms are required to activate task 2, the Task 1 cannot be activated within a 1 ms cycle. Therefore, the normal activation of Task 1 cannot occur. guaranteed.
[0049] As a countermeasure, the planning can be carried out using a method described below. be carried out. In this case, the planning is performed in a device that periodically performs a Arrival timing is generated as a reference cycle, shares a reference cycle that provides a time slot for allocation as An activation time is required for each of the several tasks to be scheduled, and each task that is scheduled It is intended to operate over the assigned activation time in each time slot.
[0050] Specifically, a maximum activation duration and a required activation time can be specified in each task. The maximum activation duration allows for the simulation of a function in a normal state. The required activation time is to replicate the function in a normal state at any maximum level. Activation time required.
[0051] This planning procedure can include: a time slot determination step to determine a shortest Maximum activation duration as a time slot from the maximum activation durations of multiple tasks that lead to are to plan; and an activation time setting step to calculate a value for each task to be planned by Divide the required activation time specified for the task by the maximum activation time specified for The task is defined, and a value is calculated as a minimum activation time by multiplying the The result of the division by the time slot, in order to obtain a time equal to or greater than the minimum activation time as an activation time.
[0052] In the activation time setting step, the activation time of each task can be set such that it falls within a range where the sum of the activation times does not exceed the time slot.
[0053] The term ‘task’ can refer to the virtual machine mentioned above or to a Refer to the application for implementing a given function.
[0054] Thus, the tasks are activated by using a time slot as a cycle, which is a time period is equal to or less than the maximum activation duration. Therefore, the interval between the The activation time of a task exceeds the maximum activation duration. Similarly, the minimum activation time for... each task by dividing the required activation time by the maximum activation duration and by Multiplying the resulting value by the time slot calculates the task. Each task is performed at least once in each time slot. over the minimum activation time. Thus, even for a task with a maximum activation duration, the is longer than the time slot, at least one operating time corresponding to the required activation time in each Maximum activation time is ensured. In this way, multiple tasks can be performed in parallel within a normal session. The state will be activated.
[0055] If the activation time of each task to be scheduled is set to the minimum activation time, it It is likely that a vacant period, in which no task is activated, will be caused in each time slot.
[0056] This allows the aforementioned planning procedure to further include a calculation step for a provisional This includes the activation time. In this step, the maximum activation durations for the corresponding... The planned tasks are defined and summed up. Then, the maximum activation duration for each task is determined by... The sum is divided, and the resulting value is multiplied by the time slot to obtain a provisional activation time. to obtain.
[0057] Then a task in which the provisional activation time is shorter than the minimum activation time can be considered a time-deficit task is provided, and a task in which the provisional activation time is longer than The minimum activation time can be provided as a time-surplus task. For the Time-deficit tasks can be the difference between the provisional activation time and the minimum activation time. This can be considered a deficit period. For the time-surplus tasks, the difference between the provisional and the time-surplus tasks can be... The activation time and the minimum activation time are considered as excess time.
[0058] The determination step for the provisional activation time may include a task determination procedure for Determining one or more time surplus tasks for any one of time deficit tasks; a determination procedure for an added (added) time to set a time equal to or greater than the deficit time as an added Time for the time-deficit task, which is introduced into the task definition procedure; and a definition procedure for a subtracted time to determine a subtracted time that is equal to or less than the Excess time is, for each of the excess time tasks that are defined in the task definition procedure, such that that the sum of the subtracted times equals the added time for the time deficit task, which is included in the The task definition procedure is being introduced.
[0059] In the activation time determination step, the determination procedure is performed for all of the time deficit tasks. carried out. During the determination procedure, a time can be set for each of all time-deficit tasks, which is determined by adding the The provisional activation time and the added time obtained are used as a single activation time. Likewise, For each of all time-excess tasks, a time can be calculated by subtracting the subtracted time from the The provisional activation time obtained can be used as an activation time.
[0060] Thus, the value obtained by dividing the maximum activation duration by the sum of the maximum The activation duration is multiplied by the time slot to obtain the resulting time as a provisional value. To use the activation time of each task. Thus, the time slot for assigning to individual tasks is eliminated. Causing excess time is shared. Likewise, the provisional activation time is determined by a task in which the The provisional activation time is longer than the minimum activation time, distributed to a task in which the provisional The activation time is shorter than the minimum activation time. Therefore, a time equal to or greater than the minimum activation time is used. Activation time is assigned to each task. In this way, the time slot is divided into operating times (i.e., operating durations). the corresponding tasks are subdivided without causing a vacancy period, thereby activating tasks more efficiently. become.
[0061] Furthermore, tasks to be scheduled can sometimes be dynamically added or removed. In such a In that case, the configuration described below can be used.
[0062] Specifically, the planning procedure described above can further include: a distance step to remove tasks that are subject to scheduling; and an add step to add new ones. Tasks that are not yet subject to planning. In this configuration, the time slot assignment step can be... and the activation time setting step is executed periodically.
[0063] Thus, a time slot and the activation time of each task to be scheduled are appropriately updated, even when a task to be scheduled has been added or removed.
[0064] If the number of tasks to be planned increases too much, not all of these tasks can be managed using the appropriate resources. Activation times are set within the time slot. This prevents tasks from being completed in a normal time slot. The state will be activated.
[0065] The above planning procedure can therefore further include: a determination step for Determine whether adding a new task to be scheduled by defining the new task as a scheduling object based on the maximum activation duration and the minimum activation time of the new task to be added and the maximum activation durations and the minimum activation times of the Tasks that are already allowed to be scheduled, those that are being added, and those that are not. During the addition step, the... A new task is added as a planning object if an affirmative determination is made in the determination step. became.
[0066] Thus, a new task to be planned is only added if the new task and the tasks to which the Planning is already permitted, and activation can take place via the corresponding activation times. Therefore, the The normal activation of each task is not worsened by adding the new task.
[0067] If a time slot, activation time or the like is updated while a task is running over the If the activation time is active, the operating time of the task can no longer be adequately ensured.
[0068] This allows the determination step to be carried out in the above planning procedure when the The timing of the reference cycle has arrived.
[0069] Thus, a time slot or activation time for each task can be set at the time when a The round of individual tasks is completed, ensuring adequate operating time for each task.
[0070] For a task, it may be necessary to exhibit real-time performance.
[0071] In the above planning procedure, it may be necessary for at least one of the tasks to be planned to to exhibit real-time performance. The task allows for a maximum activation duration, which To ensure real-time performance, while the required activation time can be a minimum activation time, which is required to ensure real-time performance during any maximum activation duration.
[0072] Thus, multiple tasks are activated in parallel while maintaining the real-time performance of the tasks. becomes.
[0073] The above planning procedure can be described as a planning program for implementing the planning procedure by a computer or as a device for implementing the planning process. In these cases The effects similar to those of the aforementioned planning procedure will also be taken into account. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In the accompanying drawings: Fig. 1A is a block diagram showing the configuration of vehicle-specific equipment and the configuration a control program according to a first embodiment of the present invention; Fig. 1B is a block diagram showing an A-task of the control program, which is implemented as a virtual machine. is configured, represents; Figure 2 is an explanatory diagram showing how a task is downloaded from an external server. and is added as a planning object; Fig. 3 shows a task management table according to the first embodiment; Figure 4 is a flowchart illustrating activation task identification processing according to the first represents embodiment; Figures 5A to 5D are flowcharts, each illustrating an activation completion process, a Abort processing, event anticipation processing, and event generation processing according to the first To illustrate embodiment; Fig. 6 is a flowchart illustrating a time slot (TS) flowchart according to the first embodiment. represents; Fig. 7 is a flowchart illustrating a planner initialization process according to the first embodiment. represents; Figures 8A to 8C are flowcharts, each showing a task addition process, a Task removal processing and periodic review processing according to the first To illustrate embodiment; Fig. 9 is a time sequence diagram showing the operating times (durations) of tasks A to E of the represents a control program according to the first embodiment; Figures 10A to 10D each represent a task management table according to the first embodiment; Figure 11 is a time sequence diagram showing the operating times of tasks A to E of the control program according to the first embodiment; Figure 12 is a time sequence diagram showing the operating times of tasks A to E of the control program according to the first embodiment; Figures 13A to 13D each represent a task management table according to the first embodiment; Figure 14A shows a task management table when adding or removing tasks. is represented according to the first embodiment. Fig. 14B is a timing diagram showing the operating times of tasks A to E when adding or The removal of tasks is carried out according to the first embodiment; Fig. 15A is a block diagram showing the configuration of vehicle-specific equipment and the configuration of a control program according to a second embodiment of the present invention; Fig. 15B shows a task management table according to the second embodiment; Fig. 16 is a flowchart illustrating a planner initialization process according to the second embodiment. represents; Figure 17 is a flowchart showing the processing of an activation time within a time slot (TS). (hereinafter also referred to as TS activation time) according to the second embodiment; and Fig. 18 is a flowchart illustrating task addition processing according to the second embodiment. represents. DETAILED DESCRIPTION OF PREFERRED EXECUTION FORMS
[0075] With reference to the drawings, some embodiments of the present invention are explained below. It should be noted that the embodiments of the present invention do not relate to those described below. are limited, but can be changed in various ways, as long as the change in the The technical scope of the present invention falls within this scope. [First embodiment]
[0076] According to Fig. 1A and Fig. 1B to Fig. 14A and Fig. 14B, a vehicle-specific equipment 100 and a Control program 1, which is included in the vehicle-specific equipment 100 according to a first embodiment of the The present invention is installed as described.
[0077] The vehicle-specific equipment 100 includes an ACC (adaptive cruise control, adaptive Cruise control function, a lane keeping assist function, a Perimeter monitoring function, vehicle navigation function, and audio function. The ACC function monitors a distance between the vehicle equipped with the vehicle-specific equipment 100 (hereinafter referred to as (also referred to as "the vehicle in question" or simply "the vehicle"), and a preceding vehicle vehicle to reduce the speed of the vehicle in question when the distance between the vehicles The LKA function shrinks to ensure a safe distance between vehicles. It warns or assists with this. Steering wheel handling when the moving vehicle in question almost leaves its lane. Perimeter surveillance The function monitors the perimeter of the vehicle in question using a camera, radar, or such as detecting obstacles around the vehicle's perimeter to inform the driver. The vehicle navigation function provides information about the current position of the vehicle in question or presents it to the Route assistance is available for the vehicle in question up to a destination. The audio or audiovisual function reproduces the content of music or images, or provides audio / visual information through various means. Mailings.
[0078] Fig. 1A is a block diagram showing the configuration of the vehicle-connected equipment 100, which includes a CPU 110 and a physical facility 120 includes, and the configuration of the control program 1, which is in the The vehicle-specific equipment 100 is installed, and the program is executed by CPU 110. Control program 1 is stored in a memory 120A, which is configured by a device that has no Memory hold action is required, such as flash memory in physical facility 120.
[0079] The control program 1 includes an A-task 10 for implementing the ACC function, a B-task 20 for Implementing the LKA function, a C-task 30; implementing the perimeter surveillance function, a D-task 40 to implement the vehicle navigation function and an E-task 50 to implement the audio function. The Tax program 1 also includes a tax administration unit 60 for performing tasks A to E 10 to 50.
[0080] Tasks A to E 10 to 50 can be configured as a virtual machine that runs a program to The complete or partial replication of the function to be implemented in a given facility is shown in Fig. 1B. a block diagram that serves as an example of a configuration of task A 10, which is configured as a virtual machine, represents.
[0081] Task A 10 includes an APL (a programming language) 11, an OS (operating system, operating system) 12 or the like, a virtual facility 13 and a virtual CPU (central processing unit, central processing unit) 14. The APL 11 includes a program implemented in the form of binary codes. was, whereby the program was operated in a facility linked to the function being replicated. virtual facility 13 and virtual CPU 14, which are so-called virtualized hardware, are Programs to emulate APL 11 and OS 12 or similar.
[0082] OS 12 is a known OS that includes a first execution strand (The term execution strand is equivalent to (Regarding the term Thread) 11a, a second execution thread 11b and the like, which configure the APL 11, plans.
[0083] The virtual CPU 11 is a program that analyzes the binary codes of the APL 11 and the OS 12 or the like and it puts into operation.
[0084] The virtual facility 13 is a program that acts as an interface (I / F) between the APL 11 and the OS 12 or the like and serves the physical device 120 of the vehicle-related equipment 100. The APL 11 and OS 12 or the like controls the physical facility 120 by accessing the virtual facility 13.
[0085] Tasks A to E 10 to 50 do not necessarily have to be virtual machines, but each of them can be implemented as a A program consisting of a single processing unit to implement a corresponding function, or as a program that consists of multiple processing units (i.e., multiple execution strands) must be configured.
[0086] In the present embodiment, tasks A to C 10 to 30 are the tasks that each Real-time performance is required, with a response time for an input from outside within a specific range. This applies if these tasks are configured as virtual machines; the OS will be installed as a single virtual machine in each of the virtual machines. Real-time OS configured.
[0087] Tax Administration Unit 60 is explained.
[0088] The tax administration unit 60 includes a planning section 61 and an establishment tax section 62. Planning section 61 assigns the right to execute tasks A to E 10 to 50 sequentially in order to carry out these tasks. to plan. The setup control section 62 controls the physical Sche facility 120 according to the instructions given by each task (given by a virtual Setting up each task (if each task is configured as a virtual machine) and transmits signals from the physical setup 120 to each task (or the virtual setup of the task).
[0089] The planning section 61 includes a task state receiver 61a, a planner determiner 61b, a Planner executor 61c and a task add / remove receiver 61d. The task status receiver 61a The planner / determiner receives information from the tasks, for example, regarding the assignment of an execution right. 61b defines an activation state of a task based on such information provided by the Task state receiver 61 a is received, while it assigns an execution right to each task. The Planner / Executor 61c carries out a task to which an execution right has been assigned. The task addition / - The distance receiver 61d adds or removes tasks to be scheduled.
[0090] If an execution right is granted to a task configured as one of the aforementioned virtual machines Assigned, execution strands are scheduled by an OS in the virtual machine to manage the execution strands. to run in parallel. If an output configured with multiple execution strands is also a Once the execution right has been assigned, the execution strands in the task are planned in the same way by an OS.
[0091] The operation of the control program 1 according to the first embodiment is explained.
[0092] First, an overview of a task planning carried out in planning section 61 is explained.
[0093] The planner stipulator 61b of planning section 61 establishes a reference cycle by generating periodic Arrival time fixed. In a timeslot (hereinafter also referred to as "TS") that corresponds to a reference cycle If the planner specifies in section 61b, they assign a right of execution to tasks A to E in succession in order to carry out these tasks. to be performed in parallel.
[0094] As already described above, real-time performance is required for each of the A to C tasks. to demonstrate, and thus it is necessary for each of these tasks that they have a predetermined operating time in each is guaranteed for the predetermined period. Thus, the planner 61b sets a TS that is guaranteed for tasks A to C (later (described in more detail) is suitable. The planner 61b then assigns the A to C tasks in each TS one after the other. Execution rights are granted to ensure the real-time performance of each task over the required time.
[0095] It should be noted that when referring to an expression ‘Activation time in a TS (Activation duration)’ (hereinafter also referred to as TS activation time) refers to a time period which a Uptime (or operating time) is the amount of time required for each task in a TS to achieve its real-time performance. to ensure. Likewise, if the expression "final planning" (also "DS") is used, it means "definite scheduling". (designated)" refers to the planning of tasks that require real-time performance.
[0096] It should also be noted that a sum of the TS activation times of the A to C tasks that the DS is subject to are (hereinafter also referred to as "DS tasks"), is smaller than a TS. Thus, if an execution right that is effective over the TS activation period, each of these tasks has been given a vacancy period give before the subsequent TS is started. The planner 61b uses this vacancy time to assign each of the D and E- Tasks to be assigned an execution right.
[0097] The planning carried out in this way for the D and E tasks is called ‘time-splitting’ (also known as (TSS, time share scheduling) is referred to as "TSS". If one considers each of the D and E tasks, which are also TSS... are subject to (hereinafter such tasks are also referred to as "TSS tasks"), is a time in a TS A period is given to which an execution right is assigned. This time is also referred to as a "TS activation time". However, the length of the vacancy period after the end of the DS is not guaranteed. Therefore, the TSS tasks are assigned in each TS. not necessarily an execution right is assigned that is effective over the TS activation time.
[0098] The behavior and activation states of the tasks are explained below.
[0099] Once a task has been assigned an execution right by the planner (61b), the activation of the Task started by planner executor 61c. In this case, tasks that are activated (hereinafter referred to as...) (referred to as "active tasks"), each voluntarily relinquish their execution rights when predetermined The assignment conditions are met. The assignment conditions could, for example, be that a specific signal is present in An active task is entered from physical unit 120. If the active task in question is a In the virtual machine, the virtual device receives the specific signal from the physical machine. Device 120 uses the device control section 62 and thereby detects the input of the specific signal into the relevant active task.
[0100] Furthermore, active tasks will each voluntarily relinquish their execution rights when predetermined Event expectation conditions are met, and they begin to focus on generating a predetermined event. wait. The event expectation conditions or events can be, for example, a specific signal entering a The active task is entered by the physical facility 120, or specific instructions may be given. be given another task.
[0101] The activation states of a task include: a ready-to-activate state, in which a Execution right that is effective over a TS activation time in a TS has not been assigned; an active A state in which an execution right has been assigned; an activation-completed state in which a Execution right, which is effective over a TS activation time in a TS, has been assigned and the activation in the TS has been completed; and an event expectation state where it is waiting for an event to be generated.
[0102] When a task is brought into an activation-complete state, the scheduler 61b of the task is in the same TS not assign a right of execution again. Likewise, the planner 61b of a task in Do not assign a right of execution based on the expected event state.
[0103] The determination of a TS and the like is explained.
[0104] Fig. 2 is an explanatory diagram showing how a task is downloaded from an external server. and is added as a planning object. As shown in Fig. 2, the vehicle-specific equipment 100 has a Wireless communication with an external server 150 using a mobile phone or similar device (not shown) to Download a new task from external server 150 for storage in memory. The vehicle-bound Equipment 100 also adds the downloaded task to the planning objects. Furthermore, the Vehicle-specific equipment 100 in response to instructions from a user, a task that is in the The storage location can be re-added to the planning objects, or a task can be performed from the objects to be planned. Remove. If a scheduled task has been added or removed, a TS and a TS activation time are generated for each of the DS tasks is determined.
[0105] With regard to a task that is required to provide real-time performance (DS task), a The maximum activation duration and required activation time are determined. The maximum activation duration refers to... to a maximum period that is allowed to ensure the real-time performance of the task and to enable the function to execute the task normally. The required activation time refers to a minimum time within each maximum time frame. Activation time, where the minimum time is required to ensure real-time performance of the task and to perform the task normally.
[0106] The following example of the C task, which uses a virtual machine to implement the The perimeter monitoring function is explained. In task C, the functions are described, for example, by a Information collected by camera and radar is analyzed to determine the presence / absence of obstacles. to determine the perimeter of the vehicle in question. Is the time required for this determination process sufficient? If the system is not functioning correctly, it is likely that the detection of obstacles will be delayed or ineffective. In light of this, a time required to reliably carry out the determination process, measured by a Perimeter surveillance device, which is replicated by the virtual machine that configures the C task, is used. The required activation time can then be determined based on, for example, the measured time and a Relationship of an operating clock (or operating cycle) between the perimeter monitoring device and the Vehicle-specific equipment will be charged at 100.
[0107] Furthermore, the maximum activation duration and the required activation time can be based, for example, on the emulation or simulation results of the task in question, or based, for example, on a The algorithm for the task in question must be defined.
[0108] When tasks are added or removed, the scheduler determiner 61b, as a TS, determines the smallest of the Maximum activation durations for tasks, each of which must deliver real-time performance. Furthermore... The planner determiner 61b specifies a TS activation time for the task, which must provide real-time performance. based on the maximum activation duration and the required activation time of the task (details will follow later). (described).
[0109] Next, a task management table is explained which specifies the TS activation times and the like of the A- up to E-tasks. Figure 3 shows an example of the task management table. The task management table is managed by the planner responsible for planning section 61b.
[0110] The task management table includes elements such as ‘Name’, which specifies the name of a task, "Type", which specifies a planning mode (DS or TSS), "TS activation time", which specifies a TS activation time, and "Activation state", which indicates an activation state of a task.
[0111] Elements for the DS tasks (tasks that must provide real-time performance) include “maximum Activation duration, which specifies a maximum activation duration; required activation time, which specifies a required Specifies activation time, and "DS priority", which is a priority order for assigning execution rights at DS specifies. The DS priority, for example, is determined based on the maximum activation duration of each DS task. Similarly, in the "DS priority," the smaller the value, the higher the priority order. Details of the "DS- Priority will be described later.
[0112] Elements for the TSS tasks include ‘TSS priority’, which is a priority order for assigning a The right of execution at TSS specifies a "fixed TSS priority", which specifies a value used to calculate the priority of TSS. is used, i.e., a fixed value of a priority order for assigning a right of execution at TSS, and "TSS- "Exclusion level", which specifies a value used to calculate TSS priority, i.e., a degree that a TSS task has not yet been brought to the activation-complete state in every TS.
[0113] In the case of the ‘TSS priority’ and the ‘fixed TSS priority’, a larger value indicates a higher priority order. The ‘TSS priority’ is calculated by adding the ‘fixed TSS priority’ and the ‘TSS exposure level’.
[0114] If a TSS task is activated in each TS over its TS activation time, the “TSS- "Suspension level", and if the TSS task is not activated beyond its TS activation time, the "TSS-" increases. "Suspension level". Consequently, if a TSS task is activated beyond its TS activation time, the "TSS- The priority is deactivated, thus lowering the priority order. If the task is not completed within its TS activation time, When activated, the "TSS priority" increases, thus raising the priority order. Details will be described later.
[0115] According to Fig. 4, a processing method for identifying an activation task, which a A subroutine is used to determine a task to which an execution right has been assigned. Figure 4 is an example. Flowchart illustrating the processing to identify an activation task. The current Processing is carried out by planning section 61. The current processing is called when... for example, when the reference cycle arrives (that is, when a new TS is started) or when a task is moved into a The activation-complete state or an event expectation state is brought into operation.
[0116] The description is subsequently considered from the perspective of which processing takes place in each of the Components that configure planning section 61 are executed. It should be noted that each processing step... is realized when the CPU 110 of the vehicle-specific equipment 100 every component that is a program, executes.
[0117] First, in step S205, the planner determiner 61b of planning section 61 refers to the Task management table referenced to show the presence of tasks in a ready-to-activate state to determine. Is a task present in a ready-to-activate state (YES in (Step S205), the controller continues with step S210. If no task is in a ready-to-activate state (NO) If this occurs in step S205), the current processing will be terminated.
[0118] In step S210, the planner determiner 61b refers to the task management table to determine the Presence of any tasks in an active state or a ready-to-activate state from the DS tasks to determine. Then, if a positive determination is made (YES in step S210), the controller proceeds with step S215 continues. If a negative determination is made (NO in step S210), the control system continues with step S220.
[0119] In step S215, the planner determiner 61b refers to the task management table to determine a Task that has the highest priority (i.e., the one with a minimum value in the "DS Priority" element) under to identify the DS tasks that are in an active state or in a ready-to-activate state. Then The control system continues with step S230.
[0120] In step S220, the planner determiner 61b refers to the task management table to determine the Presence of any tasks that are in an active state or a ready-to-activate state, to determine from the TSS tasks. If a positive determination is made (YES in step S220), the controller proceeds with Step S252 continues. If a negative determination is made (NO in step S220), the control system continues with step S230.
[0121] In step S225, the planner determiner 61b refers to the task management table to determine a Task that has the highest priority (i.e., the one that has a maximum value in the element "TSS priority") among the TSS tasks that are in an active state or a ready-to-activate state, to Identify. Then the control system continues with step S230.
[0122] In step S230, the planner determiner 61b refers to the task management table in order to determine whether the task identified in step S215 or step S225 is in an active state is located or not. If a positive determination is made (YES in step S230), the current processing is The process is complete. If a negative decision is made (NO in step S230), the control system continues with step S235.
[0123] In step S235, the planner determiner 61b refers to the task management table to determine the to determine the presence of any tasks in an active state. Then the controller proceeds if any If tasks are in an active state (YES in step S235), proceed to step S240. If no task is in In an active state (NO in step S235), the control system continues with step S245.
[0124] In step S240, the planner determiner 61b assigns the execution right to each task that is in the active state. withdrawn in order to terminate the activation of the tasks. Likewise, the element "Activation State" of the Tasks in the task management table are set to the ready-to-activate state by the planner 61b. Updated.
[0125] In step S245, the planner assigns 61b to the task identified in step S215 or step S225 a Right of execution granted. This initiates the activation of the task by the planner-executor 61c. Likewise, the Element "Activation state" of the task in the task management table by the scheduler 61b on the The active state has been updated. Then the current processing is complete.
[0126] According to Fig. 5A, an activation completion process is described below. Fig. 5A is a Flowchart illustrating the activation completion process. During the Activation completion processing is assigned to tasks whose runtime exceeds the TS activation time. has successively withdrawn the right to execute, while the execution rights have been newly assigned to other tasks The current processing is executed when the uptime of a task in each TS exceeds its TS- Activation time has been reached.
[0127] In step S305, the planner determiner 61b of the task to which an execution right has been assigned, the Execution rights revoked to terminate task activation. Then the element "Activation State" is displayed. The task in the task management table is updated to an activation-completed state. Then the Control continues with step S310.
[0128] In step S310, the processing to identify an activation task is called in order to assign a task that is located in When the data is in a ready-to-activate state, a new execution right can be assigned. Then, when the processing is complete, a new execution right can be assigned. Once the identification of an activation task is complete, the current processing is finished.
[0129] According to Fig. 5B, a termination process is explained. Fig. 5B is a flowchart that illustrates the This represents abort processing. In abort processing, if a task voluntarily terminates its execution, the right to execute is revoked. has reassigned the right to execute a different task.
[0130] The present processing is carried out when termination conditions are met in an active task and the task recipient 61 of planning section 61 from the task via the voluntary transfer of its He was informed about the enforcement rights.
[0131] In step S315, the planner determiner 61b updates the element "Activation state" of the Task management table to an activation-completed state for the task that has its execution right has been ceded. Then the control system continues with step S320.
[0132] In step S320, the processing to identify an activation task is called in order to assign a task to a task in to assign a new execution right to a ready-to-activate state. Then, when the processing is complete, Once the identification of an activation task is complete, the current processing is finished.
[0133] Figure 5C illustrates event expectation processing. Figure 5C is a flowchart that shows the Event expectancy processing represents this. In event expectancy processing, a task that has started is... to wait for an event, away from objects to which an execution right is to be assigned, and a The right to execute is reassigned to another task. The current processing will be carried out if... Event expectation conditions are met in an active task and the task state receiver 61a is notified by the The task involved beginning the waiting period for an event to occur.
[0134] In step S325, the planner determiner 61b updates the element "Activation state" of the Task management table on an event expectation state for a task that has delegated an execution right The system has begun waiting for an event to be generated. Then the control system proceeds to step S330.
[0135] In step S330, the processing to identify an activation task is called in order to assign a task in A new execution right can be assigned to the "ready to activate" state. This occurs when the processing is necessary to identify a Once the activation task is complete, the current processing is finished.
[0136] An event generation processing operation is explained according to Fig. 5D. Fig. 5D is a flowchart that illustrates the Event generation processing is involved. In event generation processing, when a predetermined event occurs, a signal is generated. The task awaiting the event's creation is reinstated as an object to which a The right to execute is to be assigned. The current processing is carried out when the generation of a The event was captured, and the event is suitable for a task in the event expectation state.
[0137] In step S335, the planner determiner 61b updates the element "Activation state" of the Task management table set to a ready-to-activate state for the task that is based on the creation of a The event is awaiting. Then the control system continues with step S340.
[0138] In step S340, the processing to identify an activation task is called. During this process, The activation of an active task continues as it is, or an execution right is granted to a task that is in the The state that was brought into readiness for activation by generating an event is reassigned. Then, if the Once processing to identify an activation task is complete, the current processing ends.
[0139] According to Fig. 6, a TS process flow is explained below. Fig. 6 is a flowchart that illustrates the TS- This represents process flow processing. In TS process flow processing, a task to which an execution right has been assigned, The right to execute is withdrawn if a new TS is started while A data processing task is newly assigned a right of execution. The processing in question is carried out when a A new TS will be started.
[0140] In step S405, the planner determiner 61b refers to the task management table to determine the existence of TSS- To determine tasks. If TSS tasks are present (YES in step S405), the control system continues with step S410. During the If no TSS tasks are found (NO in step S405), the control continues with step S450.
[0141] In step S410, the scheduler 61b refers to the task management table to determine a front TSS- Select the task from the TSS tasks listed in the task management table. Then Determines whether the "Activation State" element of the selected task is an activation-completed state. is defined or not. If a positive determination is made (YES in step S410), the control system proceeds to step S415. If a negative determination is made (NO in step S410), the control system continues with step S420.
[0142] In step S415, the planner determiner 61b reduces the degree that is in the ‘TSS exposure level’ of the selected The task is defined in the task management table. Specifically, a new TSS suspension level is created, followed by... Formula calculated to determine the calculated value in the element "TSS Suspension Level" of the task management table To determine: New TSS exposure level = TSS exposure level before update × (9 / 10)
[0143] After updating the TSS exposure level, the controller proceeds to step S435.
[0144] In step S420, the scheduler determiner 61b refers to the task management table to determine whether the The "activation state" of the selected TSS task is defined as an active state or a ready-to-activate state. is defined or not. If a positive determination is made (YES in step S420), the controller proceeds to step S425. If a negative determination is made (NO in step S420), the control system continues with step S440.
[0145] In step S425, the selected TSS task, if it is in an active state, is granted its right to execute. withdrawn by the planner setting 61b in order to terminate the activation of the selected task. In this case The planner 61b accesses the task management table to select the element "Activation state" of the The selected TSS task is defined as an activation-completed state. Then the controller proceeds with... Continue to step S430.
[0146] In step S430, the planner determiner 61b increases the degree specified in the “TSS exposure level” of the selected The task is defined in the task management table. Specifically, a new TSS suspension level is created, followed by... Formula calculated to determine the calculated value in the "TSS Suspension Level" of the Task Management Table To determine the new TSS exposure level: TSS exposure level before update × (9 / 10) + 5
[0147] After updating the TSS exposure level, the controller proceeds to step S435.
[0148] In step S435, the scheduler 61b updates the “TSS priority” of the selected task in the Task management table. Specifically, a sum of a value specified in the "fixed TSS priority" is calculated, and a value specified for the "TSS exposure level" of the selected task is calculated to determine the The calculated value is set in the "TSS priority". Then the control system continues with step S440.
[0149] In step S440, the scheduler determiner 61b determines the presence / absence of any TSS tasks whose “TSS- Priority has not yet been updated. It has been determined that TSS tasks whose "TSS priority" has not yet been updated If the update has been completed (YES at step S440), a leading TSS task of the TSS tasks that are in the The tasks listed in the task management table are newly selected. The control then proceeds to step S410. In the absence of such tasks (NO at step S440), the control system continues with step S445.
[0150] In step S445, the planner definer 61b defines the "activation state" of the task management table for the Tasks that are not in an event-anticipation state are considered to be in a ready-to-activate state. Then the Control continues with step S450.
[0151] In step S450, the processing to identify activation tasks is called. Of the DS tasks The right to execute is assigned to the one with the highest priority. Then, when the processing Once the identification of an activation task is complete, the current processing ends.
[0152] Figure 7 illustrates a planner initialization process. Figure 7 is a flowchart showing the This represents planner initialization processing. For example, the "TS-" is processed during planner initialization processing. The activation time of the task management table is defined. The current processing is determined by the scheduler. 61b is performed when the control program 1 is started or when a task to be activated is added or is removed.
[0153] If the current processing is performed when the control program 1 is started, the The task management table must be in a state where records of the tasks to be planned are entered. have been defined, where the "name" and the "type" are defined. In this case, regarding the records that corresponding to the DS tasks, which define the "maximum activation duration" and the "required activation time". Similarly, regarding the records that correspond to TSS tasks, the "TSS priority" and the "fixed TSS" were defined. priority" and the "TSS exposure level" are defined.
[0154] In step S505, the scheduler determiner 61b refers to the task management table to determine the shortest of the Maximum activation durations recorded for the "maximum activation duration" element of the DS tasks to be identified. The planner stipulator 61b then determines that the identified shortest maximum The activation duration is a TS, and the control continues with step S510.
[0155] In step S510, the scheduler determiner 61 calculates a TS activation time for each task, as explained below. which is entered in the task management table.
[0156] Specifically, the following formula is used to calculate the TS activation time with regard to the DS tasks: TS activation time = (required activation time / maximum activation duration) × TS
[0157] It should be noted that a predetermined tolerance to (required activation time / maximum activation duration) x TS can be added to provide the resulting value as the TS activation time.
[0158] With regard to the TSS tasks, a predetermined fixed time (e.g. 0.1 ms) can be uniformly referred to as the TS activation time. can be used. Alternatively, a fixed time individually defined for each of the TSS tasks can be used as the TS- Activation time can be used. In this case, the fixed time can be based on the binary data that each task performs. configure, be specified.
[0159] Then the TS activation time of each task is set in the element "TS activation time" of the The task management table is set, and then the control continues with step S515.
[0160] In step S515, the planner defines 61b the “DS priority” with respect to the DS tasks. Task management table. Specifically, the "DS priority" is defined according to the following rules. (a) Of the DS tasks, tasks are selected in ascending order of maximum activation duration. They were set one after the other with priorities in descending order. (b) If the tasks have the same maximum activation duration, tasks will be prioritized in descending order. Order of required activation time, sequentially with priorities in descending order determined. (c) Do the tasks have the same maximum activation duration and the same required activation time? Tasks are assigned that are determined by the task according to the foremost record in the Start the task management table, assigning tasks sequentially with priorities in descending order.
[0161] Once the definition of the "DS priority" is complete, the control system continues with step S520.
[0162] In step S520, the scheduler setter 61b turns off a scheduler initialization flag to enable the current processing to end.
[0163] Figure 8A illustrates a task addition process. Figure 8A is a flowchart that shows the Task addition processing represents task addition processing. In task addition processing, tasks to be scheduled are added. Newly added. Current processing is handled by the task add / removal receiver 61c. This is done, for example, when a user adds a task to the memory of vehicle-specific equipment 100 is stored, has been requested, or if a new task as above It has already been downloaded and explained.
[0164] In step S605, the task add / remove receiver 61d determines whether a task to be added A DS task is determined whether or not it is a task. If a positive determination is made (YES in step S605), the controller proceeds with step S610 continues. If a negative determination is made (NO in step S605), the control system continues with step S615.
[0165] In step S610, the task add / remove receiver 61d determines whether adding a new DS- The task is permissible or not. If a positive determination is made (YES in step S610), the controller proceeds with step S615 continues. If a negative determination is made (NO in step S610), the control system continues with step S625.
[0166] Specifically, adding a new DS task is based on the proportion of time allocated to the DS in each TS. This is required in the case where the new DS task has been added. More precisely, it refers to the Task Add / Remove Recipient 61d to the task management table to determine the "maximum To identify the activation duration and the required activation time of each of the current DS tasks. At the same time, the task addition / removal receiver 61d identifies the "maximum activation duration". and the "required activation time" of the new DS task to be added, based on the binary data that the Configure the new DS task to be added. Then each of these tasks (i.e., the current DS tasks and (the new DS tasks to be added) the required activation time divided by the maximum activation duration, followed by the calculation of the sum of the divided values. If the sum is less than a predetermined value (e.g., "1"), It can be determined that adding the task in question is permissible. If the sum is equal to or greater than The predetermined value can be used to determine that adding the task in question is not permitted.
[0167] In step S615, the task add / remove receiver 61d adds a record to the end of the Add to task management table, where the record corresponds to the task to be added and likewise each The elements of the newly added task are defined. Then the control continues with step S620.
[0168] Specifically, the task add / remove receiver 61d identifies the name and type as well as the Scheduling mode (DS or TSS) of the task in question based on the binary data that configures the task, to define the identified data as the "name" and "type" for the added task. Is the When a task is added as a DS task, a maximum activation duration and a required activation time are specified. based on the binary data, the identified data is defined as the "maximum activation duration" and the to set the "required activation time" for the added recording. On the other hand, if the added The task of a TSS task is to identify a fixed TSS priority based on the binary data in order to process the identified To set data as the "fixed TSS priority" for the added recording. Similarly, the task addition / - distance receiver 61d set the recording's "TSS exposure level" to "0" and the "TSS priority" to the value the ‘fixed TSS priority’.
[0169] In step S620, the task addition / removal receiver 61d turns on the scheduler initialization flag. (sets the flag) to terminate the current processing.
[0170] In step S625, which the control continues with if adding a task is not permitted, the Task addition / removal recipient 61d a notification by means of a display (not shown) about it The system orders that adding a task is not permitted, thereby terminating the current processing.
[0171] Figure 8B illustrates task removal processing. Figure 8B is a flowchart that shows the Task removal processing represents this. In task removal processing, tasks are removed from the system. Planning objects are removed. Current processing is, for example, handled by the task addition / - distance receiver 61d in response to a signal or the like, which is generated by a user operation or by a The external unit is delivered and executed.
[0172] In step S640, the task add / remove receiver 61d removes the records that the task add / remove receiver 61d has added. to correspond to the objects to be planned and the tasks to be removed, and then proceeds to step S645.
[0173] In step S645, the task add / remove receiver 61d sets the scheduler initialization flag to to terminate the current processing.
[0174] Figure 8C illustrates a periodic review process. Figure 8C is a flowchart showing the This represents periodic review processing. In periodic review processing, the Task management table checked. Current processing is being carried out by scheduler 61b upon arrival. the timing of the reference cycle.
[0175] In step S660, the planner determiner 61b determines whether the planner initialization flag has been set or not. If a positive determination is made (YES in step S660), the control system continues with step S665. If a negative determination is made If a decision is made (NO in step S660), the current processing is terminated.
[0176] In step S665, the scheduler determiner 61b calls the scheduler initialization processing as a sub-routine. The current processing will end once the planner initialization processing is complete.
[0177] A specific example is explained below in which the A to E tasks are carried out by planning section 61 be planned.
[0178] First, with regard to Fig. 9 and Fig. 10A to Fig. 10D, activations of tasks A to D are explained, which the Period from when the B-task transitioned into an event expectation state, until the B-task became a The right to execute is assigned with the creation of an event.
[0179] Fig. 9 is a timing diagram showing the activation times of tasks A to E. Fig. 10A to Fig. 10D Each of these represents the task management table. In this explanation, the task management table is set to a 1 ms interval. determined.
[0180] As shown in each of the task management tables from Fig. 10A to Fig. 10D, the operating times in A TS of tasks A to E is set to "0.1 ms", "0.3 ms", "0.2 ms", "0.2 ms" and "0.1 ms", where The sum of the operating times is less than the TS (1 ms). This activates each of the A to E tasks via the TS. Activation time in each TS. As shown in Fig. 10A, at the start of a first cycle, i.e., a first TS, the DS priorities for tasks A to C were set to "1", "2" and "3" respectively, while the TSS priorities for tasks D and E were set to Tasks are set to "20" and "0" respectively. Thus, in the first cycle, the tasks are activated accordingly. about the TS activation time in the order of tasks A to E (see Fig. 9).
[0181] In a subsequent second cycle, the B task occurs after it has been assigned a right of execution. and after 0.2 ms, it relinquishes its right to execute and enters a state of anticipation, since the The event expectation conditions of task B are met. At the same time, task C is started to activate. will be (see Fig. 9). Fig. 10B shows the task management table immediately after the transition of task B into represents a state of anticipated event.
[0182] In a third cycle, no execution right is assigned to task B in the event expectation state, while tasks A and C to E are activated in that order via the corresponding TS activation times (See Fig. 9). Fig. 10C shows the task management table at the start of the third cycle.
[0183] In a fourth cycle, while task C is active, an event that task B has been waiting for is generated. (see Fig. 9). In this case, the right to execute is transferred from task C to task B, so that the B- The task transitions into an active state. At the same time, the C task, which did not extend beyond the TS activation time, also enters an active state. It transitioned from being fully active to a ready-to-activate state. Figure 10D shows the task management table. immediately after the activation of task B begins following the generation of the event. Does the operating time of task B- Once the task reaches its TS activation time, the execution right is transferred to the C task. If the operating time of the The C task, combined with the operating time before the event is generated, reaches its TS activation time. Task C enters an activation-completed state. After that, tasks D and E are addressed in this state. The order in which an execution right is assigned is determined.
[0184] In this specific example, the right to execute was transferred from task C to task B, since The event was generated during the activation of task C, which has a lower priority than task B. However, if an event was generated during the activation of task A, which has a higher priority than task B, If task B exhibits this, it enters a ready-to-activate state. Then, when task A is activated... Once completed, task B was assigned the right to execute.
[0185] In the same way, if an event has been generated while the D or E task, i.e. TSS task, is active The right to execute is transferred to task B. Then, when the activation of task B is completed... The right to execute was transferred to the task that was active at the time the event occurred.
[0186] According to Fig. 11, the activations of the A to E tasks are explained by using the case as an example. This occurs when the B task relinquishes its right of execution. Figure 11 is a timeline diagram illustrating this case. Note that tasks A to E are planned here based on the task management table in Fig. 10A.
[0187] In a first cycle, the right of execution is transferred when the B task relinquishes its right of execution, while the Once the assignment conditions are met, the task is transferred from task B to task C. Then task B is transferred, even though the If the operating time has not yet reached its TS activation time, it transitions to an activation-completed state. Then, in In one or after a second cycle, the A to E tasks in this order via the corresponding TS- Activation times enabled.
[0188] According to Fig. 12 and Fig. 13A to Fig. 13D, the activations of tasks A to E are explained below, by taking the case as an example in which the sum of the TS activation times of tasks A to E determines the TS exceeds. Fig. 12 represents a time sequence diagram, and Figs. 13A to 13D each represent a This represents a task management table for this case.
[0189] As shown in each of the task management tables depicted in Figs. 13A to 13D, the TS activation times of tasks A to E are set to "0.2 ms", "0.3 ms", "0.3 ms", "0.2 ms" and "0.2 ms". specified, where a TS is set to 1 ms and the sum of the TS activation times exceeds the TS. Therefore, the D and E tasks, i.e., the TSS tasks, will be completed during the vacancy period of "0.2 m" from the end of the DS is scheduled until the arrival of the following TS. Therefore, the D and E tasks are not mandatory. fully activated in every TS over the TS activation time.
[0190] A first cycle is explained. As shown in the task management table of Fig. 13A, at the start In the first cycle, the "TSS priority" of the D and E tasks is set to "20" and "0" respectively. Therefore, after Completion of the activations of tasks A to C, i.e., DS tasks, the D task over its TS activation time The E-task is activated, but no execution right is assigned (see Fig. 12).
[0191] Consequently, as shown in the task management table of Fig. 13B, the ‘TSS exposure level’ increases. The E-task starts at "5" at the beginning of the second cycle, while the "TSS priority" becomes "5". On the other hand, the "TSS suspension level" of the D task that was activated over the TS activation time in the first cycle, "0", where whose "TSS priority" remains "20". Thus, the D task, which has a higher position than the E task, is in the In the second cycle, an execution right was again assigned over the TS activation time, but the E-task is still No right of execution was assigned (see Fig. 12).
[0192] After that, the E task will not be activated until the "TSS priority" of the E task equals the "TSS priority" of the D task. exceeds. When starting from the TSs in or after the second cycle, the "TSS priority" of the E-task increases in the The sequence begins with "10", "14", "18" and "21" and finally exceeds "20" at the start of a sixth cycle. On the other hand, the ‘TSS priority’ of the D task remains unchanged at ‘20’ in or after the second cycle. Consequently, as shown in Fig. 13C, the "TSS priority" of the E task exceeds the "TSS priority" of the D task. The task is encountered for the first time at the start of the sixth cycle. Therefore, in the sixth cycle, the E-task is presented via its TS- Activation time is activated, followed by the activation of the D task.
[0193] As shown in Fig. 13D, the “TSS priority” of the D task increases to “25” when a seventh cycle is started, while the "TSS priority" of the E task drops to "19". For this reason, in the seventh cycle of the D task an execution right is assigned that is effective over its TS activation time, but the E-task is not assigned any Right of execution assigned.
[0194] Then, each time a new TS arrives, the ‘TSS priority’ of the D and E tasks is increased or reduced. Thus, when carrying out the TSS in each TS, these tasks are successively granted the right to execute in assigned in descending order of the values specified for the "TSS priority".
[0195] According to Fig. 14A-1, Fig. 14A-2 and 14B, the activation time sequence of each task is explained by describing the case as An example is taken in which the A-task to be planned is added or removed. Fig. 14A-1 and Fig. 14A2 Each of these represents the task management table in this case. Figure 14B is a timeline diagram illustrating this case. represents.
[0196] It is assumed that tasks B to E are initially subject to planning and that, consequently, the B- until e-tasks are entered into the task management table (see Fig. 14A-1). In this case, a task management table is assigned to "2". ms" is set, which corresponds to the maximum activation duration of task B. The "TS activation time" is also set. The B to E tasks were each set to "0.6 ms", "0.4 ms", "0.2 ms", and "0.1 ms". The B to E tasks are each at the time of a first cycle and a second cycle, which are shown in the time sequence diagram of Fig. 14B. are displayed, activated.
[0197] It is further assumed that the addition of the A task, i.e. a DS task, was requested, that the task addition processing was executed and that the record corresponding to task A, added to the end of the task management table. In this case, the planner initialization processing is performed. executed when the second cycle is complete, in order to update the task management table as shown in Fig. 14A-2. Update. During this update, a TS is set to "1 ms", which is the maximum activation duration of the A- The task corresponds. Likewise, the "TS activation time" for tasks B to E and task A is each set to "0.3". ms'', ''0.2 ms'', ''0.2 ms'', ''0.1 ms'' and ''0.1 ms'' are set, while the ''DS priority'' of the B, C and A tasks each is set to "2", "3", and "1". Thus, each of the A to E tasks is assigned at the time of a third cycle and a fourth cycle, which are shown in the time sequence diagram in Fig. 14B, is activated.
[0198] Furthermore, it is assumed that the removal of the A task was requested in the fourth cycle and that the task removal processing has been executed. In this case, the scheduler initialization processing will be performed. executed when the fourth cycle has finished. Therefore, the recording corresponding to task A is executed by The task management table was removed in order to recreate the task management table as shown in Fig. 14A-1. update (where a TS is set to "2 ms", which corresponds to the maximum activation time of task B). Then each of the B to E tasks will be addressed at the time of a fifth cycle, as shown in the timeline diagram in Fig. 14B. As shown, it is activated.
[0199] According to planning section 61 of tax administration unit 60, in the tax program 1 of the first In this embodiment, the A to C tasks, i.e., DS tasks, are performed without failure over the corresponding TS activation times in Each TS is activated, thus guaranteeing the uptime of each of these tasks per predetermined period. Furthermore, The D and E tasks, i.e., TSS tasks, will be successively granted the right to execute tasks during the period starting from the Complete completion of all activations of tasks A to C until the arrival of the subsequent reference cycle. assigned. Consequently, while tasks A to E are activated in parallel, the real-time performance of tasks A to C is... Tasks ensured. [Second embodiment]
[0200] According to Fig. 15A and Fig. 15B as well as Figs. 16 to 18, a vehicle-specific equipment 800 is described below. described according to a second embodiment of the present invention.
[0201] The vehicle-specific equipment 800 of the second embodiment features an ACC (adaptive cruise control, adaptive cruise control function and a lane keeping assist (LKA) function and a Perimeter monitoring functions similar to those of the first embodiment. Fig. 15A is a Block diagram showing the configuration of the vehicle-specific equipment 800, which is similar to the first embodiment is configured, and the configuration of a control program 700, which is included in the vehicle-specific equipment 800 It is installed and executed by a CPU 810. The control program 700 is located in a memory (not (shown) stored, which is configured by a facility that does not require a memory hold action, such as for example, a flash memory in a physical facility 820.
[0202] The control program 700 includes an A-task 710, a B-task 720 and a C-task 730, which similar to those of the first embodiment, as well as a control management unit 740 for executing A to C- Tasks 710 to 730. Tasks A to C, 710 to 730, can be performed in the same way as in the first embodiment. each as a virtual machine or as a program consisting of a single processing unit for realizing a consists of the corresponding function, or as a program that consists of several processing units (i.e. be configured with multiple execution strands).
[0203] The tax administration unit 740 includes a planning section 741 and an establishment tax section. 742. Planning section 741 assigns the right to execute tasks A to C 710 to 730 successively in order to carry them out. To plan tasks. The setup control section 742 is configured in the same way as in the first embodiment. configured.
[0204] The planning section 741 includes a task add / remove receiver 741a, a A scheduler 741b and a scheduler executor 741c. The task add / remove receiver 741a adds to Planning tasks are added or removed. The planner assigns a right of execution to each of the tasks (741 b). The planner / executor 741c activates the tasks to which an execution right is assigned.
[0205] If an execution right is assigned to a task that is a virtual machine mentioned above Once configured, execution strands are scheduled by an OS in the virtual machine to manage the execution strands. to run in parallel. If a task configured with multiple execution strands is also assigned a Once the right to execute is assigned, the execution strands are planned in the same way within the task by an OS.
[0206] The planner stipulator 741b of planning section 741 establishes a reference cycle by generating a periodic Arrival time is set. The scheduler 741b assigns tasks A to C, 710 to 730, to a time slot (TS) which one period of the reference cycle, based on the task management table described later, to grant a right of execution one after the other in order to activate these tasks in parallel.
[0207] The task management table mentioned above is explained. Fig. 15B shows an example of the This is a task management table. The task management table is in the possession of planner 741b of the Planning section 741.
[0208] The task management table of the first embodiment includes the same The task management table of the second embodiment includes an element for "Name" to specify the name of each Task: to provide elements for "maximum activation duration", "required activation time", and "TS activation time", which each the maximum activation duration, the required activation time and the TS activation time in the same way as in the first embodiment. In addition to these elements, the task management table includes a Element ‘Priority’ for specifying a priority order when assigning an execution right to each of the Tasks.
[0209] The following describes a planning of tasks that are entered in the task management table.
[0210] The planner setting 741b determines as the TS the shortest of the maximum activation durations of the tasks that are in the The task management table is entered. At the same time, the planner function 741b calculates a TS activation time. for each of the tasks based on the maximum activation duration and the required activation time (this will be in the (Detail described later) and records the calculated value in the task management table. Then the The planner 741b grants the tasks successively a right of execution, which extends over the TS activation time of each task. It is effective to plan the tasks in descending order of priority.
[0211] According to Fig. 16, a planner initialization process is described below. Fig. 16 is a Flowchart illustrating a planner initialization process. The planner initialization process is used for... Determining a time slot TS and elements such as the "TS activation time" of the task management table used, which are used when assigning an execution right to each task. The present processing is executed by the planner 741b when the control program 700 is started or when there are items to be planned Tasks were added or removed.
[0212] If the present processing is carried out at the time of starting the control program 700, the The task management table must be in a state where the records of the tasks to be scheduled are entered. are, where the ‘name’, ‘maximum activation duration’ and ‘required activation time’ are defined.
[0213] In step S905, the scheduler 741b refers to the task management table to specify the TS. The shortest of the maximum activation durations is determined. Then the control system continues with step S910.
[0214] In step S910, the planner determiner 741b calls a determination processing of a TS activation time (will be described later) (explained) which includes a subroutine for calculating a TS activation time for each of the tasks that are in the The task management table is entered. Then the control system continues with step S915.
[0215] In step S915, the scheduler 741b defines the "priority" of the task management table. Specifically, the Priority is defined according to the rules explained below. (a) Tasks in ascending order of maximum activation duration are performed sequentially with Priorities were set in descending order. (b) If the tasks have the same maximum activation duration, tasks will be prioritized in descending order. Order of required activation time, sequentially with priorities in descending order determined. (c) Do the tasks have the same maximum activation time and the same required Activation time begins, tasks are started from the task that is the foremost recording in the The task management table corresponds to a sequence with priorities in descending order. determined.
[0216] After the definition of the “priority” is complete, the control continues with step S920. In step S920, the Planer setting 741b sets a planer initialization flag to terminate the current processing.
[0217] According to Fig. 17, a processing method for setting a TS activation time is explained below. Fig. 17 is a Flowchart illustrating the processing of a TS activation time. This processing is a Subroutine for determining a TS activation time for each of the tasks.
[0218] In step S1005, the scheduler 741b uses the following formula to determine a minimum activation time of To calculate each of the tasks entered in the task management table. Minimum activation time = ( (required activation time / maximum activation duration)×TS
[0219] Likewise, the planner 741b calculates a provisional activation time for each of the tasks, which are entered in the task management table, using the following formula. Provisional Activation time = (maximum activation duration / sum of maximum activation durations in the tasks that are in the (Task management table entries are)×TS
[0220] In this case, for example, a time that is approximately a few tenths of the TS can be considered a tolerance. be set. Then the maximum activation duration can be divided by the time resulting from the sum of the The above sum of the maximum activation durations and the tolerance results.
[0221] The control then proceeds to step S1010. In step S1010, the scheduler 741b determines the tasks, each of which has a provisional activation time that is shorter than the minimum activation time, as Time-deficit tasks. Then, the planner determiner 741b identifies a time-deficit task according to the foremost Recording from the time-deficit tasks entered in the task management table. Then the Planner 741b for the identified time deficit task a difference, i.e. a deficit time, between the provisional time and minimum activation time. Then the control system continues with step S1015.
[0222] In step S1015, the scheduler determiner 741b determines whether a time deficit task was identified in step S1010. or not. If a positive determination is made (YES in step S1015), the control system continues with step S1020. If a negative determination is made (NO in step S1015), the control system continues with step S1050.
[0223] In step S1020, the planner determiner 741b determines the tasks, each of which has a provisional activation time Tasks that exhibit a duration longer than the minimum activation time are then identified as time-surplus tasks. Planner 741b a time surplus task according to the foremost record from the Time-excess tasks that are entered in the task management table. Then the planner determiner calculates 741b. for the identified time-surplus task, a difference, i.e., a surplus time, between the provisional time and the minimum activation time. Then the control system continues with step S1025.
[0224] In step S1025, the planner determiner 741b compares the length of the deficit time of the time deficit task that was defined in step S1010 is identified by the length of the excess time of the excess task identified in step S1020. If the excess time is equal to or greater than the deficit time (YES in step S1025), the control system continues with step S1030. If the excess time is less than the deficit time (NO in step S1025), the control system continues with step S1040.
[0225] In step S1030, the scheduler determiner 741b handles the time deficit task identified in step S1010, The deficit time is treated as a correction time and the correction time is added to the provisional activation time to determine the resulting time. Time to redefine as a provisional activation time. In this case, if the excess time of the Time surplus task identified in step S1020 that exceeds the deficit time, a time equal to or greater than The deficit time, which is equal to or less than the surplus time, is used as the correction time. Then the Control continues with step S1035.
[0226] In step S1035, the scheduler subtracts 741b for the time surplus task identified in step S1020. The correction time, which is set in step S1030, is adjusted from the provisional time to the resulting time. to set a provisional activation time. Then the control system continues with step S1010.
[0227] In step S1040, the scheduler determiner 741b handles the time deficit task identified in step S1010, The excess time of the time surplus task identified in step S1020 is treated as a correction time and added to the Correction time to the provisional activation time, in order to re-establish the resulting time as a provisional activation time to determine. Then the control system continues with step S1045.
[0228] In step S1045, the planner determiner subtracts 741b for the surplus task identified in step S1020. The correction time, which is set in step S1040, is adjusted from the provisional time to the resulting time. to set a provisional activation time. Then the control system continues with step S1020.
[0229] In step S1050, which the controller proceeds to if no time deficit task was identified in step S1015, If the planner determiner 741b treats the provisional activation period as a TS asset The processing time for all tasks entered in the task management table defines the "TS-" Activation time of the task management table. Then the current processing is finished.
[0230] Figure 18 illustrates a task addition process. Figure 18 is a flowchart that shows the Task addition processing is used in this process. Task addition processing involves adding new tasks to be scheduled. added. Current processing is being handled by the task add / removal receiver 741a executed when, for example, a user adds a task to a memory location. vehicle-specific equipment 800 is stored, has been requested, or if a new task is required, as with the first The design is explained and has been downloaded.
[0231] In step S1105, the task add / remove receiver 741a determines whether to add a new The task is permissible or not. If a positive determination is made (YES in step S1105), the controller proceeds with Step S1110 continues. If a negative determination is made (NO in step S1105), the controller proceeds to step S1120. on.
[0232] Specifically, the task addition / removal receiver 741a refers to the task management table, to identify the ‘maximum activation duration’ and the ‘required activation time’ of each of the tasks. At the same time, the task add / remove receiver 741a calculates a value for each of the tasks by Divide the required activation time by the maximum activation duration and then calculate the sum. from the values resulting from the divisions. If the sum is equal to or less than 1, it is determined that the Adding the new task is permitted. If the sum is greater than 1, it is determined that adding the new task is allowed. The task is not permissible.
[0233] In step S1110, the task add / remove receiver 741a adds a record to the end of the Add to the task management table, where the record corresponds to the new task to be added. Task Add / Remove Receiver 741a also defines the individual elements for the added Recording. The control system then continues with step S1115.
[0234] Specifically, the name of the task to be added is identified based on the binary data that define the task Configure and define the "Name" element of the added recording. Then a maximum Activation duration and a required activation time were identified based on the binary data to enable the elements. the ‘maximum activation duration’ and the ‘required activation time’ for the added recording define.
[0235] In step S1115, the task add / remove receiver 741a sets the scheduler initialization flag to to terminate the current processing.
[0236] In step S1120, which the processing continues with if adding a task is not permitted, the Task addition / removal recipient741a notification by means of a notice or the like (not (as shown) that adding a task is not permitted, and thereby ends the current processing.
[0237] In the second embodiment, task removal processing is carried out in the same way as in the first. Implementation by the task addition / removal receiver 741a in response to, for example, a User operation or a signal output from an external unit is performed. Furthermore, the Planner 741b upon arrival of the timing of the reference cycle, a periodic review procedure on in the same manner as in the first embodiment. An explanation regarding the contents of the Task removal processing and periodic monitoring processing are omitted.
[0238] In planning section 741 of the tax administration unit 740 in the tax program 700 according to the second In this embodiment, a maximum activation duration is divided by the sum of the maximum activation durations, and The resulting value is multiplied by the TS. The time resulting from these calculations is called a Provisional activation time for each task is adopted. Thus, the TS can be used without generating excess time for An assignment is shared for each of the tasks. Likewise, the provisional activation time of a task is determined in where the provisional activation time is longer than the minimum activation time, it is assigned to a task in which the The provisional activation time is shorter than the minimum activation time. Therefore, each task is assigned an equal amount of time. or greater than the minimum activation time. Consequently, no vacancy period is assigned. generated in which no task is activated, thereby dividing the TS into the operating times of the corresponding tasks. This can be achieved, and thus tasks can be carried out more efficiently. [Modifications] (1) With regard to the TSS of the first embodiment, a right to perform each of the TSS tasks was granted. assigned once during the period from the end of the DS to the end of the TS. Alternatively, These TSS tasks will be repeatedly assigned the right to execute during this period, so that the TSS tasks remain active until the end of the TS. This prevents the vacant period, i.e., the period during which tasks are performed, from being used. h. the time when no task is active is caused in each TS. In this way, tasks activated more efficiently. (2) In the first and second embodiments, the OS and the task were placed in a virtual machine provided by implementing a program in the form of binary code, where the program in another device that is related to the function to be replicated, was carried out. However, the present invention is not limited thereto. For example, the OS and the like are based on a program implemented in the form of source code, generated, whereby the program was executed in a different device. In this case Similar effects are achieved. (3) In the second embodiment, the TS activation time was based on the provisional Activation time, which uses the required activation time and the sum of the maximum The activation durations were calculated and determined. This avoids the vacant period, i.e., the Time is caused in each Task Schedule when no task is active.
[0239] However, the planner 741b can determine the TS activation time according to the following steps (a) to (c). (a) Calculate a minimum activation time for each task listed in the task management table is registered. (b) Calculating a surplus time that is a difference between a sum of the minimum Activation times of the individual tasks and the TS are defined. In this case, for example, a time of A tolerance of approximately a few tenths of the TS can be defined. Then the tolerance can be adjusted by the Difference between the sum of the minimum activation times of the individual tasks and the TS to be subtracted in order to use the resulting value as the excess time. (c) Dividing the excess time equally by the number of tasks that are in the Task management table entries are used, for example, to track the time resulting from adding the divided tasks. The time and the minimum activation time result in setting the TS activation time for each TS.
[0240] The ratio of sharing the excess time can be determined according to the priority order of the individual tasks. For example, it can be determined in such a way that more time is allocated to tasks with higher priority. Furthermore For example, all of the excess time can be allocated to the tasks with the highest priority among the tasks that are in the Task management tables are entered and assigned. With this configuration, each task management table is also assigned. used to activate the tasks efficiently. (4) In the first embodiment, the TSS exposure level was changed (updated) depending on whether the The relevant TSS task was active or not during the TS activation time, and then the TSS priority was determined. calculated based on the sum of the fixed TSS priority and the TSS exposure level. However, this is The procedure for calculating the TSS priority is not limited to this. For example, the TSS priority can then The value will be increased or decreased depending on whether the TSS task in question was active during the TS activation time. without updating the TSS exposure level. In this case, similar effects are achieved.
[0241] Below is a correlation between the expressions used in the foregoing embodiments. are used, and the expressions used in the claims are provided
[0242] The TS activation time corresponds to the activation time. The DS task (task to be subjected to the DS) This corresponds to the time-guaranteed task. The TSS task (the task subject to the TSS) corresponds to the non-time-guaranteed task. Time-guaranteed task. DS priority corresponds to first priority. TSS priority corresponds to second priority.
[0243] In the processing to identify an activation task, steps S215 and S225 correspond to the Identification processing and the identification step. Similarly, step S245 corresponds to the The allocation step and step S240 correspond to the withdrawal step.
[0244] Step S305 of the execution completion process corresponds to the completion step. Step S315 of the Abort processing corresponds to the abort step. Step S325 of event expectation processing corresponds to the Removal step. Step S335 of the event generation processing corresponds to the recovery step.
[0245] Steps S415, S430 and S435 of the TS flow processing correspond to the update step. Step S505 of the The planner initialization process corresponds to the time slot assignment step. Step S510 of the same process. This corresponds to the activation time setting step. Step S610 of the task addition processing corresponds to the Determination step and step S615 of the same processing operation correspond to the addition processing operation. Furthermore, Step S640 of the task removal processing corresponds to the removal step.
[0246] In a method for planning tasks for controlling hardware facilities, a specified The task among the tasks that the right of execution has in a present time slot is completed by its the right to execute is withdrawn if a period during which the right to execute continues exceeds the activation period The specified task is achieved. Identification processing is performed when each of the Reference cycles have been completed or each of the tasks has been finished. In identification processing, i) when Time-guaranteed tasks that were not completed in the current time slot will remain; a time-guaranteed Identified a task whose priority is maximally low among the remaining tasks, and ii) and if no non- completed time-guaranteed tasks in the current time slot of remaining non-time-guaranteed tasks, Tasks that are not yet completed in the current time slot will remain as a non-time-guaranteed task. The highest priority is identified. The right to execute is granted to the identified task by the Assigned to identification processing.
Claims
1. Method for scheduling multiple tasks given in a device having periodic reference cycles generated, where each of the reference cycles is given as a time slot, the tasks are successively assigned execution rights and the procedure includes the following steps: first execution of the tasks, where each of the tasks is given an activation time, the tasks tasks of a first type, each task necessarily has the right to execute during its activation time in each of the time slots, and include tasks of a second type, of which not every task necessarily the execution right is given during their activation time in each of the time slots, a sum of the Activation times given to the tasks of the first type in each of the time slots is less than one period each of the time slots, the tasks of the first type are each given a first priority, which is used to execution right, and the tasks of the second type are each given a second priority, which used to grant the right of execution; Terminate a specified task among the tasks that has the execution right in a current time slot of the Time slots are given by depriving the specified task of the execution right if a time during which the right of execution persists, reaches the activation time given to the specified task, whereby the current time slot is a time slot starting after the last reference cycle; second execution of an identification processing when each of the reference cycles has been completed or each of the Tasks have been completed, whereby in the identification processing i) in cases where the tasks of the first Type remaining tasks of the first type that have not been completed in the current time slot remain, a Task of the first type whose first priority is maximal among the remaining tasks of the first type is identified and ii) in cases where there are no tasks of the first type that have not been completed in the current time slot, of remaining tasks of the second type of tasks that have not yet been completed in the current time slot, remain, a task of the second type whose second priority is maximum is identified; and Assigning the execution right to the identified task through identification processing.
2. The method according to claim 1, further comprising the following steps: Determine whether a predetermined termination condition for a task among the tasks is met or not, whereby the provision that the termination condition is met allows the task to voluntarily abandon its given to assign the right of execution; and Consider that the task has been completed in the current time slot if the task has the execution right resigns.
3. Method according to claim 1 or 2, further comprising the following steps: Determine whether a predetermined event expectation condition for a task among the tasks is met or not, where the determination that the event expectation condition is met allows the task to voluntarily change its given to assign execution rights and wait for an event generated for the task; Remove the task that relinquishes the execution right and begins to wait from the tasks to which the Execution permission is to be given so that the remote task waits for the event; Return the waiting task to the tasks that are to be given the execution right when the event is generated, wherein the second execution step comprises a step of applying the identification processing to the tasks that not wait, and includes a step of allowing the identification processing to be carried out when the Task is removed from the tasks to which the execution right is to be given in the removal step.
4. The method according to claim 3, wherein the second execution right includes a step of carrying out the identification processing in order to Return step to identify the task returned, and the procedure includes a step of withdrawing the execution rights from the tasks to which the execution rights are assigned are currently given when the execution step returns the returned task in the return step identified.
5. The method according to any one of claims 1-4, further comprising: a step to update the second priority assigned to the tasks of the second type, depending on whether each of the second types of tasks has been completed in the current time slot or not.
6. The method according to claim 5, wherein the second priority based on a fixed priority, which provides a fixed value of the priority, and a Suspension level, which represents how many of the tasks of the second type were not completed in each of the time slots, is calculated, and the update step updates the tasks of the second type by updating the suspension level depending on updates whether each task of the second type has been completed in the current time window or not.
7. Method according to one of claims 1-6, wherein each of the tasks of the second type has a maximum activation duration and a required activation time that Maximum activation duration is a maximum activation duration for which normal activation of functions provided by Tasks of the first type are implemented, the required activation time is permissible, which is determined by the execution right to The time provided is the minimum necessary to activate the functions in the maximum activation period, the procedure includes the following steps: Specify the maximum activation duration, which is the shortest of the maximum activation durations of the planned Tasks of the first type is as the time slot; and Calculate a value by dividing the necessary activation time required for each of the tasks to be scheduled in the first type, by the maximum activation duration that can be set for each of the tasks of the first type to be scheduled is fixed; Calculate a minimum activation time of each of the tasks of the first type by multiplying the calculated value with the time slot; and Setting a time longer than the minimum activation time of each of the tasks of the first type, than the Activation time such that a sum of the activation times of all the tasks of the first type within the time slot is limited.
8. The method according to claim 7, further comprising the following steps: Removing the task to be scheduled so that the task is not scheduled; and Adding the task that was not scheduled so that the task is re-scheduled as a task is added, where the time slot setting step, the value calculation step, the minimum Activation time and the activation time setting step are repeated at intervals.
9. The method according to claim 8, further comprising the following steps: Determine whether, when a new task is associated with the tasks of the first type to be scheduled, it is possible to new task to be added to the tasks to be scheduled or not, based on the maximum activation duration and the minimum activation time of the new task and the maximum activation durations and the minimum Activation times of the tasks to be planned of the first type, where the adding step adds the new task to the tasks to be scheduled if the determining step determines that it is possible to add the new task to the tasks to be scheduled.
10. The method according to claim 8 or 9, wherein the time slot setting step, the value calculation step, the Minimum activation time calculation step and activation time setting step executed each time when a timing defined by the reference cycles is reached.
11. The method according to any one of claims 1-10, wherein at least one of the tasks is a virtual machine executed by a program is formed that replicates a function implemented in a device.
12. The method according to any one of claims 1-10, wherein the plurality of tasks control hardware devices included in the device are attached.
13. A computer-readable program stored in a medium, the program being operable to schedule a plurality of Tasks given in a device that generates periodic reference cycles, each of the reference cycles as a time slot, the tasks are given execution rights one after the other, each of the tasks has a Activation time is given, the tasks tasks of a first type, each of which necessarily has the Execution right during their activation time in each of the time slots, and tasks of a second type not every task necessarily has the right to execute during its activation time in every of the time slots, a sum of the activation times assigned to the tasks of the first type in each of the time slots are given, is smaller than one period of each of the time slots, the tasks of the first type each a first priority is given, which is used to award the right of execution, and the tasks of the second type is given a second priority, which is used to assign the right of execution, the program allows the computer to perform the following functions: Terminate a specified task among the tasks that has the execution right in a current time slot of the Time slots are given by depriving the specified task of the execution right if a time during which the execution right persists, reaches the activation time given to the specified task, whereby the current time slot is a time slot starting after the last reference cycle; Execute identification processing when each of the reference cycles has been completed or each of the tasks has been completed, whereby in the identification processing (i) in cases where, under the tasks of the first type remaining tasks of the first type that have not been completed in the current time slot remain, a Task of the first type whose first priority is maximum among the remaining first types of tasks is identified and (ii) in cases where there are no tasks of the first type that cannot be completed in the current time slot of remaining tasks of the second type that have not yet been completed in the current time slot, remain, a task of the second type whose second priority is maximum is identified; and Assigning the execution right to the identified task through identification processing.
14. Device for scheduling multiple tasks given in a device that has periodic reference cycles generated, where each of the reference cycles is given as a time slot, the tasks are assigned execution rights one after the other given, and the device comprises: first execution means for executing the tasks, wherein each of the tasks is given an activation time which Tasks Tasks of a first type, each of which necessarily requires the right of execution during its activation time in each of the time slots, and include tasks of a second type, of which no every task necessarily requires the right to execute during their activation time in each of the time slots, a sum of the activation times that determines the first types of tasks in each of the time slots is smaller than one period of each of the time slots, the Tasks of the first type are each given a first priority, which is used to determine the right of execution and the tasks of the second type are each given a second priority, which is used to to grant the right of execution, Termination means for terminating a specified task among the tasks that has the execution right in a current time slot of the time slots by depriving the specified task of the execution right is when a time during which the execution right continues reaches the activation time corresponding to the specified task is given, where the current time slot is a time slot starting after the last reference cycle; second execution means for executing identification processing when each of the reference cycles is completed or each of the tasks has been completed, whereby in the case of identification processing i) in cases where, under the Tasks of the first type remaining tasks of the first type that have not been completed in the current time slot were, remain a task of the first type, whose first priority is maximal among the remaining tasks of the first type is identified and (ii) in cases where no tasks of the first type that are not included in the current time slot, of remaining tasks of the second type that have not yet been completed in the current time slot are completed, a task of the second type whose second priority is maximum is identified, and Assignment means for assigning the execution right to the identified task through the identification processing.
15. The apparatus of claim 14, wherein the plurality of tasks control hardware devices included in the apparatus are attached.
Citation Information
Patent Citations
Virtual computer control device
JP2008234116A
Smart internetworking operating system for low computational power microprocessors
US20030018680A1
Method for intelligent crescendo system
US20050146425A1
VIRTUAL COMPUTER SYSTEM MANAGING SCHEDULE FOR ALLOCATING CPU TO GUEST OSes AND GUEST OS SCHEDULING METHOD
US20090113426A1
Apparatus and methods for scheduling and performing tasks
US6757897B1
