1. 周期性实时任务:
在一定时间间隔后重复执行的实时任务称为周期性实时任务。基本上,周期性实时任务由时钟中断控制。因此,周期性的实时任务也称为时钟驱动任务。任务重复自身的时间间隔称为任务周期。
例如,当雷达检测到飞行时,直到雷达存在,雷达信号区就是周期性实时任务的一个例子。
2. 非周期性实时任务:
在任何随机时间发生的实时任务称为非周期性实时任务。在两个非周期性实时任务之间,时间间隔甚至可能为零。软实时任务通常是非周期性的实时任务。也有可能这些任务经常发生,或者两个非周期性的实时任务之间可能有很大的时间间隔。
例如,在键盘上打字是一项非周期性的实时任务。
周期性和非周期性实时任务的区别:
PERIODIC TASK | APERIODIC TASK |
---|---|
It repeats itself after a certain time interval. | It can occur at random instants. |
These tasks are controlled by clock interrupts. | These tasks are not controlled by clock interrupts. |
The time interval between occurrence of two consecutive tasks can’t be zero. | The time interval between occurrence of two consecutive tasks can be zero. |
Periodic tasks generally include soft and hard real-time tasks both. | Aperodic tasks generally include soft real-time tasks. |
Deadline of all instances of periodic task can be meet easily. | To meet deadline of all instances of an aperodic task is quite difficult. |
It includes vast majority of internal tasks. | It includes interactive task with users. |
Example: Taking information from sensor at a time interval. | Example: Logging task in a distributed system. |