状态(队列)、定时、ETTT BLOCKED 0 等待队列 signal wait dispatching ·就绪队列(运行队列) activation termination READY RUNNING active arrive release? preemption ACTIVE -active:任务被激活(创建) ·“make ready a new task,either immediately or at some future point in time"(Kopetz P220) -Arrive:TT的任务到达,或ET的事件到达 。=release=start Arrival Release Completion (invocation)) 邮州州 Time Release Time Jitter Execution
状态(队列)、定时、ET/TT? • 等待队列 • 就绪队列(运行队列) • active = arrive = release? – active :任务被激活(创建) • “make ready a new task,either immediately or at some future point in time”(Kopetz P220) – Arrive:TT的任务到达,或ET的事件到达 • = release=start
任务:Tasks,jobs,三类 A task T=1,J2,...,Jn is a set of related jobs that together perform some operation A Job is a unit of work scheduled and executed by the system (the unit of concurrency) If jobs occur on a regular cycle,the task is periodic A sporadic task is an aperiodic task where the jobs have deadlines once released ·存在“最小到达间隔”! If jobs have unpredictable release times,a task is termed aperiodic Appear once only?Have average deadlines (soft-RT)? 一非周期两种类型:到达模式,软硬实时性(DL) Deadline 州料糊 Computation time Period
任务:Tasks,jobs,三类 • A task T= {J1,J2,…,Jn} is a set of related jobs that together perform some operation • A Job is a unit of work scheduled and executed by the system(the unit of concurrency) – If jobs occur on a regular cycle, the task is periodic – A sporadic task is an aperiodic task where the jobs have deadlines once released • 存在“最小到达间隔”! – If jobs have unpredictable release times, a task is termed aperiodic • Appear once only? Have average deadlines(soft-RT)? – 非周期两种类型:到达模式,软硬实时性(DL)
Constraints on Tasks (RTOS view Arrival Release Completion 0 Timing(定时)constraints (invocation)】 Release time Relative to arriving time Time Deadline Jitter Execution ·Absolute deadline Response Time o Precedence(优先)constraints,偏序 Temporal order:Temporal dependence ·temporal distance:.“完成时间”之差 -Causal order:Causal dependence ·Happen-before(Lamport):基于msg 。 Resource constraints Data dependence? Mutual exclusion constraints Resource access protocols
Constraints on Tasks(RTOS view) • Timing(定时) constraints – Release time • Relative to arriving time – Deadline • Absolute deadline • Precedence( Precedence(优先) constraints ) constraints,偏序 – Temporal order:Temporal dependence • temporal distance: “完成时间”之差 – Causal order:Causal dependence • Happen-before(Lamport):基于msg • Resource constraints – Data dependence? – Mutual exclusion constraints • Resource access protocols
任务的定时模型timing model a: 到达时刻arrival/request C 下切换时间 s.调度开始时刻start e:调度结束时刻/release ai S e f d C:capacity/执行时间/Workload 天 完成时刻 当T=0且Jitter=0时:Arrival=Start=Release R响应时间 截止期deadline relative deadline D:slack;=d-f 绝对d(时刻) 相对D(时长) ti 松弛时间slack, 裕度laxity a d 延迟Lateness:d-f absolute deadline response time Ri (di=a;+R) 开始时限 Delay? 抖动jitter 10/41
任务的定时模型timing model a:到达时刻arrival/request T: 切换时间 s: 调度开始时刻start e: 调度结束时刻/release C: capacity/执行时间/Workload f: 完成时刻 R:响应时间 当T=0 且 Jitter=0 时:Arrival = Start = Release 10/41 R:响应时间 截止期deadline 绝对d(时刻) 相对D(时长) 松弛时间slack,裕度laxity 延迟Lateness:d – f 开始时限 Delay? 抖动jitter
周期任务的定时模型 Static task parameters: C,(undisturbed)WCET :period ={Ci.T.D.O) D,:(relative)deadline O:(absolute)time offset t O(phase):the interval between a periodic thread creation and its first release time. T 可用于指定任务的执行顺序。 注意:未考虑调度切换开销! 截止时间D可以等于或不等于周期T! 11/41
周期任务的定时模型 注意:未考虑调度切换开销! 11/41 O(phase): the interval between a periodic thread creation and its first release time。 可用于指定任务的执行顺序。 截止时间D可以等于或不等于周期T!