Efficient Resource Allocation for Real-Time Systems