中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)实时调度(多处理器、调度异常、WCET)

® 实时调度 李曦 llxx@ustc.edu.cn 计算机系计算机应用研究室
实时调度 李曦 llxx@ustc.edu.cn 计算机系计算机应用研究室

内容提要 ·实时任务约束模型 -Assumptions about task timing,interaction,。。。 。人 任务调度算法Scheduling Algorithm Scheduling mode and selection function ·Timeliness:deadline,worst response time,。。。 Efficiency:average response time,makespan -Prioritized goals Temporal predictability first,performance second 。 可调度分析Schedulability Test Prediction of worst-case behavior 基于CPU利用率(workload analysis) for preemptive and strictly periodic tasks? -WCRT(Response time analysis) ·for preemptively feasible task sets with D≤T ·多处理器调度:优先级贪心调度,Pfair调度 ·Timing Analysis(WCET分析)
内容提要 • 实时任务约束模型 – Assumptions about task timing,interaction,。。。 • 任务调度算法Scheduling Algorithm – Scheduling mode and selection function • Timeliness:deadline,worst response time,。。。 • Efficiency:average response time,makespan – Prioritized goals • Temporal predictability first,performance second • 可调度分析Schedulability Test – Prediction of worst-case behavior – 基于CPU利用率(workload analysis) • for preemptive and strictly periodic tasks? – WCRT(Response time analysis) • for preemptively feasible task sets with D ≤ T • 多处理器调度:优先级贪心调度,Pfair调度 • Timing Analysis(WCET分析)

参考文献 USTC 各a 《嵌入式系统设计·嵌入式CPS系统基础》, 嵌入式系统设计一横入式 信息物理系基础 第2版,2011 -Peter Marwedel(TU Dortmund教授)。译错多⑧ Giorgio C Buttazzo,RETIS Lab,TeCIP Insitute, Pisa,Italy Hard Real-Time Computing Systems:Predictable GergChinsoo Hard Real-Time Scheduling Algorithms and Applications,第三版, Computing Systems 2011 Multiprocessor Scheduling for Real-Time Systems,2015 REAL-TIE SYSTBI6 Multiprocessor Scheduling for Real-Time Systems 0.5. 种e 3/100
参考文献 • 《嵌入式系统设计·嵌入式CPS系统基础》, 第2版,2011 – Peter Marwedel(TU Dortmund教授)。译错多 • Giorgio C Buttazzo,RETIS Lab, TeCIP Insitute, Pisa, Italy – Hard Real-Time Computing Systems: Predictable 3/100 – Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications,第三版, 2011 – Multiprocessor Scheduling for Real-Time Systems,2015

Multiprocessor/distributed Multiprocessors systems is a set of autonomous processors which have software to coordinate them self and share resources Share the same clock - Share the same main memory o Distributed systems is a set of autonomous processors that are connected by a network and which have software to coordinate themself or share resources -No shared memory.Message passing communication. -A clock for each processor
Multiprocessor/distributed • Multiprocessors systems – is a set of autonomous processors which have software to coordinate them self and share resources – Share the same clock – Share the same main memory • Distributed systems – is a set of autonomous processors that are connected by a network and which have software to coordinate themself or share resources – No shared memory. Message passing communication. – A clock for each processor

Multiprocessors/MultiCore Arch. 》 homogeneous processors processors have the same computing capability and run task at the same rate heterogeneous processors PE PE PE PE ● Cluster Heterogeneous MPSoCs Shared -ARM的big.LITTLE架构 Shared Shared Cortex-A15 MPCore+Cortex-A7 气月9。tur年可 ReGourco ·理论上可以使电池的使用寿命延长高达70%
Multiprocessors/MultiCore Arch. • homogeneous processors – processors have the same computing capability and run task at the same rate • heterogeneous processors • Cluster Heterogeneous MPSoCs – ARM的big.LITTLE架构 • Cortex-A15 MPCore+Cortex-A7 • 理论上可以使电池的使用寿命延长高达70%

multiprocessor scheduling ·Vhere and When Global scheduling on-ine:为任务分配/抢占一个空闲的处理器。可迁移 the level of migration:Task/Job level migration Global scheduling 一可迁移造成分析困难 -适于多处理器系统:优先级贪心调度,Pair调度 expect optimal processor usage busy processors,less preemptions .. Partitioning scheduling -off-line:每个处理器一个任务队列。非迁移 - “bin-packing”problem:NP-hard -适于分布式系统(ARINC653) expect minimize the number of processors,the number of communications,latencies,.. Partitioning hierarchical scheduling ·heuristic
multiprocessor scheduling • Where and When • Global scheduling – on-line:为任务分配/抢占一个空闲的处理器。可迁移 • the level of migration:Task/Job level migration – 可迁移造成分析困难 – 适于多处理器系统:优先级贪心调度,Pfair调度 – expect optimal processor usage • busy processors, less preemptions ... • Partitioning scheduling – off-line:每个处理器一个任务队列。非迁移 – “bin-packing” problem:NP-hard – 适于分布式系统(ARINC 653) – expect minimize the number of processors, the number of communications, latencies, ... • hierarchical scheduling • heuristic

