Algorithms for hierarchical and semi-partitioned parallel scheduling