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.

124<br />

ule directory tree from /st<strong>and</strong> on <strong>the</strong> host mapped into <strong>the</strong> rump kernel namespace<br />

so that a rump kernel could read kernel module binaries from <strong>the</strong> host.<br />

3.8 Attaching Components<br />

A rump kernel’s initial configuration is defined by <strong>the</strong> components that are linked in<br />

when <strong>the</strong> rump kernel is bootstrapped. At bootstrap time, <strong>the</strong> rump kernel needs<br />

to detect which components were included in <strong>the</strong> initial configuration <strong>and</strong> attach<br />

<strong>the</strong>m. If drivers are loaded at runtime, <strong>the</strong>y need to be attached to <strong>the</strong> rump kernel<br />

as well.<br />

In this section we go over how loading <strong>and</strong> attaching components in a rump kernel<br />

is similar to a regular kernel <strong>and</strong> how it is different. <strong>The</strong> host may support static<br />

linking, dynamic linking or both. We include both alternatives in <strong>the</strong> discussion.<br />

<strong>The</strong>re are two methods for attaching components, called kernel modules <strong>and</strong> rump<br />

components. We will discuss both <strong>and</strong> point out <strong>the</strong> differences. We start <strong>the</strong><br />

discussion with kernel modules.<br />

3.8.1 Kernel Modules<br />

In NetBSD terminology, a driver which can be loaded <strong>and</strong> unloaded at runtime is<br />

said to be modular. <strong>The</strong> loadable binary image containing <strong>the</strong> driver is called a<br />

kernel module, ormodule for short. We adapt <strong>the</strong> terminology for our discussion.<br />

<strong>The</strong> infrastructure for supporting modular drivers on NetBSD has been available<br />

since NetBSD 5.0 12 . Some drivers <strong>of</strong>fered by NetBSD are modular, <strong>and</strong> o<strong>the</strong>rs are<br />

12 NetBSD 5.0 was released in 2009. Versions prior to 5.0 provided kernel modules through<br />

a different mechanism called Loadable Kernel Modules (LKM ). <strong>The</strong> modules available from 5.0

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

Saved successfully!

Ooh no, something went wrong!