多处理器优先约束:优先级调度法 J10/3 Release time 0 J20/1 J30/2 J40/2 Execution time 0 0 J4/2 J60/4 activation dispatching termination Execution J70/4 J30/1 scheduling preemption ·P1、P2两个处理器 一任务基于共享内存通信(因此,通信开销可忽略) · Priority-Driven Scheduling:任务号i小,则优先级高 The schedulers keep one common priority queue of ready jobs 一贪心:尽量不让处理器空闲。局部最优。 ·所有任务可抢占:ET? -调度时刻:任务就绪(ready)或完成 ·注意:因为存在优先约束,ready#release
多处理器优先约束:优先级调度法 • P1、P2两个处理器 – 任务基于共享内存通信(因此,通信开销可忽略) • Priority-Driven Scheduling:任务号i小,则优先级高 – The schedulers keep one common priority queue of ready jobs – 贪心:尽量不让处理器空闲。局部最优。 • 所有任务可抢占:ET? – 调度时刻:任务就绪(ready)或完成 • 注意:因为存在优先约束,ready≠release

Priority-Driven Scheduling List Time Not yet Released but not Ready to run P1 P Completed released yet ready to run 0 1 2 3 4 5 6 1 8 9 8 10 8 8 11 Execution time 2 ,04
Priority-Driven Scheduling List

Theorem (Richard Graham,1976) ● Brittleness In general,all thread scheduling algorithms are brittle:Small changes can have big,unexpected consequences. ·Richard's Anomalies If a task set with fixed priorities,execution times, and precedence constraints is scheduled according to priorities on a fixed number of processors,then increasing the number of processors,reducing execution times,or weakening precedence constraints can increase the schedule length
Theorem (Richard Graham, 1976) • Brittleness – In general, all thread scheduling algorithms are brittle: Small changes can have big, unexpected consequences. • Richard’s Anomalies – If a task set with fixed priorities, execution times, and precedence constraints is scheduled according to priorities on a fixed number of processors, then increasing the number of processors, reducing execution times, or weakening precedence constraints can increase the schedule length

A Priority-based 3 processor schedule C1=3① ⑨Cg=9 9 tasks with precedences and the shown execution times,where lower numbered tasks have higher C2=2② 8C8=4 priority than higher numbered tasks.Priority-based 3 processor schedule: C3=2③ ,⑦C,=4 1 proc1 9 C4=24 6)C6=4 proc2 4 5 7 proc3 3 6 8 5⑤C=4 time 6 8 10121416 Priority-.based scheduling is“greedy” .What happens if you increase the number of processors to four?
A Priority-based 3 processor schedule 1 2 3 4 9 8 9 tasks with precedences and the shown execution times, where lower numbered tasks have higher priority than higher numbered tasks. Priority-based 3 processor schedule: 7 6 C1 = 3 C2 = 2 C3 = 2 C4 = 2 C9 = 9 C8 = 4 C7 = 4 C6 = 4 •Priority-based scheduling is “greedy” •What happens if you increase the number of processors to four? 5 C5 = 4
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)实时调度理论(任务调度、可调度性).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)嵌入式操作系统(概述).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)ARM体系结构与Cortex-M3(Advanced RISC Machines).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)嵌入式处理器体系结构.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)嵌入式实时系统及设计方法概述(主讲:李曦).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)07 低功耗系统设计.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)06 分布式DRE系统(时钟同步-TTP).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)05 RTE设计方法之CBD与MBD.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)05 嵌入式系统的描述与验证.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)05 嵌入式系统设计方法——软硬件协同设计方法.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)04 实时系统设计(软件设计、控制系统、EA、语言).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)04 实时系统设计(实时任务调度).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)03 嵌入式操作系统 μC/OS-I分析.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)03 嵌入式操作系统.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)02 ARM指令集.pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)02 ARM体系结构(Advanced RISC Machines).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)01 嵌入式实时系统设计方法概论(主讲:李曦)Embedded real-time systems(Embedded Computing).pdf
- 中国科学技术大学:《计算机组成原理》课程教学资源(课件讲稿,2023)15 IO系统——外设、输入输出系统.pdf
- 中国科学技术大学:《计算机组成原理》课程教学资源(课件讲稿,2023)14 系统互连与通信——总线.pdf
- 中国科学技术大学:《计算机组成原理》课程教学资源(课件讲稿,2023)13 存储器(存储系统的可靠性).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)嵌入式操作系统(uC、OSII).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)嵌入式系统形式化规范与建模(FSM,KPN,SDF).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)设计验证与需求确认(嵌入式系统的属性与验证).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)实时嵌入式软件设计(控制系统,DARTS,EA,语言).pdf
- 中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第二版)RTE规范与建模方法之 Domain Specific Modeling Languages(MARTE、AADL、Autosar).pdf
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第12章 ODBC数据库应用程序开发.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第2章 数据库文件管理.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第10章 服务器性能和活动监视.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第1章 SQL Sever2000概述(教师:孟艳敏).ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第3章 表和表数据的操作.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第4章 约束、默认和规则.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第5章 关系、索引和视图.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第6章 T-SQL程序设计.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第7章 存储过程和触发器.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第8章 数据的备份和恢复.ppt
- 佛山开放大学:《SQL Server 2000 程序设计》课程教学资源(PPT课件)第9章 安全管理.ppt
- 中国信通院:勒索病毒安全防护手册(2021年9月).pdf
- 全国信息安全标准化技术委员会:大数据安全标准化白皮书(2018版).pdf
- 中国科学技术大学:Non-Uniform Recursive Doo-Sabin Surfaces.pdf
- 中国科学技术大学:Non-Uniform Recursive Doo-Sabin Surfaces.pdf