Advancing operating systems via aspect-oriented programming [Elektronische Ressource] / vorgelegt von Michael Engel
206 pages
English

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris

Advancing operating systems via aspect-oriented programming [Elektronische Ressource] / vorgelegt von Michael Engel

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
206 pages
English
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

.AdvancingOperatingSystemsviaAspect OrientedProgrammingMichaelEngel2Philipps Universit at¨ MarburgFachbereich Mathematik und InformatikAdvancing Operating Systemsvia Aspect Oriented ProgrammingDissertationzur Erlangung des Doktorgradesder Naturwissenschaften(Dr. rer. nat.)vorgelegt vonMichael Engelaus Zell/MoselMarburg/Lahn 2005vom Fachbereich Mathematik und Informatik¨der Philipps Universit at Marburgals Dissertation am 4. Juli 2005 angenommen.Erstgutachter: Prof. Dr. Bernd FreislebenZweitgutachter: Prof. Dr. Wolfgang MerzenichTag der mundlichen¨ Prufung¨ am 26. Juli 2005AbstractOperating system kernels are among the most complex pieces of software in existence to day. Maintaining the kernel code and developing new functionality is increasingly compli cated, since the amount of required features has risen significantly, leading to side effectsthatcanbeintroducedinadvertedlybychangingapieceofcodethatbelongstoacompletelydifferent context.Software developers try to modularize their code base into separate functional units.Some of the functionality or “concerns” required in a kernel, however, does not fit intothe given modularization structure; this code may then be spread over the code base andits implementation tangled with code implementing different concerns.

Sujets

Informations

Publié par
Publié le 01 janvier 2006
Nombre de lectures 11
Langue English
Poids de l'ouvrage 3 Mo

Extrait

