I want to run 3 jobs (A, B, C) on 2 cores of a machine with >2 cores. I know that:
runtime(A)>runtime(C)
runtime(B)>runtime(C)
It is unknown in advance if runtime(A)>runtime(B) or runtime(A)<runtime(B).
What I want to do is:
- launch A on core 1
- launch B on core 2
- after either one is finished, launch C on the one free core
How can this be achieved (in bash, if possible)?