【RTS笔记7】Schedulability

Schedulability 调度性简介

  • 【deadlines必须准守】For hard real-time systems the deadlines must always be met.
  • 【离线测试来检查是否错过deadline】Schedulability analysis provides an offline test (performed before the system is started) to check that there are no circumstances when deadlines are missed. A system is unschedulable if the scheduler does not find a way to switch between the tasks and meet all the deadlines.
  • 【如果不可以在deadline前找到切换tasks方法,则unschedulable 】A system is unschedulable if the scheduler does not find a way to switch between the tasks and meet all the deadlines.
Schedulability test 调度性测试

 predict the worst-case behavior of the system 【预测最坏情况】:

  1. Sufficient充分 :【过了就一定可调度(没过不一定)】If test is passed, then tasks are definitely schedulable (but if it is not passed, they may still be schedulable).
  2. Necessary必要 :【没过就必不可调度(过了不一定)】If test is not passed tasks are definitely not schedulable (but if it is passed tasks may or may not be schedulable).
  3. Exact (= Necessary + Sufficient)充要 :【绝对准确】The task set is schedulable if and only if it passes the test.

Schedulability Assumptions 调度性假设

fixed set of tasks:

  1. independent 独立,无synchronisation同步
  2. C i Ci Ci 执行时间 fixed worst-case execution time
  3. T i Ti Ti : periodic 周期,released at the start of their period
  4. D i Di Di: deadline死线. D i = T i Di = Ti Di=Ti deadline is equal to its period
Estimating Worst-Case Execution Time 估算执行时间

  Analysis:模拟分析,需要建立模型
  Measurement:直接测量,难以找出worst-case behavior

Rate Monotonic Scheduling 实时调度

Staticsimple, optimal , fixed priority
Each task is assigned a (unique) fixed priority based on its execution rate
P i Pi Pi:优先级。 ( T i < T j ↔ P i > P j Ti < Tj ↔ Pi > Pj Ti<TjPi>Pj) 周期越长优先级越低
The total utilisation should be less than 1.
在这里插入图片描述

Earliest Deadline First Scheduling EDF调度,最早截止时间优先调度

Dynamic
D i Di Di:死线Deadline。
P i Pi Pi:优先级。 ( D i < D j ↔ P i > P j Di < Dj ↔ Pi > Pj Di<DjPi>Pj) DDL越近优先度越高
在这里插入图片描述

Utilisation-based Schedulability 基于利用率的调度

  Utilisation 利用率

  利用率公式: U i = C i T i Ui = \dfrac{Ci}{Ti} Ui=TiCi 。执行时间 ÷ 周期。

 Utilisation-based Schedulability Test

  一个测试,当 U < = U ‾ U<= \overline{U} U<=U ,表示通过表示tasks必可被调度(没通过也还有机会)。
  公式: U ‾ = N ( 2 1 / n − 1 ) \overline{U} = N(2^{1/n}-1) U=N(21/n1)

举个例子
在这里插入图片描述

Response-Time Analysis 应答时间分析

worst case response time 最坏响应时间:

worst case response time is the worst case execution time (Ci)最坏执行时间 plus the maximum interference (Ii)最大干扰(时间) suffered during execution
【Ri最坏响应时间= Ci最坏执行时间+Ii最大干扰时间】
R i = C i + I i Ri = Ci + Ii Ri=Ci+Ii

Response-Time Analysis

Response Time Analysis is necessary and sufficient: If test is passed, all tasks will meet their deadlines. If test is failed, a task will miss its deadline.【测试通过则顺利完成,不通过则会错过DDL】
In this test, each task’s worst-case response time ® is calculated and compared to its deadline (D).
【目的: R i Ri Ri最坏响应时间<= D i D_i Di死线 】
R i ≤ D i R_i ≤ D_i RiDi在这里插入图片描述

在这里插入图片描述在这里插入图片描述

periodic 名词解释

periodic 周期
Utilisation 利用,利用率

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值