同步与异步事件:CPU's perspective忽 。 同步事件:发生时间可预测,驱动的任务为同步任务 Synchronous events are those that occur at predictable times in the flow- of-control -如:内部中断(internal trap interrupt) ·异步事件:随机发生的事件,驱动的任务为异步任务 -Asynchronous events occur at unpredictable points in the flow-of-control and are usually caused by external sources. -如:外部中断 A clock that pulses "regularly"at 5 milliseconds is not a synchronous event..(因为存在clock drift.!) 中断控 CPU 外部事件 制器1 中断控 制器2 llxx@ustc.edu.cn 16/94
同步与异步事件:CPU’s perspective • 同步事件:发生时间可预测,驱动的任务为同步任务 – Synchronous events are those that occur at predictable times in the flowof-control. – 如:内部中断(internal trap interrupt) • 异步事件:随机发生的事件,驱动的任务为异步任务 – Asynchronous events occur at unpredictable points in the flow-of-control and are usually caused by external sources. llxx@ustc.edu.cn 16/94 – 如:外部中断 • A clock that pulses “regularly” at 5 milliseconds is not a synchronous event.(因为存在clock drift!) CPU 中断控 制器1 中断控 制器2 外部事件
事件响应模式:ET、TT 中断有应 ·事件触发系统ET 外部事件1 响应输出1 一中断驱动:依赖于事件的顺序 中断响应 任务调度 任务执行 外部事件2 响应输出2 -低负载时(事件少)响应快。 ·事件风暴(event shower):大量事件同时到来,系统崩溃 - 按arrival pattern响应事件,适合采用动态调度 o 时间触发系统Time-triggered 一事件是异步的,响应时间是预先确定的(时间间隔不一定固定) ·将事件缓存,每个时钟tick中断时再进行分析处理 -按response time requirements!响应事件,适合采用静态调度 例:考虑一个100层电梯的控制器设计 -当前电梯在60层,有人在一层按钮,100ms后有人在90层 按钮 ·事件触发系统:1层先相应,将100层按钮缓存。 ·时间触发系统:设500ms一个tick,触发采样。 一同时多个事件,则需进行仲裁。可按“最近用户优先”原则
事件响应模式:ET、TT • 事件触发系统ET – 中断驱动:依赖于事件的顺序 – 低负载时(事件少)响应快。 • 事件风暴(event shower):大量事件同时到来,系统崩溃 – 按arrival pattern响应事件,适合采用动态调度 • 时间触发系统Time-triggered – 事件是异步的,响应时间是预先确定的 响应时间是预先确定的(时间间隔不一定固定 时间间隔不一定固定) • 将事件缓存,每个时钟tick中断时再进行分析处理 – 按response time requirements响应事件,适合采用静态调度 • 例:考虑一个100层电梯的控制器设计 – 当前电梯在60层,有人在一层按钮,100ms后有人在90层 按钮 • 事件触发系统:1层先相应,将100层按钮缓存。 • 时间触发系统:设500ms一个tick,触发采样。 – 同时多个事件,则需进行仲裁。可按“最近用户优先”原则
Execution Schemes for RT Tasks USTC Initiating event Initiating event Event-Driven Task Execution Time Slack Time Minimum interarrival time Actual Interarrival time Scheduled start Scheduled start time Deadline time Time-Driven Task Execution L Time 入 Slack Time Period
Execution Schemes for RT Tasks
ETTT编程框架 USTC ·Event-driven P-System C-System -Interrupt-driven Real Time -ET schemes Com. System 。 Clock-driven -TT schemes 盒Event in Interface Node of the P System the C-System Initialize Memory Initialize Memory foreach input_event do foreach period do Read Inputs <Compute Outputs Compute Outputs Update Memory end <Update Memory end a.“Event driven b.“Sampling
ET/TT编程框架 • Event-driven – Interrupt-driven – ET schemes • Clock-driven – TT schemes
事件-动作范式:设计分析方 ·框架、场景(组)、表 一基于场景:场景表->实现表->技术表->分析 offer a set of implementations for each situation ·资源调度策略:fixed priority,preemptive scheduling ·评估事件响应的可靠度性(满足d?) g A Practitioner's Handbook for Real-Time Analysis: 常
事件-动作范式:设计分析方法 • 框架、场景(组)、表 – 基于场景:场景表->实现表->技术表->分析 • offer a set of implementations for each situation • 资源调度策略:fixed priority, preemptive scheduling • 评估事件响应的可靠度性(满足dl?)