[RTEMS Project] #2772: Enhancement for more general real-time model

RTEMS trac trac at rtems.org
Fri Aug 5 16:32:25 UTC 2016


#2772: Enhancement for more general real-time model
-------------------------+---------------------------------------------
 Reporter:  kh.chen      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  high         |  Milestone:  4.11.1
Component:  cpukit       |    Version:  4.11
 Severity:  major        |   Keywords:  RMS, SP, Scheduler, Periodicity
-------------------------+---------------------------------------------
 In the current implementation, if a task period is time out, the next call
 of rtems_rate_monotonic_period() will only release one following job and
 manipulate the task period with the calling moment + the next length of
 period. With the assumption that implicit/constraint deadline and hard
 real-time model, the above mechanism is okay.

 However, it is not applicable for more general task models, e.g., soft
 real-time task, arbitrary deadline, mixed-criticality system [1-4]. It is
 in fact changing the behaviour of periodic/sporadic tasks, where the task
 period becomes unpredictable and shifted . Also, there maybe more than one
 postponed instances due to the preemption.

 Although there is no standard requirement in reality for deadline misses,
 with this enhancement, the postponed jobs will be released with the
 correct number without shifting the periodicity of tasks. In fact, this
 way of handling is already widely considered in academia from 90s [2]
 until now [3] or even on multicores as well [4].

 I refine the following four files and handle this requirement
 individually. The overhead seems to me negligible.
 cpukit/rtems/include/rtems/rtems/ratemon.h
 cpukit/rtems/include/rtems/rtems/ratemonimpl.h
 cpukit/rtems/src/ratemontimeout.c
 cpukit/rtems/src/ratemonperiod.c

 I believe this patch is good for further use in more general real-time
 task models.
 This enhancement only affect those timeout cases without changing any
 behaviour in normal cases.
 To demonstrate the differences, a heuristic example is prepared in
 testsuites/sptests/sprmsched01 to show the benefit of the enhancement:

 Given two tasks with implicit deadline that task deadline is equal to its
 period.
 Task 1 period is 10000 ticks, whereas task 2 is 2000 ticks.
 Task 1 has the execution time 6000 ticks, and task 2 has 1000 ticks.
 Assume Task 1 has a higher priority than task 2. Task 1 only executes 2
 times.
 In the expected result, we can observe that the postponed jobs are
 continuously released till there is no postponed job left, and the task
 period will still keep as it is.
 (Job 3-7 in task 2 are postponed jobs)

 [1] Buttazzo et al., Soft Real-Time Systems: Predictability vs.
 Efficiency, Springer 2005, [http://www.springer.com/gp/book/9780387237015]
 [2] Lehoczky et al., Fixed priority scheduling of periodic task sets with
 arbitrary deadlines, RTSS 1990,
 [http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=128748]
 [3] Georg von der Brüggen et al., Systems with Dynamic Real-Time
 Guarantees in Uncertain and Faulty Execution Environments, RTSS'16,
 accepted.
 [4] Huang et al., Response time bounds for sporadic arbitrary-deadline
 tasks under global fixed-priority scheduling on multiprocessors, RTNS
 2015, [http://dl.acm.org/citation.cfm?doid=2597457.2597459]

--
Ticket URL: <http://devel.rtems.org/ticket/2772>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list