The a-kernel Project


OS code is notoriously complex, with many systems having millions of lines of code containing subtle and intricate interactions. The inability for programmers to effectively reason about parts of the system, develop components independently, and even configure customized systems at build time are well known ramifications of the deep structural flaws in OS code. The goal of the a-kernel project is to determine if aspect-oriented programming can be used to improve OS modularity, and thereby reduce complexity and fragility associated with system implementation.

The structural problems we are targeting involve the implementation of concerns in the system that have never before been modularized. Parts of the system are, for example, inevitably scattered throughout major functions in virtual memory, pagers, and file systems, and tangled with the primary functionality of page fault handling and file system requests respectively. As a natural consequence of their lack of modularity, these concerns are inextricable from the primary functionality, are hard to comprehensively appreciate, and impede independent development as they couple, and are coupled with, the primary functionality they crosscut.

We began by proposing a small scale design of an aspect-oriented approach to prefetching and assessed its impact on modularity. We are currently evaluating the application of this original design to a system-wide implementation of prefetching covering VM, 4 pagers, and 7 file systems, or 17 execution paths in total. To date we have not introduced any new functionality, but instead refactored the original implementation of prefetching as it is found along each of the relevant execution paths into special crosscutting modular units, or aspects. In order to do this in an existing UNIX kernel, it was also necessary for us to develop AspectC - a simple subset of AspectJ.

AspectC provides linguistic mechanisms that allow us to localize and structure crosscutting implementation according to execution paths. Specifically, we can name the execution paths involved, attach functionality at specific points on these paths, and propagate dynamic context along these paths. Using these mechanisms, we have been able to modularize the implementation of prefetching, which before now has never been untangled from primary functionality and implemented in a separate, localized, modular-unit.

So far, our work has demonstrated the ways in which explicit structural support for crosscutting improves OS modularity. That is, prefetching code is localized; interactions between prefetching and primary functionality are explicit in the aspect's interface; propagation of dynamic context related to prefetching is declarative; and points of intersection between different aspects on the same execution path are declarative. These qualities are some of the ways in which we have been able to reduce the complexity and fragility associated with prefetching's implementation. We are now in the process of assessing how this approach scales in terms of system complexity and performance.

These results have potential impact in several areas associated with OS research, which we are continuing to explore. In keeping with recent work in product-line architectures, aspects introduce new possibilities in the design and implementation of reconfigurable, extensible, and application-specific systems. Similarly, both the comprehensive implementation of evolutionary changes, and the use of contracts to ensure correctness, stand to benefit from structural support for crosscutting concerns in OS code. To this end, we are exploring evolutionary changes associated with the Network File System, and the style of contracts identified by recent work on meta-level compilation.

Position Summary: Aspect-Oriented System Structure. Yvonne Coady, Gregor Kiczales, Mike Feeley, Norm Hutchinson, Joon Suan Ong and Stephan Gudmundson. In The 8th Workshop on Hot Topics in Operating Systems (HotOS), May 2001.

Structuring System Aspects. Yvonne Coady, Gregor Kiczales, Mike Feeley, Norm Hutchinson, and Joon Suan Ong. In International Conference on Software Engineering, Aspect-Oriented Programming Workshop, May 2001.

Can AOP Support Extensibility in Client-Server Architectures? Yvonne Coady, Alex Brodsky, Dima Brodsky, Jody Pomkoski, Stephan Gudmundson, Joon Suan Ong and Gregor Kiczales. In European Conference on Object-Oriented Programming (ECOOP), Aspect-Oriented Programming Workshop, June 2001.

Structuring Operating System Aspects Yvonne Coady, Gregor Kiczales, Mike Feeley, Norm Hutchinson and Joon Suan Ong. In Communications of the ACM (CACM) (to appear), October 2001.

Using AspectC to Improve the Modularity of Path-Specific Customization in Operating System Code Yvonne Coady, Gregor Kiczales, Mike Feeley and Greg Smolyn. To appear in Proceedings of the Joint European Software Engineering Conference (ESEC) and 9th ACM SIGSOFT International Symposium on the Foundations of Software Engineering (FSE-9), 2001.

Aspect-Oriented Incremental Customization of Middleware Services Alex Brodsky, Dima Brodsky, Ida Chan, Yvonne Coady, Jody Pomkoski, and Gregor Kiczales. Submitted.

Exploring an Aspect-Oriented Approach to OS Code Yvonne Coady, Gregor Kiczales, Michael Feeley, Norman Hutchinson, Joon Suan Ong and Stephan Gudmundson. 4th ECOOP Workshop on Object-Orientation and Operating Systems, June 2001.

Coping with Evolution: Aspects vs Aspirin? Alex Brodsky, Dima Brodsky, Ida Chan, Yvonne Coady, Stephan Gudmundson,Jody Pomkoski, Joon Suan Ong. OOPSLA Workshop on Advanced Separation of Concerns, 2001.



Thesis proposal:

Crosscutting the Great Divide: Exploring an Aspect-Oriented Approach to OS Code. Yvonne Coady, January 2001.



Talks:

Structuring System Aspects: How do small aspects compose? International Conference on Software Engineering, Aspect-Oriented Programming Workshop (slides), May 2001.

Using AspectC to Improve the Modularity of Path-Specific Customization in Operating System Code Yvonne Coady, Gregor Kiczales, Mike Feeley and Greg Smolyn. Joint European Software Engineering Conference (ESEC) and 9th ACM SIGSOFT International Symposium on the Foundations of Software Engineering (FSE-9) (slides), Sept 2001.