A Model-Based Optimization Method of ARINC 653 Multicore Partition Scheduling
Abstract
:1. Introduction
- (1)
- The formal modeling of ARINC 653 multicore partition scheduling: The IMA multicore processing system is modeled as a network of timed automata in UPPAAL.
- (2)
- A model-based optimizer: A parallel genetic algorithm is employed to explore the solution space of the IMA system. The configuration of genetic operators is self-adaptively controlled by a Q-learning algorithm.
- (3)
- Compositional and parallel evaluation: During the evolution, each individual in a population is evaluated independently by compositional model checking. The parallelization acceleration mitigates the state space explosion problem.
2. System and Problem Definition
2.1. Scheduling Policies in ARINC 653
2.2. Definition of ARINC 653 Multicore Processing Systems
2.3. Problem Definition
3. Framework of the Model-Based Optimization Method
3.1. Model-Based Optimizer
- (1)
- Genetic operators
- (2)
- Self-adaptive configuration based on Q-learning
- (3)
- Temporal demand decoder
- (4)
- Scheduling table generator
- (5)
- Schedulability verification
- (6)
- Fitness evaluation
3.2. Algorithm Description of Model-Based Optimization
Algorithm 1: Model-based Optimization |
Input:, timed automaton templates of the system Output: , the optimal partition scheduling table |
4. The Parallel Genetic Algorithm
4.1. The Genetic Operators
4.1.1. Selection Operator
4.1.2. Recombination Operator
4.1.3. Mutation Operator
4.2. Self-Adaptive Configuration Based on Q-Learning Algorithm
- (1)
- State: Based on the changes in best fitness during the evolution, we define a state set . The state indicates an increase in the best fitness of the current population compared to the previous generation. The states represent the fact that the best fitness has remained unchanged for 1~ generations, respectively. is typically an integer between 10 and 50.
- (2)
- Action: the actions are to adjust the strategy parameters during evolution, including three options: increase, decrease, and remain unchanged, represented by the symbols , and , respectively, and forming the action set .
- (3)
- Q-function: The Q-function [28] , returning a Q-value, evaluates the expected cumulative reward for any state–action pair , determining the long-term benefit of taking action in state . The Q-function is recursively defined as follows:
- : the generation number of the evolution.
- : the population state at the th generation.
- : the action taken for the population at the th generation.
- : the population state at the th generation.
- : the action taken for the population at the th generation.
- : the learning rate for strategy parameter adjustment.
- : the discount factor , balancing the delayed and immediate rewards.
- : the immediate reward obtained by performing action in state .
- : an implicit state transition function indicates the population state of the th generation.
- : a positive integer constant represents the positive reward value provided to the Q-function.
- : the policy function value at the th generation.
- : a sampling function maps an element in to itself, representing the process of uniformly selecting an element from the set and returning the selected element.
- : the probability of exploring the action space is normally defined as .
5. Formal Model of ARINC 653 Multicore Scheduling Systems
5.1. Partition Scheduler
5.2. Task Scheduler
5.3. Task Template
- (1)
- If a task triggers a “Health-Monitoring (HM) error” detected by the OS, the kernel will not permit the faulted task to continue to run (i.e., fatal error). A faulted task must be stopped immediately before it can be restarted. This behavior is modeled as the transition to the Error location.
- (2)
- Tasks that report an application error will continue to be eligible to run. This case relies on implementation dependent behavior instead of being managed by HM, commonly causing the variance in execution times of related tasks. This feature can be described as the non-deterministic execution time in the task model.
6. Experiments
6.1. Implementation of Optimzation Method
- Input manager: This module receives the configuration of the optimizer from the users’ Initialization (INI) file. A dedicated Configuration class manages various parameters including the ranges of periods, budgets, and iterations, the settings for genetic operators, fitness function, model checker, and Q-learning. The input manager invokes the Python library ConfigParser to access the INI files.
- Model generator: This module generates a TA model of the system for each valid individual in the population during the genetic evolution process. Based on the temporal demand of the individual, a partition scheduling table is produced by the generation algorithm and imported into the TA model. The system models, formatted as XML (eXtensible Markup Language) files, are utilized as input for UPPAAL. This module leverages the Python library of the XML Document Object Model (DOM) to access and construct the XML model files.
- Genetic algorithm: This module incorporates a suite of genetic operators—namely selection, crossover, and mutation—alongside the fitness function, all of which are designed to facilitate parallel processing using the Message Passing Interface (MPI). The MPI services are provided by the Open MPI library and accessed through the Python package mpi4py. The genetic algorithm manipulates the objects of the two Python classes GAPopulation and GAIndividual, which define the populations and individuals, respectively. For each individual, the fitness function invokes the UPPAAL verifier to evaluate the schedulability and processor occupancy of the corresponding system model. By collecting the reward from the fitness values during evolution, the Q-learning algorithm invokes a Python class GAStrategy to update the strategy vector and Q table.
- Output manager: This module conducts a statistical analysis of the evolutionary process, providing the statistical results of each generation and finally delivering the optimal partition scheduling table to users. The Python library Openpyxl is employed to output statistical information to spreadsheets.
6.2. Experiment on a Simple Avionics System
- (1)
- Exhaustive search (ES): In [30], the schedulability of the system was determined by a response time analysis. This method verified all the possible integer combinations of the partition periods within the given range [40, 2000]. For each combination, a binary search was employed to find the minimum partition budget. In this experiment, we check the schedulability by model checking. Although an exhaustive search can find the global optimal solution, it is only practical for simple systems. Its feasibility descends significantly as the solution space and system complexity increase.
- (2)
- Geometric programming: In [12], Geometric Programming (GP) was utilized to model and solve the optimization problem of partitioned scheduling systems. This method is suitable for addressing the nonlinear and non-convex optimization problems but is limited to handling simple sets of periodic tasks with fixed execution times. In this experiment, a GP optimizer for an avionic system is implemented using the Python GP library GPkit 1.1.
- (3)
- Classic genetic algorithm: Two well-known genetic algorithms are utilized: the Basic Genetic Algorithm [31] and Breeder Genetic Algorithm [32], marked as “GA1” and “GA2”, respectively. Both of the algorithms use binary encoding for individuals. In GA1, the crossover probability for each bit is set at 0.5 and the mutation probability is 0.2. In GA2, the proportion of truncation selection T% is set to 50%, the weight factor of the extended intermediate recombination operator is 0.5, the standard deviation for the Gaussian mutation operator is 1000, and the mutation probability is 0.2.
- (3)
- Model-based method for ARINC 653 in this paper (MBM653): The individuals in a population are also binary encoded. The base of the exponential ranking selection is assigned at c = 0.8, and the factor for recombination is d = 0.5. The initial standard deviation of the mutation is defined as , . The number of states is set to 50 in the Q-learning algorithm.
6.3. Experiment on a Concrete Avionic System
- (1)
- Empirical scheduling
- (2)
- MBM653 method
6.4. Discussion
6.5. Scalability and Limitations
- (1)
- Parallelization and Scalability of the Genetic Algorithm: In the genetic algorithm, fitness evaluation is essential for assessing the quality of each individual in the population and represents the most computationally intensive step. For each generation, the algorithm independently evaluates each candidate individually (partition scheduling table). Given the independence of the fitness evaluations, they can be executed in parallel across different processors or computing nodes, significantly accelerating the processing for each generation. Furthermore, the genetic operators designed for this approach can also be parallelized for recombination, mutation, and selection. Thus, provided there are sufficient parallel computing resources, the processing time of our model-based optimization does not increase significantly with larger population sizes.
- (2)
- Parallelization and Scalability of Compositional Model Checking: The fitness evaluation for each individual requires a schedulability verification of the corresponding system model through model checking, which can be computationally intensive. Our approach employs a compositional method to verify the schedulability of each partition in parallel, merging all the local results to derive global conclusions regarding the schedulability and fitness evaluations. Consequently, the processing time remains manageable even as the number of partitions increases.
- (3)
- Scalability and limitations of Symbolic Model Checking: The primary performance bottleneck of our approach arises in the symbolic model checking within a single partition, where the processing time grows exponentially with the number of concurrent components (i.e., tasks) in the partition. To illustrate this limitation, we conducted a scalability experiment using the same configuration as in experiment 2, handling a single partition comprising the first j tasks from the open-source task dataset rand0000.stg in rnc50.tgz of STG [34], with j incrementing by five. The results, presented in Figure 11, demonstrate that the processing time exhibits exponential growth as the number of tasks within the partition increases. Notably, when the number of tasks exceeds 30, ordinary personal computers struggle to manage the computational demands.
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Airlines Electronic Committee (AEEC). ARINC Specification 653P0-2 Avionics Application Software Standard Interface Part 0—Overview of ARINC 653; SAE Industry Technologies Consortia (SAE ITC): Bowie, MD, USA, 2019. [Google Scholar]
- Lukić, B.; Ahlbrecht, A.; Friedrich, S.; Durak, U. State-of-the-Art Technologies for Integrated Modular Avionics and the Way Ahead. In Proceedings of the 2023 IEEE/AIAA 42nd Digital Avionics Systems Conference (DASC), Barcelona, Spain, 1–10 October 2023; pp. 1–10. [Google Scholar] [CrossRef]
- Bieber, P.; Boniol, F.; Boyer, M.; Noulard, E.; Pagetti, C. New Challenges for Future Avionic Architectures. Aerosp. Lab 2012, 4, 1–10. [Google Scholar] [CrossRef]
- Wang, H.; Niu, W. A Review on Key Technologies of the Distributed Integrated Modular Avionics System. Int. J. Wirel. Inf. Netw. 2018, 25, 358–369. [Google Scholar] [CrossRef]
- Rockschies, M.; Thielecke, F. Avionics Platform Design Optimization Considering Multi-/Many-core Processors. In Proceedings of the 2023 IEEE/AIAA 42nd Digital Avionics Systems Conference (DASC), Barcelona, Spain, 1–10 October 2023; pp. 1–10. [Google Scholar] [CrossRef]
- Airlines Electronic Committee (AEEC). ARINC Specification 653P1-5 Avionics Application Software Standard Interface Part 1—Required Services; SAE Industry Technologies Consortia (SAE ITC): Bowie, MD, USA, 2019. [Google Scholar]
- Kim, J.E.; Abdelzaher, T.; Sha, L. Schedulability Bound for Integrated Modular Avionics Partitions. In Proceedings of the 2015 Design, Automation Test in Europe Conference Exhibition (DATE), Grenoble, France, 9–13 March 2015; pp. 37–42. [Google Scholar] [CrossRef]
- Annighöfer, B.; Kleemann, E. Large-Scale Model-Based Avionics Architecture Optimization Methods and Case Study. IEEE Trans. Aerosp. Electron. Syst. 2019, 55, 3424–3441. [Google Scholar] [CrossRef]
- Blikstad, M.; Karlsson, E.; Lööw, T.; Rönnberg, E. An Optimisation Approach for Pre-Runtime Scheduling of Tasks and Communication in an Integrated Modular Avionic System. Optim. Eng. 2018, 19, 977–1004. [Google Scholar] [CrossRef]
- Craciunas, S.S.; Oliver, R.S. Combined Task- and Network-level Scheduling for Distributed Time-triggered Systems. Real-Time Syst. 2016, 52, 161–200. [Google Scholar] [CrossRef]
- Chen, J.; Du, C.; Xie, F.; Yang, Z. Schedulability Analysis of Non-Preemptive Strictly Periodic Tasks in Multi-Core Real-Time Systems. Real-Time Syst. 2016, 52, 239–271. [Google Scholar] [CrossRef]
- Yoon, M.K.; Kim, J.E.; Bradford, R.; Sha, L. Holistic Design Parameter Optimization of Multiple Periodic Resources in Hierarchical Scheduling. In Proceedings of the 2013 Design, Automation Test in Europe Conference Exhibition (DATE), Grenoble, France, 18–22 March 2013; pp. 1313–1318. [Google Scholar] [CrossRef]
- Alur, R.; Dill, D.L. A Theory of Timed Automata. Theor. Comput. Sci. 1994, 126, 183–235. [Google Scholar] [CrossRef]
- UPPAAL Home. Available online: http://www.uppaal.org/ (accessed on 15 June 2024).
- Boudjadar, J.; Kim, J.H.; Larsen, K.; Nyman, U. Compositional Schedulability Analysis of An Avionics System Using UPPAAL. In Proceedings of the 1st International Conference on Advanced Aspects of Software Engineering, ICAASE 2014, Constantine, Algeria, 2–4 November 2014; Volume 1294. [Google Scholar]
- Kim, J.H.; Boudjadar, A.; Nyman, U.; Mikučionis, M.; Larsen, K.G.; Skou, A.; Lee, I.; Thi Xuan Phan, L. Quantitative Schedulability Analysis of Continuous Probability Tasks in a Hierarchical Context. In Proceedings of the 18th International ACM SIGSOFT Symposium on Component-Based Software Engineering, CBSE ’15, Montreal, QC, Canada, 4–8 May 2015; Association for Computing Machinery: New York, NY, USA, 2015; pp. 91–100. [Google Scholar] [CrossRef]
- Boudjadar, A.; David, A.; Kim, J.H.; Larsen, K.G.; Mikučionis, M.; Nyman, U.; Skou, A. Statistical and Exact Schedulability Analysis of Hierarchical Scheduling Systems. Sci. Comput. Program. 2016, 127, 103–130. [Google Scholar] [CrossRef]
- Kim, J.H.; Legay, A.; Traonouez, L.-M.; Boudjadar, A.; Nyman, U.; Larsen, K.G.; Lee, I.; Choi, J.-Y. Optimizing the Resource Requirements of Hierarchical Scheduling Systems. SIGBED Rev. 2016, 13, 41–48. [Google Scholar] [CrossRef]
- Ahn, S.J.; Hwang, D.Y.; Kang, M.; Choi, J.-Y. Hierarchical System Schedulability Analysis Framework Using UPPAAL. IEICE Trans. Inf. Syst. 2016, E99.D, 2172–2176. [Google Scholar] [CrossRef]
- Han, P.; Zhai, Z.; Nielsen, B.; Nyman, U. A Modeling Framework for Schedulability Analysis of Distributed Avionics Systems. In Proceedings of the Electronic Proceedings in Theoretical Computer Science (EPTCS), Thessaloniki, Greece, 20 April 2018; Volume 268, pp. 150–168. [Google Scholar] [CrossRef]
- Singh, A.; D’Souza, M.; Ebrahim, A. Conformance Testing of ARINC 653 Compliance for a Safety Critical RTOS Using UPPAAL Model Checker. In Proceedings of the 36th Annual ACM Symposium on Applied Computing; SAC ’21, Virtual Event, 22–26 March 2021; Association for Computing Machinery: New York, NY, USA, 2021; pp. 1807–1814. [Google Scholar] [CrossRef]
- Han, P.; Zhai, Z.; Nielsen, B.; Nyman, U. Model-based optimization of ARINC-653 partition scheduling. Int. J. Softw. Tools Technol. Transfer. 2021, 23, 721–740. [Google Scholar] [CrossRef]
- Radio Technical Commission for Aeronautics (RTCA). RTCA DO-297: Integrated Modular Avionics (IMA) Development Guidance and Certification Considerations; RTCA: Washington, DC, USA, 2005. [Google Scholar]
- VanderLeest, S.H.; Matthews, D.C. Incremental Assurance of Multicore Integrated Modular Avionics (IMA). In Proceedings of the 2021 IEEE/AIAA 40th Digital Avionics Systems Conference (DASC), San Antonio, TX, USA, 3–7 October 2021; pp. 1–9. [Google Scholar] [CrossRef]
- Shin, I.; Lee, I. Compositional real-time scheduling framework with periodic model. ACM Trans. Embed. Comput. Syst. 2008, 7, 1–39. [Google Scholar] [CrossRef]
- Hughes, W.J. Assurance of Multicore Processors in Airborne Systems; DOT/FAA/TC-16/51; Federal Aviation Administration (FAA). 2017; p. 121. Available online: https://www.faa.gov/sites/faa.gov/files/aircraft/air_cert/design_approvals/air_software/TC-16-51.pdf (accessed on 10 August 2024).
- Beyer, H.-G. An Alternative Explanation for the Manner in Which Genetic Algorithms Operate. Biosystems 1997, 41, 1–15. [Google Scholar] [CrossRef] [PubMed]
- Sakurai, Y.; Takada, K.; Kawabe, T.; Tsuruta, S. A Method to Control Parameters of Evolutionary Algorithms by Using Reinforcement Learning. In Proceedings of the 2010 Sixth International Conference on Signal-Image Technology and Internet Based Systems, Kuala Lumpur, Malaysia, 15–18 December 2010; pp. 74–79. [Google Scholar] [CrossRef]
- Easwaran, A.; Lee, I.; Sokolsky, O.; Vestal, S. A Compositional Framework for Avionics (ARINC-653) Systems (2009). Technical Reports (CIS). Paper 898. Available online: http://repository.upenn.edu/cis_reports/898 (accessed on 10 August 2024).
- Davis, R.; Burns, A. An Investigation into Server Parameter Selection for Hierarchical Fixed Priority Pre-Emptive Systems. In Proceedings of the 16th International Conference on Real-Time and Network Systems (RTNS 2008), Rennes, France, 16–17 October 2008. [Google Scholar]
- Bäck, T.; Fogel, D.B.; Michalewicz, Z. Evolutionary Computation 1—Basic Algorithms and Operators; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar] [CrossRef]
- Mühlenbein, H.; Schlierkamp-Voosen, D. Predictive Models for the Breeder Genetic Algorithm i. Continuous Parameter Optimization. Evol. Comput. 1993, 1, 25–49. [Google Scholar] [CrossRef]
- Carnevali, L.; Pinzuti, A.; Vicario, E. Compositional Verification for Hierarchical Scheduling of Real-Time Systems. IEEE Trans. Softw. Eng. 2013, 39, 638–657. [Google Scholar] [CrossRef]
- Standard Task Graph Set. Available online: https://www.kasahara.cs.waseda.ac.jp/schedule/ (accessed on 10 August 2024).
Configuration | Hardware/Software Information |
---|---|
Nodes | 4 workstations |
Processors | AMD Ryzen Threadripper 7970X 4.0 GHz |
Number of cores | 32 cores/processor |
Memory | 512 GB/node |
Disk size | 16 TB |
Interaction | 40 Gbps QDR InfiniBand |
OS | Ubuntu Server 22.04.4 |
UPPAAL | 64-bit Linux version 4.1.25 |
Python | Python 3.12.3 |
Libraries | OpenMPI 4.1.6, mpi4py 3.1.6 |
Partition | Task set | |||||
---|---|---|---|---|---|---|
Task | Period | WCET | Deadline | Priority | Core | |
1600 | 80 | 1000 | 4 | 0 | ||
2400 | 120 | 2000 | 3 | 0 | ||
3200 | 160 | 3000 | 2 | 0 | ||
4800 | 240 | 4000 | 1 | 0 | ||
1600 | 80 | 1000 | 4 | 1 | ||
2400 | 120 | 2000 | 3 | 1 | ||
3200 | 160 | 3000 | 2 | 1 | ||
4800 | 240 | 4000 | 1 | 1 |
Method | Demand Vector | Processor Occupancy | Optimal |
---|---|---|---|
ES | (1600, 341, 1600, 341) | 45.1% | Yes |
GP | (483, 137, 488, 152) | 67.8% | No |
GA 1 | (630, 170, 1260, 350) | 59.5% | No |
GA 2 | (1200, 280, 800, 160) | 47.5% | No |
MBM653 | (1600, 341, 1600, 341) | 45.1% | Yes |
Partition | Task Set | |||||||
---|---|---|---|---|---|---|---|---|
Task | Period | Initial Offset | BCET | WCET | Deadline | Priority | Core | |
25 | 2 | 0.9 | 1.5 | 25 | 5 | 0 | ||
50 | 3 | 0.2 | 0.4 | 50 | 4 | 0 | ||
50 | 3 | 2.7 | 4.2 | 50 | 3 | 0 | ||
50 | 0 | 0.1 | 0.2 | 50 | 2 | 0 | ||
120 | 0 | 0.7 | 1.1 | 120 | 1 | 0 | ||
50 | 0 | 1.9 | 3.0 | 50 | 5 | 1 | ||
50 | 2 | 0.7 | 1.1 | 50 | 4 | 1 | ||
100 | 0 | 0.1 | 0.2 | 100 | 3 | 1 | ||
100 | 10 | 1.0 | 1.6 | 100 | 2 | 1 | ||
25 | 0 | 0.5 | 0.8 | 25 | 5 | 2 | ||
50 | 0 | 0.7 | 1.1 | 50 | 4 | 2 | ||
50 | 0 | 1.0 | 1.6 | 50 | 3 | 2 | ||
100 | 11 | 0.8 | 1.3 | 100 | 2 | 2 | ||
25 | 3 | 0.7 | 1.2 | 25 | 5 | 3 | ||
50 | 5 | 1.2 | 1.9 | 50 | 4 | 3 | ||
50 | 25 | 0.1 | 0.2 | 50 | 3 | 3 | ||
100 | 11 | 0.7 | 1.1 | 100 | 2 | 3 | ||
200 | 13 | 3.7 | 5.8 | 200 | 1 | 3 | ||
50 | 0 | 0.7 | 1.1 | 50 | 6 | 0 | ||
50 | 2 | 1.2 | 1.9 | 50 | 5 | 0 | ||
200 | 0 | 0.6 | 0.9 | 200 | 4 | 0 | ||
200 | 14 | 1.5 | 2.4 | 200 | 3 | 0 |
Method | Demand Vector | Processor Occupancy |
---|---|---|
Empirical | (25, 4.8, 25, 4.8, 25, 4.8, 25, 4.8, 25, 4.8) | 100% |
MBM653 | (25, 4.9, 25, 4.7, 25, 3.4, 25, 4.5, 50, 4.5) | 83% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Han, P.; Hu, W.; Zhai, Z.; Huang, M. A Model-Based Optimization Method of ARINC 653 Multicore Partition Scheduling. Aerospace 2024, 11, 915. https://doi.org/10.3390/aerospace11110915
Han P, Hu W, Zhai Z, Huang M. A Model-Based Optimization Method of ARINC 653 Multicore Partition Scheduling. Aerospace. 2024; 11(11):915. https://doi.org/10.3390/aerospace11110915
Chicago/Turabian StyleHan, Pujie, Wentao Hu, Zhengjun Zhai, and Min Huang. 2024. "A Model-Based Optimization Method of ARINC 653 Multicore Partition Scheduling" Aerospace 11, no. 11: 915. https://doi.org/10.3390/aerospace11110915
APA StyleHan, P., Hu, W., Zhai, Z., & Huang, M. (2024). A Model-Based Optimization Method of ARINC 653 Multicore Partition Scheduling. Aerospace, 11(11), 915. https://doi.org/10.3390/aerospace11110915