Adaptive CPU-budget allocation for soft-real-time applications