📜  周期性和零星实时任务之间的区别

📅  最后修改于: 2021-09-12 10:40:58             🧑  作者: Mango

先决条件 – 实时系统中的任务

1. 周期性实时任务:
在一定时间间隔后重复执行的实时任务称为周期性实时任务。基本上,周期性实时任务由时钟中断控制。因此,周期性的实时任务也称为时钟驱动任务。
例如,在化工厂中,定期测量温度、压力和其他属性,并将所有信息传递给控制器。

2. 零星实时任务:
在随机瞬间重复发生的实时任务称为零星实时任务。偶发实时任务与非周期性实时任务有一定的相似性,但又不同于非周期性实时任务。基本上所有高危任务都是零星任务。
例如,工业中的消防处理任务是零星的任务。

周期性和零星实时任务的区别:

PERIODIC TASK SPORADIC TASK
It reoccurs after a certain period of time. It reoccurs at random instant.
It is controlled by clock interrupts. It is not controlled by clock interrupts.
Time of occurrence of periodic tasks can be predicted. Time of occurrence of sporadic tasks can’t be predicted.
It includes moderate critical or low critical tasks. It includes highly critical tasks.
It includes normal system tasks. It includes tasks that may lead to system failure.
It can be easily scheduled by cyclic scheduler. It is complex to schedule sporadic tasks by cyclic scheduler.
Periodic tasks are allotted time frame in generalized task scheduler. Sporadic tasks are allotted slack time in generalized task scheduler.
Example: Measuring of temperature and pressure at a time interval. Example: Emergency message arrivals in the system.