数据结构
dague_scheduler_t sched_priority_based_queues = {
.name = “Priority Based Queues”,
.global_init = init_local_flat_queues,
.thread_init = NULL,
.schedule_task = schedule_local_queues_by_priority,
.select_task = choose_job_local_queues,
.display_stats = NULL,
.finalize = finalize_local_flat_queues
};
init
和DAGUE_SCHEDULER_LFQ的init方式一致,可以参考Dplasma调度方式—— DAGUE_SCHEDULER_LFQ();
shedule
和schedule_local_queues(可以参考Local Hierarchical Queues的方式)的不同之处在于schedule_local_queues放入task_queue中是以见缝插针的方式放入task_queue,而chedule_local_queues_by_priority则是以优先级排列的顺序放入task_queue的。可能导致原有的task_queue中的task被挤入system_queue中。