![A Component Language for Pointer-Free Concurrent Programming and Its Application to Simulation](https://data.docslib.org/img/3a60ab92a6e30910dab9bd827208bcff-1.webp)
Diss ETH No. 17480 A Component Language for Pointer-Free Concurrent Programming and its Application to Simulation A dissertation submitted to ETH Zurich for the degree of Doctor of Sciences presented by Luc Blaser MSc. ETH in Computer Science, ETH Zurich born 3 October 1979 citizen of Luxembourg accepted on the recommendation of Prof. Dr. J. Gutknecht, examiner Prof. Dr. K. Nagel, co-examiner 2007 Abstract Today's programming languages are still noticeably under­ developed for the construction of well-structured concur­ rent software systems. They typically impose many unnec­ essary and unacceptable restrictions and inconsistencies due to a multiplicity of different counterproductive con­ cepts. In particular, pointers generally counteract structured and hierarchical program relations at runtime, while the support of concurrency remains largely neglected as a second-class feature in current programming languages. To improve this adverse situation, we have developed a new programming language, which directly integrates a general component notion. Components are only managed by three fundamental relations: (1) hierarchical com­ position without use of explicit pointers, (2) symmetric connections with a dual concept of offered and required interfaces and, (3) communication-based interactions. As a result of these concepts, the new language enables general hierarchical encapsulation, client-individual statefull com­ munications, inherent and race-free concurrency, sym­ metric polymorphism separated from code reuse, as well as hierarchical lifetime dependencies of the components. The programming language has been implemented with a runtime system that comprises a small kernel. It facilitates high-performance concurrency, clearly surpass­ ing existing systems in the scalability and efficiency of parallel processes. For this purpose, the system features innovative concepts such as light-weighted processes with fine-granular stacks and low-cost software-based preemp­ tion, safe memory management without need of automatic garbage collection. In order to offer a proof of concepts and demonstrate the practical suitability, we have applied the new program­ ming language to an archetypical kind of application: simulation. At the example of a traffic simulation, we can 2 demonstrate that the new language enables a more natural mapping to the program, with the potential to be distrib­ uted. At the same time, our language offers a substantially higher perfonnance compared to other sequential or con­ current simulation systems. More concretely, vehicles are modelled in this case study as self-active instances that all drive autonomously and concurrently in a virtual time. In particular, the component structures also support the flexi­ ble and accurate representation of dynamic hierarchical compositions with vehicle transports. With regard to the realistic traffic simulation of Greater Zurich, our simulation runs faster by a factor of three than a traditional simulation system. 3 Kurzfassung Was die Konstmktion strukturierter nebenHiufiger Software betrifft, sind heutige Programmiersprachen noch erheblich unterentwickeit. Aufgrund der Vieizahl unterschiedlicher und oft unntitzer Konzepte unterliegen die Sprachen meist vielen unnotigen Einschrankungen und Inkonsistenzen. Die Verwendung von Zeigern (Pointers) erschwert im All­ gemeinen die Beschreibung klar strukturierter und hierar­ chischer Programmbeziehungen zur Laufzeit. Ferner bieten heutige Programmiersprachen nur unzureichende Unter­ sttitzung fur Parallelitat, da NebenHiufigkeit Iediglich mit schwerfalligen Zusatzkonzepten ermoglicht wird. Um diese Schwachpunkte zu beseitigen, haben wir eine neue Programmiersprache entwickeit. Diese Programmier­ sprache basiert auf dem aligemeinen Begriff der Kompo­ nente. Die Verwaitung von Komponenten ist durch drei grundiegende Beziehungen gekennzeichnet. (1) Hierarchi­ sche Komposition ohne explizite Verwendung von Zeigern, (2) symmetrische Verkntipfung mit einem dualen Konzept von angebotenen und eiforderten Schnittstellen, (3) Inter­ aktion durch Kommunikation. Durch die Verwendung die­ ser Konzepte ergeben sich verschiedene vorteilhafte Mog­ lichkeiten. Dazu gehoren die allgemeine hierarchische Ein­ kapselung, separate zustandsbehaftete Kommunikation zwischen Komponenten, inharente NebenHiufigkeit unter Ausschluss so genannter Races, symmetrischer PoIy­ morphismus getrennt von der Code-Wiederverwendung, sowie hierarchische Existenzabhangigkeiten unter den Komponenten. Zur Programmiersprache wurde ein Laufzeitsystem implementiert. Dieses System, welches tiber einen eigenen Kern verfugt, macht besonders Ieistungsstarke Ausfuhrung von nebenlaufigen Programmen moglich. Im Vergleich zu 4 anderen Systemen weist das neue Laufzeitsystem eine deutlich hahere Skalierbarkeit und eine wesentlich schnel­ lere Ausfuhrungsgeschwindigkeit fur parallele Prozesse auf. Zu diesem Zweck wurden beim Bau des Systems wei­ tere innovative Konzepte verfolgt. Dazu zahlen unter ande­ rem der Einsatz von Leichtgewichtsprozesse mit beliebig kleinen Stacks und kosteneffiziente, softwarebasierte Pre­ emption sowie eine sichere dynamische Speicherver­ waltung ohne Bedarf eines Garbage-Collectors. Zur Demonstration der praktischen Einsetzbarkeit der Konzepte haben wir die neue Programmiersprache fur eine archetypische Art der Anwendung eingesetzt, nfunlich zur Simulation: Anhand des Beispiels einer Verkehrssimulation hat sich gezeigt, dass die neue Programmiersprache eine natiirlichere Abbildung des Realittitsmodells zum Pro­ gramm ermaglicht. Damit geht ein erhebliches Potenzial zur Verteilbarkeit einher. Zusatzlich erzielen wir eine sub­ stanziell hahere Ausfiihrungsgeschwindigkeit als andere sequenzielle und nebenHiufige Simulaticmssysteme. In die­ ser Fallstudie werden die Fahrzeuge als selbstaktive Kom­ ponenten dargestellt, so dass sie aIle autonom und parallel in einer virtuellen Zeit fahren. Insbesondere erlauben es die Komponentenstrukturen, dynamische hierarchische Kom­ positionen fiir die Fahrzeugverladung realitatsnah und fle­ xibel zu modellieren. Eine realistische Verkehrssimulation vom GroBraum Zurich wird mit unserer Simulation urn Faktor drei schneller ausgefiihrt alsmit einem traditionellen Simulationssystem. 5 Acknowledgments I am very grateful to several people who supported me during this work and helped me to complete this disserta­ tion. First of all, I would like to sincerely thank Prof. Dr. Jurg Gutknecht for giving me the opportunity to follow and realise my ideas within this doctoral thesis. I am indebted to his continuous support, helpful advice, constructive feedback and kind encouragement throughout my work. I also greatly appreciate the comfortable work environment that was offered to me as well as the freedom given regarding my working practice. I am also very grateful to Prof. Dr. Kai Nagel who kindly accepted to be the co-supervisor of this dissertation and gave me valuable feedback, support and encour­ agement during my thesis and especially during the case study on traffic simulation. It was a rewarding experience to apply my programming language in this research field. My sincere thanks also go to my colleagues at the ETH Zurich, namely Dr. Felix Friedrich, Dr. Svend Knudsen, Daniel Keller, Roman Mitin, Sven Stauber, Thomas Kagi, Ulrike Glavitsch-Eggler, Dr. Thomas Frey, Dr. Emil Zeller, Dr. Stefan Muller, Dr. Simon Schubiger-Benz, Andre Fischer, Raphael Guntensperger, Mazda Mortasavi, Michael Szediwy, Florian Negele, Alexey Morozov, Dr. Dennis Majoe, Karel Skoupy and many others. It was an absolute pleasure to work together with them. We had a lot of interesting discussions and chats about research and other topics, not only during the numerous coffee breaks. I greatly appreciate the feedback on my work that I received from my colleagues. During my visit to the TU Berlin and the subsequent e­ mails which followed, I received valuable advice and feed­ back from Martin Rieser, David Strippgen and Gunnar 6 Flotterod. I am very appreciative of their help, whether it was in explaining the details of traffic simulation techniques, providing the simulation data, and discussing interesting ideas for my work. I would like to also express my gratitude to Ruth Hidalgo, who helped me with various administrative questions and complex issues that were often difficult to resolve. I am also grateful for the administrative support from Hanni Sommer and Franziska Mader. In addition, the Swiss Federal Department of the Envi­ ronment, Transport, Energy and Communications (UVEK) kindly granted permission to use the data for the traffic simulation. Furthermore, I am particularly thankful to Dr. Felix Friedrich, Dr. Svend Knudsen and Nadja Beeli who proof­ read and scrutinised my dissertation before I submitted it to my supervisors. Roman Mitin also read the dissertation and provided valuable comments and suggestions for improve­ ment. Lastly (but of no less importance), I would like to thank Nadja Beeli, my family and all my colleagues for their constant encouragement and support. Luc Blaser Zurich, September 2007 7 Contents Chapter 1 Introduction 13 1.1 Motivation 13 1.2 Contributions 15 1.3 Outline 16 Chapter 2 State of the Art 17 2.1 Object-Orientation 17 2.1.1 References 18 2.1.2 Methods 19 2.1.3 Inheritance 20 2.1.4 Concurrency 22 2.1.5 Existing Solution Approaches 23 2.1.5.1 Object Encapsulation Models 23 2.1.5.2 Object Lifetime Control 27 2.1.5.3 Concurrency Improvement 29 2.1.5.4 Inheritance Altematives 32 2.2 Other Existing Programming Paradigms
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages250 Page
-
File Size-