Advertisement

TOSKANA: A Toolkit for Operating System Kernel Aspects

  • Michael Engel
  • Bernd Freisleben
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4242)

Abstract

The development process for operating system kernels in Unix-like systems is becoming increasingly complex. The simple, easily understandable kernels of the 1970s have evolved into giant software systems consisting of hundreds of modules implemented in millions of lines of code, resulting in greatly increased resource and time overhead for bug fixes as well as functional improvements. Many code modifications and additions in kernel code are crosscutting, since they exhibit cross-module or cross-layer functionality, thus an aspect-oriented programming (AOP) approach is well suited for solving these problems. Operating system code implicitly involves dynamic behavior due to various threads in kernel mode that run in different process or hardware contexts. Methods to solve the crosscutting problems have to be able to adapt dynamically to this changing environment; as a result, dynamic AOP inside the kernel is required to implement required functionality.

This paper analyzes the feasibility of using dynamic AOP in kernel code. Using the TOSKANA system, it is shown that implementing dynamic AOP features is not only possible in operating system kernels, but also realizable with a justifiable overhead. First, the cross-module and cross-layer properties inherent in kernel code are presented, with special consideration of crosscutting concerns in procedural C kernel code. Then, TOSKANA—our toolkit for deploying dynamic aspects into an operating system kernel—is introduced. TOSKANA provides before, after and around advice for in-kernel functions and supports the specification of pointcuts as well as the implementation of aspects themselves as dynamically exchangeable kernel modules. The use of TOSKANA is demonstrated by several examples of cross-module as well as cross-layer problems and their solutions using dynamic AOP functionality inside the kernel. Performance results are presented to characterize the aspect deployment overhead incurred by using TOSKANA.

Keywords

