Optimal allocation of time redundancy and abort policies for multiple sequential tasks