Stochastic allocation and scheduling for conditional task graphs in multi-processor systems-on-chip