Virtual Machine Congestion Control System Call Kernel Module Congestion Window 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Engel, M., Freisleben, B.: Supporting Autonomic Computing Functionality via Dynamic Operating System Kernel Aspects. In: Proceedings of the Fourth Int. Conference on Aspect Oriented Software Development, pp. 51–62. ACM Press, New York (2005)CrossRefGoogle Scholar
  2. 2.
    Leffler, S.J., McKusick, M.K., Karels, M.J., Quaterman, J.S.: The Design and Implementation of the 4.4 BSD UNIX Operating System. Addison-Wesley, Reading (1994)Google Scholar
  3. 3.
    Engel, M.: Advancing Operating Systems via Aspect-Oriented Programming. Dissertation, Dept. of Mathem. and Computer Science, University of Marburg (2005)Google Scholar
  4. 4.
    ISO: The Open Systems Interconnection (OSI) Reference Model Standard (1979)Google Scholar
  5. 5.
    McCanne, S., Jacobson, V.: The BSD Packet Filter: A New Architecture for User-level Packet Capture. In: Proceedings of USENIX 1993, Usenix, pp. 259–269 (1993)Google Scholar
  6. 6.
    Braden, R., Faber, T., Handley, M.: From Protocol Stack to Protocol Heap: Role-Based Architecture. SIGCOMM Comput. Commun. Rev. 33, 17–22 (2003)CrossRefGoogle Scholar
  7. 7.
    Liedtke, J.: μ-Kernels Must And Can Be Small. In: Proceedings of the 5th IEEE International Workshop on Object-Orientation in Operating Systems (IWOOOS), Seattle, WA, pp. 152–155. IEEE Press, Los Alamitos (1996)CrossRefGoogle Scholar
  8. 8.
    Lohmann, D., Scheler, F., Tartler, R., Spinczyk, O., Schröder-Preikschat, W.: A Quantitative Analysis of Aspects in the eCOS Kernel. In: Proceedings of EuroSys 2006, ACM SIGOPS (to appear, 2006)Google Scholar
  9. 9.
    Mogul, J.: TCP Offload is a Dumb Idea Whose Time Has Come. In: Proc. of the 9th Workshop on Hot Topics in Operating Systems, Usenix, pp. 25–30 (2003)Google Scholar
  10. 10.
    Kiczales, G., Mezini, M.: Separation of Concerns with Procedures, Annotations, Advice and Pointcuts. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 195–213. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  11. 11.
    Allman, M.: RFC3465: TCP Congestion Control with Appropriate Byte Counting (ABC). IETF (2003)Google Scholar
  12. 12.
    Scheuermann, B., Lochert, C., Mauve, M.: Implicit Hop-by-Hop Congestion Control in Wireless Multihop Networks. University of Duesseldorf (preprint, 2005)Google Scholar
  13. 13.
    Foster, I., Kesselman, C.: The Grid: Blueprint for a New Computing Infrastructure. Morgan-Kaufman Publishers, San Francisco (1997)Google Scholar
  14. 14.
    Smith, M., Friese, T., Freisleben, B.: Towards a Service-Oriented Ad Hoc Grid. In: Proceedings of the 3rd International Symposium on Parallel and Distributed Computing, Cork, Ireland, pp. 201–208. IEEE Press, Los Alamitos (2004)Google Scholar
  15. 15.
    Foster, I., Kesselman, C.: Globus: A Metacomputing Infrastructure Toolkit. The International Journal of Supercomputer Applications and High Performance Computing 11, 115–128 (1997)CrossRefGoogle Scholar
  16. 16.
    Jensen, T., Le Metayer, D., Thorn, T.: Security and Dynamic Class Loading in Java: A Formalisation. In: IEEE International Conference on Computer Languages, Chicago, Illinois, pp. 4–15 (1998)Google Scholar
  17. 17.
    Sun Microsystems: Java Native Interface Specification. Sun (1997)Google Scholar
  18. 18.
    Provos, N.: Improving Host Security with System Call Policies. In: Proceedings of the 12th Usenix Security Symposium, Usenix, pp. 257–272 (2003)Google Scholar
  19. 19.
    Cantrill, B.M., Shapiro, M.W., Leventhal, A.H.: Dynamic Instrumentation of Production Systems. In: Proceedings of the USENIX Annual Technical Conference, USENIX, pp. 15–28 (2004)Google Scholar
  20. 20.
    Prasad, V., Cohen, W., Eigler, F.C., Hunt, M., Keniston, J., Chen, B.: Locating System Problems Using Dynamic Instrumentation. In: Proceedings of the Ottawa Linux Symposium, Linux International, pp. 49–64 (2005)Google Scholar
  21. 21.
    Barham, P.T., Dragovic, B., Fraser, K., Hand, S., Harris, T.L., Ho, A., Neugebauer, R.: Xen and the Art of Virtualization. In: Proceedings of the 19th ACM Symposium on Operating Systems Principles, pp. 164–177 (2003)Google Scholar
  22. 22.
    Bellard, F.: QEMU, a Fast and Portable Dynamic Translator. In: Usenix 2005 Annual Technical Conference, Usenix, pp. 41–46 (2005)Google Scholar
  23. 23.
    Tamches, A., Miller, B.P.: Fine-Grained Dynamic Instrumentation of Commodity Operating System Kernels. In: Proceedings of Third Symposium on Operating Systems Design and Implementation (OSDI), pp. 117–130. ACM Press, New York (1999)Google Scholar
  24. 24.
    Buck, B.R., Hollingsworth, J.K.: An API for Runtime Code Patching. Journal of High Performance Computing Applications 14(4) (2000)Google Scholar
  25. 25.
    Coady, Y., Kiczales, G., Feeley, M., Hutchinson, N., Ong, J.S., Gudmundson, S.: Position Summary: Aspect-Oriented System Structure. In: Proceedings of the 8th Workshop on Hot Topics in Operating Systems, p. 166. IEEE Press, Los Alamitos (2001)CrossRefGoogle Scholar
  26. 26.
    Coady, Y., Kiczales, G., Feeley, M., Hutchinson, N., Ong, J.S.: Structuring System Aspects: Using AOP to Improve OS Structure Modularity. Communications of the ACM 44(10), 79–82 (2001)CrossRefGoogle Scholar
  27. 27.
    Spinczyk, O., Gal, A., Schröder-Preikschat, W.: AspectC++: An Aspect-Oriented Extension to the C++ Programming Language. In: Proceedings of the Fourteenth International Conference on Tools, pp. 53–60. Australian Computer Society, Inc. (2002)Google Scholar
  28. 28.
    Griswold, B., Hilsdale, E., Hugunin, J., Ivanovic, V., Kersten, M., Kiczales, G., Palm, J.: Tutorial - Aspect-Oriented Programming with AspectJ (2001)Google Scholar
  29. 29.
    Spinczyk, O., Lohmann, D.: Using AOP to Develop Architectural-Neutral Operating System Components. In: Proceedings of the 11th ACM SIGOPS European Workshop (SIGOPS 2004). ACM Press, New York (2004)Google Scholar
  30. 30.
    Gal, A., Schröder-Preikschat, W., Spinczyk, O.: On Minimal Overhead Operating Systems and Aspect-Oriented Programming. In: Proceedings of the 4th Workshop on Object-Orientation and Operating Systems (ECOOP-OOOSW), Universidad de Oviedo (2001)Google Scholar
  31. 31.
    Grimm, R.: xtc: Making C Safely Extensible. In: Proceedings of the Workshop on Domain-Specific Languages for Numerical Optimization, Argonne. (2004)Google Scholar
  32. 32.
    Bray, S., Yuen, M., Coady, Y., Fiuczynski, M.E.: Managing Variability in Systems: Oh What a Tangled OS We Weave. In: Proceedings of the Workshop on Managing Variabilities Consistently in Design and Code (MVCDC OOPSLA 2004), pp. 6–7 (2004)Google Scholar
  33. 33.
    Rohlik, O., Pasetti, A., Chevalley, P., Birrer, I.: An Aspect Weaver for Qualifiable Applications. In: Proceedings of the 2004 Conference on Data Systems in Aerospace (DASIA), pp. 10–16 (2004)Google Scholar
  34. 34.
    Bershad, B.N., Savage, S., Pardyak, P., Sirer, E.G., Fiuczynski, M.E., Becker, D., Chambers, C., Eggers, S.: Extensibility, Safety and Performance in the SPIN Operating System. In: SOSP 1995: Proceedings of the fifteenth ACM symposium on Operating systems principles, pp. 267–283. ACM Press, New York (1995)CrossRefGoogle Scholar
  35. 35.
    Seltzer, M.I., Endo, Y., Small, C., Smith, K.A.: Dealing With Disaster: Surviving Misbehaved Kernel Extensions. SIGOPS Oper. Syst. Rev. 30, 213–227 (1996)CrossRefGoogle Scholar
  36. 36.
    Veitch, A.C., Hutchinson, N.C.: Kea - A Dynamically Extensible and Configurable Operating System Kernel. In: Proceedings of the Third International Conference on Configurable Distributed Systems, pp. 123–129 (1996)Google Scholar
  37. 37.
    Ghormley, D.P., Petrou, D., Rodrigues, S.H., Anderson, T.E.: SLIC: An Extensibility System for Commodity Operating Systems. In: Proceedings of the USENIX 1998 Annual Technical Conference, USENIX Association, pp. 39–52 (1998)Google Scholar
  38. 38.
    Pearce, D.J., Kelly, P.H.J., Field, T., Harder, U.: GILK: A Dynamic Instrumentation Tool for the Linux Kernel. In: Computer Performance Evaluation / TOOLS, pp. 220–226 (2002)Google Scholar
  39. 39.
    Coady, Y., Kiczales, G., Feeley, M., Smolyn, G.: Using AspectC to Improve the Modularity of Path-Specific Customization in Operating System Code. In: Proceedings of of the Joint European Software Engineering Conference (ESEC) and 9th ACM SIGSOFT International Symposium on the Foundations of Software Engineering (FSE-9), pp. 88–98. ACM Press, New York (2001)Google Scholar
  40. 40.
    Coady, Y., Kiczales, G., Feeley, M., Hutchinson, N., Ong, J.S., Gudmundson, S.: Exploring an Aspect-Oriented Approach to OS Code. In: Proceedings of the 4th Workshop on Object-Orientation and Operating Systems (ECOOP-OOOSW), Universidad de Oviedo (2001)Google Scholar
  41. 41.
    Coady, Y., Kiczales, G.: Back to the Future: A Retroactive Study of Aspect Evolution in Operating System Code. In: Proceedings of the Second International Conference on Aspect-Oriented Software Development, pp. 50–59. ACM Press, New York (2003)CrossRefGoogle Scholar
  42. 42.
    Stampflee, O., Gibbs, C., Coady, Y.: RADAR: Really Low-Level Aspects for Dynamic Analysis and Reasoning. In: Proceedings of the ECOOP Workshop on Programming Languages and Operating Systems, ECOOP (2004)Google Scholar
  43. 43.
    Segura-Devillechaise, M., Menaud, J.M., Muller, G., Lawall, J.: Web Cache Prefetching as an Aspect: Towards a Dynamic-Weaving Based Solution. In: Proceedings of the 2nd International Conference on Aspect-oriented Software Development, pp. 110–119. ACM Press, New York (2003)CrossRefGoogle Scholar
  44. 44.
    Zhang, C., Jacobsen, H.: TinyC2: Towards Building a Dynamic Weaving Aspect Language for C. In: FOAL 2003 Proceedings Foundation of Aspect-Oriented Languages Workshop at AOSD 2003, pp. 25–34 (2003)Google Scholar
  45. 45.
    Deters, M., Cytron, R.K.: Introduction of Program Instrumentation using Aspects. In: Proceedings of the OOPSLA 2001 Workshop on Advanced Separation of Concerns in Object-Oriented Systems, pp. 131–147 (2001)Google Scholar
  46. 46.
    Almajali, S., Elrad, T.: Coupling Availability and Efficiency for Aspect Oriented Runtime Weaving Systems. In: Proceedings of the Second Dynamic Aspects Workshop (DAW 2005), pp. 47–55 (2005)Google Scholar
  47. 47.
    Bockisch, C., Haupt, M., Mezini, M., Ostermann, K.: Virtual Machine Support for Dynamic Join Points. In: Proceedings of the Third International Conference on Aspect-Oriented Software Development (AOSD 2004), pp. 83–92. ACM Press, New York (2004)CrossRefGoogle Scholar
  48. 48.
    Haupt, M., Mezini, M.: Micro-Measurements for Dynamic Aspect-Oriented Systems. In: Weske, M., Liggesmeyer, P. (eds.) NODe 2004. LNCS, vol. 3263, pp. 81–96. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  49. 49.
    Engel, M., Freisleben, B.: Using a Low-Level Virtual Machine to Improve Dynamic Aspect Support in Operating System Kernels. In: Proceedings of the ACP4IS Workshop, Conference on Aspect-Oriented Software Development, pp. 1–6 (2005)Google Scholar
  50. 50.
    Bruntink, M., van Deursen, A., Tourwé, T.: An Initial Experiment in Reverse Engineering Aspects from Existing Applications. In: Proceedings of the Working Conference on Reverse Engineering, pp. 306–307. IEEE Computer Society Press, Los Alamitos (2004)Google Scholar
  51. 51.
    Bruntink, M., van Deursen, A., van Engelen, R., Tourwé, T.: An Evaluation of Clone Detection Techniques for Identifying Cross-Cutting Concerns. In: Proceedings of the IEEE International Conference on Software Maintenance (ICSM), pp. 200–209. IEEE Computer Society Press, Los Alamitos (2004)CrossRefGoogle Scholar
  52. 52.
    Breu, S., Krinke, J.: Aspect Mining Using Dynamic Analysis. In: GI-Softwaretechnik-Trends, Mitteilungen der Gesellschaft für Informatik, Bad Honnef, Germany, vol. 23, pp. 21–22 (2003)Google Scholar
  53. 53.
    Ceccato, M., Marin, M., Mens, K., Moonen, L., Tonella, P., Tourwe, T.: A Qualitative Comparison of Three Aspect Mining Techniques. In: IWPC 2005: Proceedings of the 13th International Workshop on Program Comprehension, Washington, pp. 13–22. IEEE Computer Society, Los Alamitos (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Michael Engel
    • 1
  • Bernd Freisleben
    • 1
  1. 1.Department of Mathematics and Computer ScienceUniversity of MarburgMarburgGermany

Personalised recommendations