Computation of risk measures in finance and parallel real-time scheduling