Refactoring Train Control Management Software For Real Time Operations
Özet
Model-driven development is a widely used approach in various domains, and its popularity has been increasing in certain industries. Refactoring software models is essential to maintain and enhance the quality of software models. A real-time system is designed to respond to inputs or events within a strict and predefined time limit, ensuring timely and predictable operation. It is used in critical applications where delayed responses can lead to system failures or serious consequences, such as in embedded systems, robotics, or air traffic control. This thesis introduces refactoring techniques to provide real-time ability to a train control management software. The refactoring techniques consist of two main parts. The first part focuses on refactoring an existing software model. In order for the software to work in real-time, the software model in which the working mechanism of the threads is defined must be suitable for real-time operations. The second part focuses on refactoring to optimize the software internally to work on a real-time operating system. A real-time operating system must also be arranged by refactoring the configurations. By refactoring the software model, we achieved a resource-sharing problem with the help of a spin-lock mechanism. Threads accessing the same resource might create problems if they read and write simultaneously. Locking is unnecessary if the shared resource is only read by all threads. Most of the time, the reading operation does not exist alone in the software projects, and the writing operation comes along with the reading operation. Problems arise when none of the synchronization mechanisms are used. In this work, we have worked on UML diagrams to inject a spin-lock synchronization mechanism. For this purpose, we have identified refactoring opportunities, also known as model smells, and applied refactoring techniques. We discussed the results of applied refactoring techniques to demonstrate the effects of the smells. We worked on Linux which is a widely used operating system for embedded and industrial systems. By refactoring Linux configurations, we tried to achieve deterministic behavior for the threads of train control management software. The results show that thread scheduling is improved to ensure that critical threads are completed within their deadlines. Moreover, we discussed fine-tuning the configurations of real-time Linux for increased performance of train control and management software.