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.

122<br />

By convention, file system device nodes are available in /dev. NetBSD does not<br />

feature a device file system which dynamically creates device nodes based on <strong>the</strong><br />

drivers in <strong>the</strong> kernel. A st<strong>and</strong>ard installation <strong>of</strong> NetBSD relies on precreated device<br />

nodes residing on persistent storage. We work around this issue in two ways.<br />

First, during bootstrap, <strong>the</strong> rump kernel VFS faction generates a selection <strong>of</strong> common<br />

device nodes such as /dev/zero. Second, we added support to various driver<br />

attachments to create device driver nodes when <strong>the</strong> drivers are attached. <strong>The</strong>se<br />

adjustments avoid <strong>the</strong> requirement to have persistent storage mounted on /dev.<br />

3.7.1 Extra-Terrestrial File System<br />

<strong>The</strong> Extra-Terrestrial File System (etfs) interface provides a rump kernel with access<br />

to files on <strong>the</strong> host. <strong>The</strong> etfs (manual page rump etfs.3 at A–20) interface is used to<br />

register host file mappings with rumpfs. Fundamentally, <strong>the</strong> purpose <strong>of</strong> etfs is <strong>the</strong><br />

same as that <strong>of</strong> a hostfs available on most full system virtualization solutions. Unlike<br />

a hostfs, which typically mounts a directory from <strong>the</strong> host, etfs is oriented towards<br />

mapping individual files. <strong>The</strong> interface allows <strong>the</strong> registration <strong>of</strong> type <strong>and</strong> <strong>of</strong>fset<br />

translators for individual host files; a feature we will look at more closely below.<br />

In addition, etfs only supports reading <strong>and</strong> writing files <strong>and</strong> cannot manipulate <strong>the</strong><br />

directory namespace on <strong>the</strong> host. This I/O-oriented approach avoids issues such as<br />

how to map permissions on newly created hostfs files.<br />

<strong>The</strong> mapping capability <strong>of</strong> etfs is hooked up to <strong>the</strong> lookup operation within rumpfs.<br />

Recall, a lookup operation for a pathname will produce an in-memory file system<br />

structure referencing <strong>the</strong> file behind that pathname. If <strong>the</strong> pathname under lookup<br />

consists <strong>of</strong> a registered etfs key, <strong>the</strong> in-memory structure will be tagged so that<br />

fur<strong>the</strong>r I/O operations, i.e. read <strong>and</strong> write, will be directed to <strong>the</strong> backing file on<br />

<strong>the</strong> host.

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

Saved successfully!

Ooh no, something went wrong!