A Framework for Hierarchical Scheduling on Multiprocessors: From Application Requirements to Run-Time Allocation