Optimal CPU allocation to a set of control tasks with soft real--time execution constraints