A framework for hierarchical scheduling on multiprocessors: from application requirements to run-time allocation