摘要
为解决主控软件资源冲突问题,提高软件可靠性,本文以某主控软件多线程访问同一资源导致软件异常的具体问题为例,提出单件模式解决问题的思路并给出具体解决方案,讨论了传统设计方法与单件模式方式的区别,总结单件模式的优势。进一步分析主控软件重用框架对资源唯一性的要求,给出3个非功能要求的单件模式设计方法。事实表明,单件模式应用在主控软件设计上,可以提高设计效率,还可以提高软件可靠性和维护性。
Aiming at solving the problem of main control software resource conflict and improving the soft- ware reliability, the specific issues of same resources accessed by the multiple threads that lead to software malfunction are taken as examples. The singleton pattern is proposed to solve the problem and the specific solutions are given. Firstly, the difference of traditional design method and the singleton pattern is discussed in this paper, then the advantages of singleton pattern are summarized. Furthermore, the requirement of resource uniqueness is analyzed in the reuse of framework of the main control software and the singleton pattern method of three non-functional requirements is given. The result shows that the singleton pattern can improve the design efficiency and improve the reliability and maintainability of the software.
出处
《航天控制》
CSCD
北大核心
2018年第1期75-79,91,共6页
Aerospace Control
关键词
单件模式
主控软件
资源冲突
Singleton pattern
Main control software
Resource access conflict