I want to implement the following job/resource scheduling problem:
- A DAG of jobs where edges encode precedence relations.
- Jobs may be executed in parallel if they do not have a precedence relation
- Multiple resource pools, each pool containing one or more similar resources.
- A job may depend on one or more resources from one or more pools. I.e. job J1 says something like: "I need 2 resources from pool P1 and 7 resources from pool P2."
- A job may express that it wants exactly the same resources as one of their immediate predecessors. I.e. job J2 might say "I need 1 resource from pool P1, but it must be one of the resources that job J1 got assigned." As a simplification I assume that job J2 must be a direct successor of J1 for this kind of constraint.
- A resource dependency can be read or write or both or "don't care"
- When job J1 says that it writes to resources from pool P1 and its successor job J2 has a read dependency on "the same resource as J1 got from P1". In between, the resource is not available for other jobs for writing because resources are stateful.
- I don't know the execution time of each job in advance and there are also no priorities nor deadline requirements on the jobs.
I am looking for:
- a way to express this problem in a formal domain,
- an offline schedulability test that answers the question whether a job graph can be executed with the given requirements and constraints.
- a suggestion for an online scheduling algorithm
If there were no resource pools, but only 1 resource of each type, the problem would probably be much simpler. I am familiar with the basics in graph theory and simple dataflow analysis algorithms.