# Scheduling the Exchange of Context Information for Time-Triggered Adaptive Systems
## 5 Results and Discussion
### Comparative Evaluation with Periodic Sampling Approaches  
To benchmark our algorithm against existing solutions, we conducted a comparison focusing on the prevalent approach of periodic sampling for context information exchange, a standard in the current state of the art. Our methodology for this comparison involved the following steps:  
We simulated the conventional approach by implementing periodic sampling across a range of application profiles. Sampling points were calculated at intervals varying from 2 to 10 time units (represented as 2 TU to 10 TU), reflective of typical practices observed in existing solutions. By sampling points, we refer to the periodic exchange of context information. The range (2 TU to 10 TU) is chosen to encompass a broad spectrum of scenarios, from more frequent to less frequent information exchanges, providing a robust basis for comparison. We describe the context information utilized in the test as a tuple. The elements of the tuple are as follows: (_event_type_, _job_id_, and _percentage_slack_). Each application profile was analyzed under both our proposed algorithm and the traditional periodic sampling method. The primary focus of this comparative analysis was to assess the impact on two crucial metrics: communication cost and makespan (the total time taken to complete all jobs). By evaluating these metrics, we aimed to understand not only the efficiency of our algorithm in reducing communication overhead but also its effectiveness in optimizing overall system performance. Table 2 presents the total communication costs associated with different context exchange methods as the number of jobs increases for each MSG. Our proposed algorithm exhibits the most efficient performance, with a gradual increase in communication cost, ranging from 490 time units for 10 jobs (10) to 147,420 time units for 60 jobs (60). In contrast, sampling every 2 time units incurs the highest costs, especially noticeable at higher job counts (e.g., 4,862,588 time units for 60 jobs). As the sampling interval increases (from 2 TU to 10 TU), there is a consistent reduction in communication cost, demonstrating the impact of less frequent context exchanges in reducing communication overhead. However, sampling at a less frequent interval poses the challenge of omitting responses to context events. Compared to the 2 TU sampling method, the proposed algorithm reduces communication overhead by significant factors across different job sizes, as shown in Table 2 below. The plot in Figure 7 compares the communication costs associated with different scheduling algorithms as the number of jobs increases. Using a logarithmic scale for the y-axis (Total Communication Cost in Time Units, TU), the plot demonstrates a clear trend: as the number of jobs grows, the communication cost escalates in all cases. The data illustrate that our proposed algorithm (blue) consistently incurs lower communication costs compared to other sampling intervals, particularly at higher job counts, thus emphasizing its efficiency. Figure 8 illustrates the observed makespan for the previous example with and without the application of our algorithm. The values in time units are given in Table 3. It can be observed in Figure 8 that the makespan when our proposed algorithm is implemented (blue plot) is slightly increased compared to when the algorithm is not applied (the case of no context exchange (red plot)). It is important to note that the makespan in the case \"No Context Exchange\" does not include the cost of sampling the exchange of context information. However, in a scenario where the communication cost associated with different sampling frequencies is included, the makespan can be impacted, as shown in the results obtained in Table 4, if the same communication channel is used for exchanging context information.