28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

68<br />

We identified three obstacles for having a partitioned kernel:<br />

1. Compile-time definitions (#ifdef) indicating which features are present<br />

in <strong>the</strong> kernel. Compile-time definitions are fine within a component, but<br />

do not work between components if linkage dependencies are created (for<br />

example a cross-component call which is conditionally included in <strong>the</strong> compilation).<br />

2. Direct references between components where we do not allow <strong>the</strong>m. An<br />

example is a reference from <strong>the</strong> base to a faction.<br />

3. Multiclass source modules contain code which logically belongs in several<br />

components. For example, if <strong>the</strong> same file contains routines related to both<br />

file systems <strong>and</strong> networking, it belongs in this problem category.<br />

Since our goal is to change <strong>the</strong> original monolithic kernel <strong>and</strong> its characteristics<br />

as little as possible, we wanted to avoid heavy approaches in addressing <strong>the</strong> above<br />

problems. <strong>The</strong>se approaches include but are not limited to converting interfaces to<br />

be called only via pointer indirection. Instead, we observed that indirect interfaces<br />

were already used on most boundaries (e.g. struct fileops, struct protosw,<br />

etc.) <strong>and</strong> we could concentrate on <strong>the</strong> exceptions. Code was divided into functionality<br />

groups using source modules as boundaries.<br />

<strong>The</strong> three techniques we used to address problems are as follows:<br />

1. code moving. This solved cases where a source module belonged to several<br />

classes. Part <strong>of</strong> <strong>the</strong> code was moved to ano<strong>the</strong>r module. This technique had<br />

to be used sparingly since it is very intrusive toward o<strong>the</strong>r developers who<br />

have outst<strong>and</strong>ing changes in <strong>the</strong>ir local trees. However, we preferred moving

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!