Tackling OS Complexity with Declarative Techniques

Tackling OS Complexity with Declarative Techniques

Research Collection Doctoral Thesis Tackling OS Complexity with Declarative Techniques Author(s): Schüpbach, Adrian L. Publication Date: 2012 Permanent Link: https://doi.org/10.3929/ethz-a-009784524 Rights / License: In Copyright - Non-Commercial Use Permitted This page was generated automatically upon download from the ETH Zurich Research Collection. For more information please consult the Terms of use. ETH Library DISS. ETH NO. 20930 TACKLING OS COMPLEXITY WITH DECLARATIVE TECHNIQUES A dissertation submitted to ETH ZURICH for the degree of Doctor of Sciences presented by ADRIAN LAURENT SCHÜPBACH Master of Science ETH in Computer Science, ETH Zurich 19. April 1981 citizen of Landiswil, BE accepted on the recommendation of Prof. Dr. Timothy Roscoe Prof. Dr. Gustavo Alonso Prof. Dr. Hermann Härtig 2012 ii Kurzfassung Diese Dissertation zeigt, dass die erhohte¨ Betriebssystemkomplexitat,¨ die durch die Notwendigkeit entsteht, sich an eine grosse Anzahl unterschied- licher Rechnersysteme anzupassen, mittels deklarativer Techniken signifi- kant reduziert werden kann. Moderne Hardware ist zunehmend unterschiedlich und komplex. Es ist wahrscheinlich, dass sich diese Entwicklung in Zukunft fortsetzt. Diese Entwicklung erschwert den Betriebssystembau. Betriebssysteme mussen¨ sich der Rechnerarchitektur optimal anpassen. Sie mussen¨ den gesamten Funktionsumfang des Rechners ausschopfen,¨ um die volle Leistung des kompletten Systems zu gewahrleisten.¨ Vom Betriebssystem ungenutzte,¨ suboptimal genutzte¨ oder gar falsch genutzte¨ Rechnerfunktionalitat¨ fuhrt¨ zu geringerer Leistung des Gesamtsystems. Traditionelle Betriebssysteme passen sich durch vorgefertigte Regeln, die im ganzen Betriebssystem ver- teilt und mit der eigentlichen Betriebssystemfunktionalitat¨ vermischt sind, der Rechnerarchitektur an. In dieser Arbeit argumentiere ich, dass es aus zwei Grunden¨ nicht mehr moglich¨ ist, vorgefertigte Regeln fur¨ eine Anzahl bekannter Rech- nerarchitekturen mit der Betriebssystemfunktionalitat¨ zu vermischen. Er- stens garantieren vorgefertigte Regeln nicht, dass alle Rechnerfunktionen vollstandig¨ ausgeschopft¨ werden. Zweitens bedeutet das, dass die Regeln fur¨ jede neue Rechnerarchitektur angepasst werden mussen,¨ wobei die Re- geln fur¨ bisherige Rechnerarchitekturen beibehalten werden mussen.¨ Dies fuhrt¨ zu erheblicher Betriebssystemkomplexitat¨ und schliesslich zu einem enormen Anpassungsaufwand. Um dies zu vermeiden, muss das Betriebs- iii iv KURZFASSUNG system wahrend¨ der Laufzeit Wissen uber¨ die Rechnerarchitektur aufbau- en und daraus, durch logische Schlussfolgerungen, die bestmoglichen¨ An- passungsregeln ableiten. Dies fuhrt¨ zu einfacheren, verstandlicheren,¨ pfle- geleichteren und leichter anpassbaren Betriebssystemfunktionen und stellt sicher, dass die Rechnerfunktionalitat¨ vollstandig¨ ausgeschopft¨ wird. Der Wissensaufbau und das Ableiten von Anpassungsregeln durch lo- gische Schlussfolgerungen sind mit hoher Programmierkomplexitat¨ ver- bunden. Dies gilt insbesondere, wenn dafur¨ maschinennahe Programmier- sprachen, wie zum Beispiel C, verwendet werden. Deklarative Techniken erlauben hingegen, angestrebte Regeln durch eine einfache und verstand-¨ liche Beschreibung der gewunschten¨ Art der Anpassung, basierend auf Wissen uber¨ die Rechnerarchitektur, abzuleiten. Durch die naturliche¨ Be- schreibung in hoheren¨ Programmiersprachen wird die Programmierkom- plexitat¨ stark verringert. Um den Vorteil deklarativer Techniken im Zusammenhang mit Kom- plexitat¨ und Anpassungsfahigkeit¨ in Betriebssystemen zu beweisen, stelle ich in dieser Dissertation verschiedene Fallstudien vor, die, basierend auf deklarativen Techniken, Regeln fur¨ die Anpassung an die Rechnerarchi- tektur, mittels logischer Schlussfolgerungen, ableiten. Die Fallstudien set- zen kein Wissen uber¨ die Rechnerarchitektur voraus, sondern eignen sich dies wahrend¨ der Laufzeit an. Das Wissen wird in einem zentralen Wissensdienst des Betriebssy- stems aufgebaut. Regeln werden in diesem Wissensdienst durch logische Schlussfolgerung abgeleitet. Dadurch, dass die Fallstudien, und somit die verschiedenen Betriebssystemkomponenten, diesen Wissensdienst benutzen¨ konnen,¨ wird ihre Komplexitat¨ nochmals deutlich verringert. Es ist somit nicht notig,¨ dass sich jede einzelne Betriebssystemkomponente mit der Wissensgewinnung und der Ableitung von Regeln beschaftigt.¨ Mit die- ser Implementation beweise ich die praktische Anwendbarkeit deklarati- ver Techniken in Betriebssystemen. Abstract This thesis argues that tackling the increased operating systems complex- ity with declarative techniques significantly reduces code complexity in- volved in adapting to a wide range of modern hardware. Modern hardware is increasingly diverse and complex. It is likely that this trend continues further. This trend complicates the operating system’s construction. Operating systems have to adapt to the hardware architec- ture and exploit all features to guarantee the best possible overall system performance. Not exploiting all hardware features, or using them in a sub- optimal or even wrong way, results in lower overall system performance. Traditionally, operating systems adapt to the underlying architecture by predefined policies, which are intermingled with the core operating sys- tem’s functionality. In this thesis I argue that for two reasons it is no longer possible to encode predefined policies for a set of known hardware architectures into the operating system. First, predefined policies do not automatically guar- antee that hardware features are fully exploited on all hardware platforms. Second, for this reason, predefined policies would need to be ported to many different hardware platforms, while, at the same time, it would be necessary to keep the policies suitable for older platforms. This leads to a significant complexity of operating systems and finally to a high engineer- ing effort, when porting the operating system to new hardware platforms. To avoid this problem, the operating systems must gain hardware knowl- edge at runtime and derive policies suitable for the current architecture through online reasoning about the hardware. This leads to operating sys- v vi ABSTRACT tems code that is simpler, better understandable, more maintainable and easier to port, while ensuring that the operating system exploits the hard- ware features as best as possible. Reasoning about hardware and deriving policies is a complex task. This is especially the case, if low-level languages like C are used. Instead, declarative techniques allow deriving policies through a simple description of how to adapt to the hardware based on hardware knowledge gathered at runtime. The natural description in a high-level declarative language reduces code complexity significantly. To prove the usefulness of declarative techniques in the context of adaptability of operating systems and handling of complexity, I present several case studies in this thesis. The case studies are based on declara- tive techniques. They reason about hardware and derive policies based on hardware knowledge. The case studies do not assume any a priori knowl- edge about the current hardware platform. Instead, they gain knowledge at runtime by online reasoning about the hardware. A central knowledge service stores hardware knowledge and allows the operating system and applications to derive policies according to declar- ative rules. Because the case studies, and therefore the operating system components, can use the central service, their complexity is again reduced significantly. It is not necessary, that every single component deals with knowledge gathering and deriving policies by itself. It pushes this part to the knowledge service. With this implementation I prove the practical feasibility of applying declarative techniques in real operating systems. Acknowledgments First of all, I would like to thank my advisor, Prof. Dr. Timothy Roscoe, for all his help, for interesting technical discussions and for his invaluable advises and feedback on this thesis. I would also like to thank the entire Barrelfish team for the interesting discussions and nice time. Furthermore I would like to thank Simonetta Zysset for proofreading my thesis and for giving me valuable feedback on the language. Fortunately, I had the chance of discussing problems with several mem- bers of the Systems Group, either in the office, or during lunch. The dis- cussions helped me to look at a problem from a different angle. Special thanks go to Michael Duller, Jan S. Rellermeyer, Rene´ Muller,¨ Jens Teub- ner, Louis Woods, Qin Yin, Philip Frey and Ionut Subasu. During my time at ETH I also had to do many months of “Zivildienst”, causing me a complicated time management. I would like to thank Spital Davos, especially the IT department and the Spitalleitung for their flexibil- ity and also for allowing me to go to conferences during this time. Special thanks go to Florian Steiger, Peter Driedijk, Luzius Valar,¨ Markus Hehli and Monika May. Furthermore, I would like to thank Andi Roveretto and Nadine Krattli¨ for the joyful and funny time at Spital Davos. Most importantly, I would like to thank my mother Anna, my father Laurent, my sister Letizia and my girlfriend Nadine Duivenstijn for their continuous support and motivation and for always believing in me. Finally, I would like to thank Dr. Arnold Spescha for always listening to me and for “pushing” me through the Gymnasium, which was the basic step towards this thesis. vii viii ACKNOWLEDGMENTS Contents 1 Introduction 1 1.1

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    263 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us