EP2203817A2 - Procede de gestion des preemptions dans un systeme d'exploitation en temps reel - Google Patents
Procede de gestion des preemptions dans un systeme d'exploitation en temps reelInfo
- Publication number
- EP2203817A2 EP2203817A2 EP08869900A EP08869900A EP2203817A2 EP 2203817 A2 EP2203817 A2 EP 2203817A2 EP 08869900 A EP08869900 A EP 08869900A EP 08869900 A EP08869900 A EP 08869900A EP 2203817 A2 EP2203817 A2 EP 2203817A2
- Authority
- EP
- European Patent Office
- Prior art keywords
- task
- tasks
- execution
- time
- priority
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
- G06F9/4887—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic
Definitions
- the subject of the present invention is a method for managing preemptions between several tasks in a real-time operating system (RTOS).
- RTOS real-time operating system
- pre-emption of tasks and more specifically the number of such pre-emptions has sometimes significant consequences on performance. Indeed, the processor can not be used to its maximum, because each preemption causes changes in the state of the cache memories (instructions and data), and these changes in turn lead to an increase in the execution time of the tasks (this which means that real-time constraints are no longer guaranteed) and the power consumption increases due to data movements between the different levels of the memory hierarchy at each preemption and each preemption return.
- laxity tie The algorithm dedicated to the latency link problem relating to the LLT scheduling effect indeed for each task of the set of tasks and assigns individually to each task of the set of tasks a fixed priority for a time of dynamically calculated release, which greatly increases the complexity of task control (“TCB”), and increases execution times which leads to lower processor availability for its essential task which is the execution of tasks, except to choose a processor with greater processing power.
- the first proposed solution is an acceleration of the clock rate to allow a lower priority task to complete before the arrival of a higher priority task, which requires that before the priority task higher happens, the CPU utilization rate is significantly less than 100% to allow then restore the clock rate, and this requires, for good efficiency, to oversize the processor.
- the second proposed solution is to provide a largely oversized processor with respect to its total workload and to use a low clock rate so that it remains possible to finish tasks with low priority while there is a task of highest priority.
- the basic idea of the invention is to determine for each task a non-preemption interval during which the task can remain in execution while a more priority task appears.
- the invention thus relates to a method for managing preemptions between at least two tasks having different priorities in a real-time operating system, characterized in that, during a request to execute a task having a higher priority. the current task, the execution of the current task is interrupted only after a calculated time interval to allow at least the current task and the higher priority task to be executed before the end of the execution time assigned to them.
- the time interval can be calculated once and for all for each task taking into account the execution of all other tasks that may have a higher priority, or dynamically taking into account all the other tasks having a priority. higher and for which an execution request is formed. In this case, the time interval of the current task can be refreshed each time an execution request is formed for a task having a higher priority than the current task.
- the invention also relates to a method as defined above characterized in that the management of the preemption of several tasks whose indices i are chosen so that the tasks are classified in increasing order of execution priority, the index 1 being assigned to the task having the highest execution priority, and so on until the index p which is assigned to the task whose execution priority is the lowest, the time interval NPj non-preemption of the task of rank ia for value: with
- P 1 designating the execution time assigned to the task Tj. This time is equal to the period of the task in the case of EDF scheduling with static calculation of NPj values, and also RM ("Rate Monotonic") by definition.
- Pj can be equal in this equation and in all the following equations to a deadline Dj of value less than or equal to the period of task.
- FIG. 1 is an example of implementation of an algorithm according to the invention
- FIG. 2 illustrates the accumulation of the latency or laxity of the higher priority tasks than the current task T
- FIGS. 3a and 3b are an example of implementation in a system implementing three tasks of which T 1 is the highest priority, respectively with an algorithm according to the invention and with a conventional "EDF" algorithm
- FIGS. 4 and 5 illustrate the case of chain preemptions in the case of an "EDF” algorithm classic ( Figure 4) and how a algorithm according to the invention allows to avoid them ( Figure 5) or to reduce the number.
- a real-time system is considered in which real-time tasks are ordered according to a closest maturity scheme (EDF).
- the tasks T are of number n and are denoted (Ti, T 2 , ... T n ). These tasks are supposed to be mutually independent.
- Each task Tj has its own execution time ("deadline”) Pj which is imposed on it and a runtime Ci calculated in the worst case execution time ("worst case execution time" or WCET).
- Each task Tj has a latency or laxity Li which is defined by:
- the task that runs is the one that expires at the nearest one.
- the algorithm is based on dynamic priorities.
- the algorithm described below is distinguished from a conventional EDF type 11 algorithm by the moment when the preemptions are performed, because the algorithm makes it possible to know whether immediate preemption is necessary or whether it is possible to delay it and for how long.
- the tasks are sorted in ascending order with respect to their period P so that whatever is i, we have Pj ⁇ Pj + i, Pi being the task whose expiry time Pi is the shortest.
- NPi defines the duration during which the current task Tj can proceed without inconvenience even in the presence at time t of one or more other tasks of higher priority than that of the current task. For this purpose, three conditions can be enumerated.
- Condition 1 the latency Lj of the task Tj can be shifted over the entire time interval defined between its wake-up date and its due date
- the task Tj never exceeds the deadline as, during the maturity period Pi, the processor assigns a processor time Cj.
- Condition 2 the task Tj can be pre-empted only by a task having a higher priority and therefore a shorter expiration period Pj (in the case of an EDF or RM algorithm).
- Forcing a lower priority task to continue execution when a higher priority task is to be executed is a priority override that can cause the higher priority task to be exceeded.
- the RM Random Early Preemptive algorithm
- the tasks are periodic and of period Pj, but the deadline is not necessarily at the end of the period. Tasks are sorted by increasing periods and priority is allocated inversely to the period. In the case of the "EDF" algorithm, the priority criterion is the absolute deadline d.
- a task Tj can therefore be pre-empted only by a task which has a lower due period P.
- a task that appears less frequently will always be preempted by a more frequent task.
- a more frequent task may or may not pre-empt an infrequent task.
- condition 2 is necessary, and for an "RM” algorithm it is necessary and sufficient.
- Condition 3 In the case of an algorithm of type "EDF" giving priority to the deadline whose term is closest, a task T 1 may continue execution by causing a priority inversion during a statically or dynamically calculated NP time without any other task exceeding the assigned time.
- each task Tj has two main parameters which are its execution time Cj in the worst case and its period Pj which sets the maturity period, that is to say the time that remains available to complete. the task within the prescribed time.
- the expiry date of the task is only equal to its period in the case of EDF 1 scheduling if the NP values of tasks and RM scheduling are statically calculated.
- Pj can be equal to a deadline Di of value less than or equal to the period of the task.
- the third parameter developed from the first two is the latency or laxity L 1 .
- a higher priority task has sufficient latency, then its execution can be delayed by delaying preemption for a time that is compatible with the fact that all tasks are performed without exceeding their deadlines.
- a logic algorithm is shown in FIG. 1.
- the procedure is conventional (for example "EDF" algorithm). If a task Tj is already active, the procedure "EDF" is continued if Pj ⁇ Pj, and otherwise the task T j is inserted in a temporary queue for a duration equal to the minimum between the execution time remaining for Tj and NPj value of the duration of non-preemption
- the task Tj preempts the task Tj, except of course if the task Tj has already completed its execution, in which case the task Tj starts its execution as soon as the task Tj is completed.
- the NPj value of the non-preemption period can be determined either statically or dynamically.
- the latency L 1 of the task Tj defines the duration NPj + i during which a task T i + i of lower priority can cause a priority inversion without Tj missing its deadline.
- the task Ti with the shortest expiry time can not be preempted by any other task, and the task T 2 can only be preempted by the task Ti, and so on until the task T p which can be preempted by the higher priority tasks T p- i, T p-2 , .. Ti.
- NP 3 for the task T 3 , we define a virtual task used only in the calculations and whose objective is to model the deadlines and the execution times induced by the tasks higher priority than T 3 .
- This virtual task has a latency L 2 7 and an execution time abs C 2 , defined in the worst case as equal to the sum of abs
- NP 3 Min (NP 2 , L 2 abs )
- NP 4 Mm (NP 3 , L 3 abs )
- the task T 3 has the largest expiry time among the tasks Ti, T 2 , T 3 that can preempt the task T 4 .
- the task Tj can be preempted by the tasks (Ti, T 2 ,..., TM), which have a duration of maturity shorter than its duration Pj.
- a virtual task T ⁇ 5 whose laxity corresponds to the duration of no expiry NPj. It is thus possible to compute, from Ti up to T j , all NPj non-preemption times (i varying from 1 to j). To calculate the worst execution time of a virtual task, the task Tj is chosen for the case where all the tasks having a higher priority level are called at the same time during the execution of the task Tj .
- the virtual task T ⁇ has a period equal to the due time P, -i of the task TVi and its execution time in the worst case noted C 1 ⁇ 3 is the weighted sum of the execution times in the most unfavorable case of all the tasks having a duration of expiration less than the duration C, of the task T ,.
- the latency L 1 ⁇ 5 of the task T ⁇ indeed accumulates the latencies or laxities of all the higher priority tasks than the task T 1 .
- Figure 2 shows that virtual task T ⁇ 8 collates the
- This accumulated latency gives a greater ability to 0 a given task to continue without its execution being preempted by a more priority task.
- the non-preemption time NP, of the task T is then defined:
- NP 1 Mm (NP 14 ,)) 5
- NP takes into account by its method of calculating the minimum value of the latency of the tasks of lower rank. Thus none of the tasks will be able to miss its deadline.
- the algorithm described above delays the preemption of the current task for a duration equal to the value of NP 1 for the current task T 1 . It should be noted that the possible values of NP can be precalculated and placed in a table thus giving for each task the NP value.
- This delay is counted by a counter and when this counter reaches the value 0, there is preemption of the current task unless of course the current task has ended before which case the new task is executed as soon as the task is completed. completion of the current task and without preemption.
- NP takes into account the case where all the tasks higher priority than the current task appear simultaneously, which ensures that in the worst case, all the tasks will be carried out according to their deadline, whatever the tasks likely to appear later.
- T 1 the highest priority
- T 2 can only be preempted by T 1
- T 3 can only be preempted by Ti or T 2 .
- the static algorithm described in general does not allow to remove all preemptions, but only to reduce the number. It is possible to improve performance and further reduce the number of preemptions by dynamically adjusting the preemption time.
- the dynamic calculation aims to take into account only the tasks actually called to be executed.
- NPi is calculated and decremented while the task T 1 continues until the duration NP - has elapsed or task Tj ends. It is therefore necessary to recalculate NPj each time a new task called has a deadline before that of the current task, and restart the decrementation of NP, with the new value and with this new starting point, the calculation of NPj is done using the preceding equations, but taking into account only the tasks which are ready for execution and have an absolute deadline prior to that of task Tj
- the tasks selected for the calculation of the NPj parameter are ordered according to the value of their absolute maturity date dj and not according to the value of their maturity period P j .
- NPj will be chosen equal to the latency L k of the task Tk . If a new task Ti is ready (d
- a recalculated value can only be less than or equal to the previous value. It should be noted that a statically calculated value NPj can not be greater than a dynamically calculated value NPj, since the static computation takes into account all the higher priority tasks whether or not they are ready, whereas the dynamic computation does not take place. only takes into account tasks that are actually ready for execution.
- the complexity of the dynamic computation is proportional to the total number n of tasks, and the algorithm requires n iterations in the worst case, but the number of iterations will generally be much smaller than n.
- This calculation of NP values can be incorporated into the algorithm used to place the newly called tasks for execution in the queue and whose complexity is also proportional to n.
- a particularly troublesome phenomenon in the case of RM or EDF type algorithms is the existence of chain preemptions, that is to say that a task in progress is preempted by a higher priority task, itself pre-empted by a task even more priority and so on.
- FIGS. 4 and 5 This is illustrated in FIGS. 4 and 5 for chain preemption for 6 tasks Ti to I classified as before in order of decreasing priority (Ti being the highest priority task).
- TQ is preempted by T 5 , T 5 by T 4 , T 4 by T 3 , T 3 by T 2 and finally T 2 by T 1 , ie five cascaded preemptions which are avoided by the algorithm according to FIG. invention ( Figure 5).
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Advance Control (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
- Complex Calculations (AREA)
Abstract
Description
Claims
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
FR0707478A FR2923039A1 (fr) | 2007-10-24 | 2007-10-24 | Procede de gestion des preemptions dans un systeme d'exploitation en temps reel |
PCT/FR2008/001481 WO2009087317A2 (fr) | 2007-10-24 | 2008-10-22 | Procede de gestion des preemptions dans un systeme d'exploitation en temps reel |
Publications (1)
Publication Number | Publication Date |
---|---|
EP2203817A2 true EP2203817A2 (fr) | 2010-07-07 |
Family
ID=39522409
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
EP08869900A Withdrawn EP2203817A2 (fr) | 2007-10-24 | 2008-10-22 | Procede de gestion des preemptions dans un systeme d'exploitation en temps reel |
Country Status (4)
Country | Link |
---|---|
EP (1) | EP2203817A2 (fr) |
JP (1) | JP2011501309A (fr) |
FR (1) | FR2923039A1 (fr) |
WO (1) | WO2009087317A2 (fr) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103870327A (zh) * | 2012-12-18 | 2014-06-18 | 华为技术有限公司 | 一种实时多任务调度方法和装置 |
GB2545507B (en) * | 2015-12-18 | 2019-07-17 | Imagination Tech Ltd | Controlling scheduling of a GPU |
GB2545508B (en) | 2015-12-18 | 2019-04-10 | Imagination Tech Ltd | Controlling operation of a GPU |
US10366013B2 (en) * | 2016-01-15 | 2019-07-30 | Futurewei Technologies, Inc. | Caching structure for nested preemption |
CN109684060B (zh) * | 2018-12-21 | 2023-05-23 | 中国航空工业集团公司西安航空计算技术研究所 | 一种多类型时间关键任务的混合调度方法 |
KR20200101682A (ko) * | 2019-02-20 | 2020-08-28 | 삼성전자주식회사 | 전자 장치 및 그 제어 방법 |
CN110221907B (zh) * | 2019-05-24 | 2023-06-27 | 昆明理工大学 | 一种基于edf算法和模糊集的实时任务调度方法 |
CN110784418B (zh) * | 2019-10-24 | 2022-06-24 | 烽火通信科技股份有限公司 | 一种基于时延约束的数据发送方法及系统 |
FR3133934B1 (fr) * | 2022-03-24 | 2024-08-09 | Vitesco Technologies | Procédé de gestion d’exécution d’une pluralité de fonctions |
-
2007
- 2007-10-24 FR FR0707478A patent/FR2923039A1/fr not_active Withdrawn
-
2008
- 2008-10-22 JP JP2010530507A patent/JP2011501309A/ja not_active Withdrawn
- 2008-10-22 WO PCT/FR2008/001481 patent/WO2009087317A2/fr active Application Filing
- 2008-10-22 EP EP08869900A patent/EP2203817A2/fr not_active Withdrawn
Non-Patent Citations (1)
Title |
---|
See references of WO2009087317A2 * |
Also Published As
Publication number | Publication date |
---|---|
WO2009087317A3 (fr) | 2009-09-03 |
WO2009087317A2 (fr) | 2009-07-16 |
JP2011501309A (ja) | 2011-01-06 |
FR2923039A1 (fr) | 2009-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2203817A2 (fr) | Procede de gestion des preemptions dans un systeme d'exploitation en temps reel | |
US8392312B2 (en) | Adaptive scheduling of storage operations based on utilization of a multiple client and server resources in a distributed network storage system | |
KR102585591B1 (ko) | 이기종 프로세서 기반 엣지 시스템에서 slo 달성을 위한 인공지능 추론 스케쥴러 | |
US8397235B2 (en) | User tolerance based scheduling method for aperiodic real-time tasks | |
WO2002039256A2 (fr) | Procede et systeme de determination du temps de reponse dans le meilleur des cas pour une tache periodique | |
EP2987081B1 (fr) | Procédé d'allocation temporelle de tâches permettant une récupération d'erreur deterministe en temps réel | |
EP2266011B1 (fr) | Procede de gestion de la consommation d'energie pour les systemes multiprocesseurs | |
CN105389204B (zh) | 一种多资源偏序调度方法 | |
CN115421905A (zh) | 一种任务调度方法、装置、电子设备及存储介质 | |
EP2850520B1 (fr) | Procede de gestion d'une execution de taches dans un systeme informatique | |
EP2709008B1 (fr) | Procédé et dispositif de décompte du temps déporté pour unité de traitement dans un système de traitement de l'information | |
US20160299787A1 (en) | System, method and managing device | |
US7293004B1 (en) | Method for tuning state-based scheduling policies | |
CN117667332A (zh) | 一种任务调度方法及系统 | |
US20170147641A1 (en) | Dynamic block intervals for pre-processing work items to be processed by processing elements | |
CN116438520A (zh) | 用于非抢占式系统的实时任务调度的方法和装置 | |
Springer et al. | Resource synchronization in hierarchically scheduled real-time systems using preemptive critical sections | |
US7444316B1 (en) | Method for scheduling jobs using distributed utility-based preemption policies | |
US12045671B2 (en) | Time-division multiplexing method and circuit for arbitrating concurrent access to a computer resource based on a processing slack associated with a critical program | |
Gergeleit et al. | Scheduling transient overload with the taft scheduler | |
CN111950835B (zh) | 基于竞价型实例的截止期约束工作流资源调度方法 | |
Zhao et al. | Worst case response time analysis of sporadic graph tasks with fixed priority scheduling on a uniprocessor | |
US7363283B1 (en) | Method for scheduling jobs using distributed utility-based oversubscription policies | |
NGUYEN | THE UNIVERSITY OF CHICAGO | |
KR20050084107A (ko) | 하드 실시간 시스템에서의 소프트웨어 구성요소의 풀스케줄링 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
17P | Request for examination filed |
Effective date: 20100309 |
|
AK | Designated contracting states |
Kind code of ref document: A2 Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MT NL NO PL PT RO SE SI SK TR |
|
AX | Request for extension of the european patent |
Extension state: AL BA MK RS |
|
RIN1 | Information on inventor provided before grant (corrected) |
Inventor name: AUGUIN, MICHEL Inventor name: MUHAMMAD, FAROOQ Inventor name: MULLER, FABRICE |
|
17Q | First examination report despatched |
Effective date: 20101220 |
|
DAX | Request for extension of the european patent (deleted) | ||
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN |
|
18D | Application deemed to be withdrawn |
Effective date: 20110701 |