Chapter 8 Structural Robustness of Distributed Real-Time Systems Towards Uncer-
8.4 Methodology to Improve Structural Robustness of the System
8.4.2 Handling Tasks with Cyclic Paths
In this section, we extend our technique to tasks that may have cyclic paths, similar to our work in Chapter 5. When the path of a job Tk revisits a resource instance more than once, we say that it contains one or more
folds. A fold of Tk starting at instance j is defined as the longest sequence of stages (in the order traversed
by Tk) that does not repeat a resource instance twice. The first fold on P athCk starts with the first resource
that Tk visits. If the path of a task is acyclic, then it has only one fold that contains the whole path. We
shall assume that each fold of a task is assumed independent of one another, and will be treated as separate higher priority jobs. The intuition behind defining folds is that each fold may delay a lower priority job at most once per stage.
Similar to our earlier definition, we can define task segments for each fold. The delay composition theorem that bounds the worst-case end-to-end delays of tasks is valid for tasks with cyclic paths as well. Each segment of each fold of a higher priority job causes a delay of at most two maximum stage execution times on a lower priority job. The rest of our discussion on improving the structural robustness of systems follows as before, using the delay composition theorem for tasks that may contain cyclic paths.
8.5
Evaluation
In this section, we evaluate through simulations the structural robustness of the system to unanticipated delays in the execution times of tasks. We first measure the number of deadline misses in the system in the absence of unanticipated delays. We then introduce unanticipated delays in the execution times by varying the fraction of sub-tasks that are delayed, as well as the extent to which they are delayed. We measure the end-to-end deadline misses before and after applying our algorithm to improve the robustness of the system, and show that the algorithm is able to reduce the number of deadline misses by around 50%.
The default system consists of 8 resource types and three instances of each resource. The system is assumed to operate close to the capacity. This is ensured by admitting enough tasks into the system, such that very few deadlines are missed in the absence of unanticipated delays in the worst-case stage execution times. Task routes are chosen by first choosing a path length at random, and then randomly picking a resource for each hop. Task routes can have cycles. Based on the sequence of resources for each task, we assign particular instances of resources to determine the task’s path within the system. Each resource
instance serves tasks using a deadline monotonic scheduling policy. Other simulation parameters are chosen similar to previous chapters. The default value of the deadline ratio parameter, DR, is assumed to be 1.0. The default value of the task resolution parameter, T , is chosen as 0.1. The execution time at each stage is chosen within a range of 10% on either side of the mean.
Unexpected delays are introduced into the system, by picking a certain fraction of the sub-tasks, denoted as DelayedT asks, to experience unanticipated delays. The default value of DelayedT asks is 0.25. The delay experienced by each sub-task thus chosen, is also varied as a parameter DelayAmt. The parameter DelayAmt represents the ratio of the unanticipated delay to the original estimate of the worst-case execution time of the sub-task. Unless otherwise specified, the value of DelayAmt is taken as 0.75.We consider two importance vectors for the tasks. The first assigns equal importance to all the tasks and the second assigns an importance to each task inversely proportional to its end-to-end deadline. As the results from both importance vectors are similar, we only plot the values for the case where the importance of all tasks are equal. We run our hill climbing algorithm for 500 steps, at each step picking a task to move from one instance to another, and retaining the new configuration if its structural robustness is found to be better than that of the current configuration.
Each point in the figures below represent the average value of 100 independent executions, with each execution consisting of 80000 task invocations (of all tasks taken together). The 95% confidence interval for all the values presented are within 1% of the mean value, and is not plotted for the sake of legibility.
0 50 100 150 200 250 300 350 1 0.75 0.5 0.25 0
No. of Deadline Misses
Extent to which tasks are delayed Random
Robust
Figure 8.7: Comparison of number of deadline misses for different extents to which tasks are de- layed 0 50 100 150 200 250 300 0.5 0.35 0.25 0.1 0
No. of Deadline Misses
Fraction of tasks delayed Random
Robust
Figure 8.8: Comparison of number of deadline misses for different fraction of tasks delayed
We first varied the DelayAmt for each unanticipated delay and estimated the number of deadline misses before applying are algorithm to improve robustness (labeled as random) and after (labeled as robust). The results are plotted in Figure 8.7. Note that a value of zero for DelayAmt represents the system without any unanticipated delays. As expected, the number of deadline misses experienced by the baseline randomized
system increases with the value of DelayAmt. As the value of DelayAmt is increased from 0 to 1, the number of deadline misses of the baseline system increases from almost zero to about 300. For each value of DelayAmt, applying our robustness algorithm to the task paths reduces the number of deadline misses by over 50%. This can be extremely useful to improve the overall performance of soft real-time systems, where estimations of worst-case computation times can be erroneous.
We next varied the fraction of tasks that experience unanticipated delays by varying the parameter DelayedT asks from 0 to 0.5 and measured the number of deadline misses. The results of this experiment are plotted in Figure 8.8. Here again, a value of zero for the DelayedT asks parameter denotes a system without unanticipated delays. The robustness algorithm is able to achieve more than a 60% reduction in the number of deadline misses for all values of DelayedT asks up to 0.35, and achieves around 40% reduction when DelayedT asks is 0.5.
0 50 100 150 200 250 4 3 2
No. of Deadline Misses
No. of instances of each resource Random without delays
Random Robust without delays Robust
Figure 8.9: Comparison of number of deadline misses for different number of instances for each re- source type 0 50 100 150 200 250 300 350 10 8 6 5
No. of Deadline Misses
No. of resource types Random without delays
Random Robust without delays Robust
Figure 8.10: Comparison of number of deadline misses for different number of resource types
Figure 8.9 plots the number of deadline misses for different number of instances available for each resource type (there are 8 types of resources). For each system, the number of tasks admitted is varied to ensure that the system operates close to its capacity when there are no unanticipated delays. This is ensured by admitting as many tasks to cause very few deadline misses (less than 10 for each execution). The label ’random without delays’ represents the average number of deadline misses for the baseline system. The label ’robust without delays’ represents the same when the robustness algorithm is applied. Unanticipated delays are introduced into the system with 25% of the sub-tasks experiencing delay (DelayedT asks = 0.25) and each such sub-task being delayed for 75% additional time (DelayAmt = 0.75). The labels ’random’ and ’robust’ denote the number of deadline misses in the system with unanticipated delays before and after applying our robustness algorithm. We are able to achieve a 40-60% reduction in the number of deadline misses, with the reduction being larger for systems with more number of instances of each resource. This
is because, as more instances are available, the algorithm is able to perform better by finding more robust assignments of sub-tasks to stages.
Figure 8.10 plots the number of deadline misses for different number of types of resources. Similar to the previous experiment, the number of admitted tasks is varied to admit as many tasks as possible without exceeding 10 deadline misses for each execution of the system. The value of DelayedT asks is set as 0.25 and that of DelayAmt is set to 0.75. Here again the robustness algorithm is able to achieve a 35-50% reduction in the number of deadline misses, with the reduction being more pronounced for larger systems, as the algorithm has a greater potential to find better assignments of sub-tasks to stages.