Optimal parallel scheduling