CHAPTER 10 10.2 Real-Time Scheduling
CHAPTER 10 10.2 Real-Time Scheduling
Background Correctness of the system depends not only on the logical result of the computation but also on the time at which the results are produced (系统的正确性不仅取决于计算的逻辑结果,而且还 依赖于产生结果的时间) Tasks or processes attempt to control or react to events that take place in the outside world (实时任务或进程试图控制外部世界发生的事件或对 这些事件作出的反应) These events occur in“‘ real time” and process must be able to keep up with them (这些事件是“实时”发生的,进程必须能够跟随处 理这些事件)
Background • Correctness of the system depends not only on the logical result of the computation but also on the time at which the results are produced (系统的正确性不仅取决于计算的逻辑结果,而且还 依赖于产生结果的时间) • Tasks or processes attempt to control or react to events that take place in the outside world (实时任务或进程试图控制外部世界发生的事件或对 这些事件作出的反应) • These events occur in “real time” and process must be able to keep up with them (这些事件是“实时”发生的,进程必须能够跟随处 理这些事件)
实时系统的例子 Control of laboratory experiments(实验 控制) Process control plants(过程控制设备) Robotics(机器人) Air traffic control(空中交通管制) Telecommunications(远程通信) Military command and control systems (军事指挥与控制系统)
实时系统的例子 • Control of laboratory experiments(实验 控制) • Process control plants(过程控制设备) • Robotics(机器人) • Air traffic control(空中交通管制) • Telecommunications(远程通信) • Military command and control systems (军事指挥与控制系统)
Real-Time System 指能及时响应外部事件的请求,在规定的 时间内完成对该事件的处理,并控制所 有实时任务协调一致地运行的计算机系 统
Real-Time System 指能及时响应外部事件的请求,在规定的 时间内完成对该事件的处理,并控制所 有实时任务协调一致地运行的计算机系 统
Real-Time System 实控制系统,指要求进行实时控制的系统。 用于生产过程的控制,实时采集现场数据,并 对所采集的数据进行及时处理。如飞机的自动 驾驶系统,以及导弹的制导系统等。 实信息她理系统,指能对信息进行实时处 理的系统。典型的实时信息处理系统有:飞机 订票系统、情报检索系统等
Real-Time System • 实时控制系统,指要求进行实时控制的系统。 用于生产过程的控制,实时采集现场数据,并 对所采集的数据进行及时处理 。如飞机的自动 驾驶系统,以及导弹的制导系统等。 • 实时信息处理系统,指能对信息进行实时处 理的系统。典型的实时信息处理系统有:飞机 订票系统、情报检索系统等
Rea-time task ·按任务执行时是否呈现周期性来划分 periodic(周期性)实时任务 aperiodic(非周期性)实时任务,必须联 系着一个截止时间( deadline 根据对截止时间的要求来划分 hard real- time task(硬实时任务),系 统必须满足任务对截止时间的要求,否则可能 出现难以预测的结果。 soft rea|- time task(软实时任务)
Real-time Task • 按任务执行时是否呈现周期性来划分 periodic(周期性)实时任务 aperiodic(非周期性)实时任务,必须联 系着一个截止时间(deadline) • 根据对截止时间的要求来划分 hard real-time task (硬实时任务) ,系 统必须满足任务对截止时间的要求,否则可能 出现难以预测的结果。 soft real-time task (软实时任务)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) · Deterministic(确定性) Operations are performed at fixed, predetermined times or within predetermined time intervals(是指可以按照固定的、预先确 定的时间或时间间隔执行操作) Concerned with how long the operating system delays before acknowledging an interrupt (W 定性关注的是操作系统获知有一个中断之前有 多长延迟)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) • Deterministic(确定性) – Operations are performed at fixed, predetermined times or within predetermined time intervals(是指可以按照固定的、预先确 定的时间或时间间隔执行操作) – Concerned with how long the operating system delays before acknowledging an interrupt(确 定性关注的是操作系统获知有一个中断之前有 多长延迟)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) Responsiveness响应性) How long, after acknowledgment, it takes the operating system to service the interrupt (响应时间关注的是:知道中断之后,操作系统为中断提 供的服务时间) ●响应性包括: Includes amount of time to begin execution of the interrupt(包括处理中断并开始执行中断服务例程所需 时间总和) Includes the amount of time to perform the interrupt (包括执行中断服务例程所需要的时间总量)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) • Responsiveness(响应性) • How long, after acknowledgment, it takes the operating system to service the interrupt (响应时间关注的是:知道中断之后,操作系统为中断提 供的服务时间) ●响应性包括: – Includes amount of time to begin execution of the interrupt(包括处理中断并开始执行中断服务例程所需 时间总和) – Includes the amount of time to perform the interrupt (包括执行中断服务例程所需要的时间总量)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) User control User specifies priority(用户指定优先级) Use of paging or process swapping(使用分 页调度或是进程交换) What processes must always reside in main memory(进程必须常驻内存) Disks algorithms to use(使用磁盘算法) Rights of processes进程具有的权限)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) • User control – User specifies priority(用户指定优先级) – Use of paging or process swapping(使用分 页调度或是进程交换) – What processes must always reside in main memory(进程必须常驻内存) – Disks algorithms to use(使用磁盘算法) – Rights of processes(进程具有的权限)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) Reliability(可靠性 Degradation of performance may have catastrophic Consequences(性能降低可能产生文难性的后果) Attempt either to correct the problem or minimize its effects while continuing to run(企图即能校正问 题或将影响降到最小而继续运行) Most critical(采用临界区保证可靠性),high priority tasks execute(高优先级任务先执行)
Characteristics of Real-Time Operating Systems (实时操作系统的特点) • Reliability(可靠性) – Degradation of performance may have catastrophic consequences(性能降低可能产生灾难性的后果) – Attempt either to correct the problem or minimize its effects while continuing to run(企图即能校正问 题或将影响降到最小而继续运行) – Most critical(采用临界区保证可靠性), high priority tasks execute(高优先级任务先执行)