.
AdvancingOperatingSystems
viaAspect OrientedProgramming
MichaelEngel2Philipps Universit at¨ Marburg
Fachbereich Mathematik und Informatik
Advancing Operating Systems
via Aspect Oriented Programming
Dissertation
zur Erlangung des Doktorgrades
der Naturwissenschaften
(Dr. rer. nat.)
vorgelegt von
Michael Engel
aus Zell/Mosel
Marburg/Lahn 2005vom Fachbereich Mathematik und Informatik
¨der Philipps Universit at Marburg
als Dissertation am 4. Juli 2005 angenommen.
Erstgutachter: Prof. Dr. Bernd Freisleben
Zweitgutachter: Prof. Dr. Wolfgang Merzenich
Tag der mundlichen¨ Prufung¨ am 26. Juli 2005Abstract
Operating system kernels are among the most complex pieces of software in existence to
day. Maintaining the kernel code and developing new functionality is increasingly compli
cated, since the amount of required features has risen significantly, leading to side effects
thatcanbeintroducedinadvertedlybychangingapieceofcodethatbelongstoacompletely
different context.
Software developers try to modularize their code base into separate functional units.
Some of the functionality or “concerns” required in a kernel, however, does not fit into
the given modularization structure; this code may then be spread over the code base and
its implementation tangled with code implementing different concerns. These so called
“crosscutting concerns” are especially difficult to handle since a change in a crosscutting
concern implies that all relevant locations spread throughout the code base have to be
modified.
Aspect Oriented Software Development (AOSD) is an approach to handle crosscutting
concerns by factoring them out into separate modules. The “advice” code contained in
these modules is woven into the original code base according to a pointcut description, a
set of interaction points (joinpoints) with the code base.
Tobeusedinoperatingsystems,AOSDrequirestoolsupportfortheprevalentprocedu
ral programming style as well as support for weaving aspects. Many interactions in kernel
code are dynamic, so in order to implement non static behavior and improve performance,
a dynamic weaver that deploys and undeploys aspects at system runtime is required.
This thesis presents an extension of the “C” programming language to support AOSD.
Basedonthis,twodynamicweavingtoolkits–TOSKANAandTOSKANA VM–arepresented
to permit dynamic aspect in the monolithic NetBSD kernel as well as in a virtual
machine and microkernel based Linux kernel running on top of L4. Based on TOSKANA,
applications for this dynamic aspect technology are discussed and evaluated.
The thesis closes with a view on an aspect oriented kernel structure that maintains
coherency and handles crosscutting concerns using dynamic aspects while enhancing de
velopment methods through the use of domain specific programming languages.Zusammenfassung
Betriebssystem Kernel z ahlen¨ zu den komplexesten Software Systemen, die heutzutage
verwendet werden. Die Wartung des Kernel Codes und die Entwicklung neuartiger Funk
tionalitat¨ wird zunehmend komplizierter, da die Menge an benotigten¨ Eigenschaften eines
Kernels stetig steigt. Dies kann zu unabsichtlich in den Code eingebrachten Nebeneffekten
fuhr¨ en, wenn ein Teil des Systems geandert¨ wird, der zu einem anderen Kontext gehort.¨
Software EntwicklermodularisierenihreCode BasisineinzelnefunktionaleEinheiten.
Einige Funktionalitat¨ – auch “concern” genannt – die im Kernel benotigt¨ wird, gliedert sich
¨ ¨nichtsauberindievorgegebeneModularisierungsstrukturein;diezugehorigenCodestucke
sinddannoftuber¨ dasgesamteSystemverteiltundihreImplementierungistmitderImple
mentierung anderer Funktionalitat¨ vermischt. Diese sogenannten “crosscutting concerns”
¨(querschneidende Belange) sind besonders schwierig in der Handhabung, da Anderungen
aneinemsolchencrosscuttingconcernerfordern,dassalledieuber¨ diegesamteCodebasis
verteilten relevanten Stellen gefunden und modifiziert werden.
Aspekt orientierteSoftware Entwicklung(AspectOrientedSoftwareDevelopment,AOSD)
isteinAnsatzzureinfacherenHandhabungvoncrosscuttingconcerns,derdenzugehorigen¨
Code in separate Module herausfaktorisiert. Der in diesen Modulen enthaltene sogenannte
”Advice Code” wird dann mit der urspr unglichen¨ Code Basis nach Vorgabe einer sogenan
nten Pointcut Beschreibung verwoben, die aus einer Menge an Interaktionspunkten mit
dem ursprunglichen¨ Code, den sog. “Join Points” besteht.
Um AOSD im Rahmen von Betriebssystemen zu verwenden, mussen¨ aspektorientierte
Werkzeuge zur Unterstutzung¨ fur¨ den dort vorherrschenden prozeduralen Programmierstil
sowie eine unterstutzende¨ Infrastruktur fur¨ das Weben von Aspekten zur Verfugung¨ ste
hen. Viele Interaktionen mit dem Kernel sind dynamisch, daher ist ein dynamischer Weber
erforderlich, der Aspekte zur Laufzeit in das System einfugen¨ und wieder aus diesem ent
fernen kann.
Diese Arbeit stellt eine Erweiterung der Programmiersprache “C” vor, die aspektori
entierte Programmierung unterstutzt.¨ Darauf aufbauend werden zwei Werkzeugsatze¨ fur¨
dynamisches Weben – TOSKANA und TOSKANA VM – vorgestellt, die dynamische Aspekte
immonolithischenNetBSD Kernelbzw. ineinemLinux Kernelrealisieren,dieaufeinerIn
frastruktur aufbauen, die aus einem L4 Microkernel und einer unterst utzenden¨ virtuellen
Maschine besteht. Auf der Basis von TOSKANA werden Anwendungen fur¨ diese dynami
sche Aspekttechnologie vorgestellt und bewertet.
EinAusblickaufeineaspekt orientierteKernelstruktur, diemitHilfevondynamischen
Aspekten Kohar¨ enz sicherstellt und crosscutting concerns handhabt und zugleich die Sys
tementwicklungdurchdenEinsatzdomanenspezifischer¨ Programmiersprachenerleichtert,
schließt die Arbeit ab.Contents
1 Introduction 1
1.1 TheStateofOperatingSystemsResearch . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 CurrentTrends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Configurability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.2 UbiquituosNetworking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.3 Virtualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.4 AutonomicComputing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 StructureoftheThesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 NetBSDSystemStructure 11
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 UnixKernelStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 SystemEvolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.1 LayeredNetworkingStructure . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.2 VirtualFileSystemStructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.5 Contexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.1 StartupandControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.2 ProcessContexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5.3 Asynchronous(Hardware)Contexts. . . . . . . . . . . . . . . . . . . . . . . 27
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3 In KernelCrosscuttingConcerns 29
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 ModularityandConcernsinKernelCode . . . . . . . . . . . . . . . . . . . . . . . 29
3.3 ADefinitionofCrosscuttingConcerns. . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.1 AnExample: Telecommunications . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.2 ScatteringandTangling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3.3 CrosscuttinginRelatedResearch . . . . . . . . . . . . . . . . . . . . . . . . 34
i
Contents3.3.4 IdentifyingCrosscutting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4 TheTroublewithMacros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.5 OOinKernelMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.5.1 ObjectOrientationUsingProceduralLanguages . . . . . . . . . . . . . . . 36
3.5.2 Example: ConsoleHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.6 CrosscuttingConcernExample: DiskQuota . . . . . . . . . . . . . . . . . . . . . . 38
3.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4 Aspect OrientedProgramming 43
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2 AOP—considereduseful!. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.3 UsingAOPInsidetheKernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.3.1 JoinPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.3.2 Pointcuts . . . . . . .

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents