优先级队列 - 时间队列

时间:2013-05-02 16:58:13

标签: c linux data-structures

我正在尝试在C中构建一个计时器队列来保存需要根据时间处理的作业,优先级队列是最好的事情还是还有其他我需要注意的东西?

以下是我所拥有的,

job 1, start_time, time_to_exec, execute after 5 minutes 
job 2, start_time, time_to_exec, execute after 5 minutes 
Then new job came in 
job 3, start_time, time_to_exec, execute after 1 minutes 
...
and so on

我将每隔几微秒检查第一个元素。

start_time是进入队列之前的时间。

time_to_exec是用于将作业插入队列的时间

0 个答案:

没有答案