Return to search

Multitrådad Schemaläggning avxtUML Modeller : Utfört på Saab Dynamics / Multithreaded scheduling of xtUML models

Executable and Translatable UML (xtUML) is a modeling methodology where a system is constructed using a set of UML models and an action language, which can be translated to a target implementation and compiled into an executable program. It allows for good readability and understanding of the workings of the system and relations between its different parts, easy testing and reusability. With a subset of UML diagrams and finite state machines, the actors in the system and the execution progression can be defined. These models are then made into an executable program using a model compiler. Saab Dynamics has developed their own model to C++ compiler, also made using xtUML with the open source tool Bridgepoint. In the current implementation of the compiler, events which trigger a class instance to transition from one state in a state machine to another, are picked from a queue and processed one by one. In theory, a speedup of the execution time for programs could be achieved if multiple events were run simultaneously. To enable parallel execution, additional functionality needs to be added to the compiler to map dependencies between classes and schedule events on threads.To achieve this a parser was implemented, which iterates every state machine and finds statements which access other classes and could result in a potential data race. These shared data accesses are mapped as instances of a Dependency class if at least one writes to it. These are then later used by the compiler to determine for each class to which classes it has a dependency. During execution when events are picked from queue, a check is made for the target class of the event to the currently executing classes on other active threads, to determine if the event is allowed to be processed immediately or if it should be placed in queue again. Threads are created at the start of the program in a thread pool, and are awakened once an independent event is found and added to the thread's own queue. Results from test models compiled using the new version of the model compiler show that the parser finds all data accesses to other classes and accurately maps the dependencies between them. The end results of the programs are equal to that of the serial executions, and the principles of xtUML are maintained. While there are still improvements to be made to increase the parallelization of events, there was a significant speedup in execution time to be seen for models containing time consuming independent state machines.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:uu-482563
Date January 2022
CreatorsGripsborn, Carolina
PublisherUppsala universitet, Institutionen för informationsteknologi
Source SetsDiVA Archive at Upsalla University
LanguageSwedish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess
RelationUPTEC IT, 1401-5749 ; 22023

Page generated in 0.271 seconds