# On-the-Fly Repairing of Atomicity Violations in ARINC 653 Software
## 5 Experiments
### Performance Evaluation  
This section evaluates the performance of RAV. We measured the time and space overheads with native and [PERSON] et al. 's [17] algorithm to verify the performance of RAV. Time overhead measured program execution time, diagnosis time and treatment time. Space overhead measured total memory usage used during program execution. We measured the overhead in the program execution time by increasing the number of repetitions of the synthetic program from 100,000 to 1,280,000 while increasing the repetition by multiples of two. Figure 9 shows the time overhead of five synthetic programs. The total program execution time increased approximately twice in proportion to the number of program iterations. The total execution time of each approach was also similar. The time overhead of [PERSON] et al. 's [17] algorithm took an average of 1.19\(\times\), a minimum of 1.06\(\times\) and a maximum of 1.29\(\times\), compared to the native algorithm. The time overhead of RAV took an average of 1.13\(\times\), a minimum of 1.06\(\times\) and a maximum of 1.20\(\times\), compared to the native algorithm. RAV showed slightly lower time overhead than [PERSON] et al. 's [17] algorithm, but the difference was very small. The cause of the time overhead is rooted in the time spent on diagnosis and treatment in the repairing algorithm. When the number of branches in the program is small, [PERSON] et al. 's [17] algorithm does not require a significant overhead because the time spent comparing access history is small. However, if the number of threads is large, the overhead increases considerably. Since RAV only checks the collected correct interleaving, it can be diagnosed with lower overhead than [PERSON] et al. 's [17] algorithm. The experimental results show that it is repaired with more overhead than the native program, but less than [PERSON] et al. 's [17] algorithm. As a result, the difference in the time overheads of the two approaches was a minimum of 0% and both techniques are adequate for a real-time system if we can tolerate a time overhead of about 5-30%. Figure 9: Execution time of synthetic programs [16]. Figure 10 shows the result of the space overhead of the five synthetic programs. In all synthetic programs, the native algorithm showed the same space overhead of 20 KB, regardless of iterations. [PERSON] et al. 's [17] algorithm showed an exponential increase in space usage. From 10,000 to 80,000 times, the overhead was lower than that of RAV, but, after 80,000, the overhead was higher than that of RAV. RAV showed the same overhead of 219 KB from program start to end. [PERSON] et al. 's [17] algorithm creates the access history every time a thread occurs and uses a lot of memory because it needs to update the access history every time the shared memory is accessed. RAV shows the same memory usage from beginning to end because correct interleaving is inserted into the memory at the same time as program execution starts. As a result, [PERSON] et al. 's [17] algorithm has a higher memory usage, so, when it is applied in airborne software, it is necessary to secure the corresponding memory usage. Since RAV has the same or lower overhead, it can be applied to airborne software. Figure 11 shows the repairing time spent while executing a synthetic program with 1,280,000 iterations. The repairing time of [PERSON] et al. 's [17] algorithm was 3.1 s on average, a maximum of 4 s for \(T_{1}^{[W-R]}\parallel T_{2}^{W}\) and a minimum 2 of seconds for \(T_{1}^{[W-W]}\parallel T_{2}^{R}\). The repairing time of RAV was, on average, 1.8 s, a maximum of 2.0 for \(T_{1}^{[W-R]}\parallel T_{2}^{W}\) and a minimum of 1.6 for \(T_{1}^{[R-R]}\parallel T_{2}^{W}\). The repairing time of [PERSON] et al. 's [17] algorithm showed an average of 1.7\(\times\), a maximum of 1.99\(\times\) and a minimum of 1.4\(\times\) longer than RAV. [PERSON] et al. 's [17] program showed that the diagnosis time was lower than that of RAV, but the total repairing time was higher than that of RAV because of the high treatment time.