实时系统中有两种类型的任务:定期任务和动态任务。
进一步的动态任务分类为:
1.零星的实时任务:
在任意随机时刻重复发生且具有严格期限的实时任务称为零星实时任务。偶然的实时任务与非周期性的实时任务有一些相似之处,但是这些任务与非周期性的实时任务不同。基本上,所有高关键任务都是零星任务。
例如,工业中的消防任务或系统中的紧急消息到达是零星的实时任务。
2.非周期性实时任务:
在任意随机时间重复出现并具有软期限的动态任务称为非周期性实时任务。在两个非周期性实时任务之间,时间间隔甚至可能为零。非周期性实时任务通常包括软实时任务。
例如,在键盘或鼠标移动上键入是非周期性的实时任务。
零星和非周期性实时任务之间的区别:
SPORADIC TASK | APERIODIC TASK |
---|---|
It has hard deadline. | It has soft deadline or no deadline. |
It is highly critical task. | It is low or moderate critical task. |
The minimum separation between two consecutive instances can not be zero. | the minimum separation between two consecutive instances can be zero. |
It includes hard real-time tasks. | It includes soft real-time tasks. |
Deadline of all instances of sporadic task can be meet easily. | To meet deadline of all instances of aperiodic task is difficult. |
It goes through acceptance test. | No testing is performed on aperiodic task. |
It is executed only when sufficient slack time is available. | Its execution does not depend on available slack time. |
It gets rejected by scheduler when there is less slack time. | It never get rejected by scheduler. |
It includes commands given by the system. | It includes interactive commands given by the user. |
Example: Security alert program in system. | Example: Logging task in system. |