Optimized algorithm to schedule tasks with dependency?

后端 未结 5 2142
梦毁少年i
梦毁少年i 2021-01-30 17:50

There are tasks that read from a file, do some processing and write to a file. These tasks are to be scheduled based on the dependency. Also tasks can be run in parallel, so the

5条回答
  •  無奈伤痛
    2021-01-30 18:50

    first generate a topological ordering of your tasks. check for cycles at this stage. thereafter you can exploit parallelism by looking at maximal antichains. roughly speaking these are task sets without dependencies between their elements.

    for a theoretical perspective, this paper covers the topic.

提交回复
热议问题