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.

56<br />

<strong>The</strong> s<strong>of</strong>t context is always set by a local client. Microkernel <strong>and</strong> remote clients are<br />

not able to directly influence <strong>the</strong>ir rump kernel thread <strong>and</strong> process context. <strong>The</strong>ir<br />

rump kernel context is set by <strong>the</strong> local client which receives <strong>the</strong> request <strong>and</strong> makes<br />

<strong>the</strong> local call into <strong>the</strong> rump kernel.<br />

Discussion<br />

<strong>The</strong>re are alternative approaches to implicit threads. It would be possible to require<br />

all local host threads to register with <strong>the</strong> rump kernel before making calls. <strong>The</strong><br />

registration would create essentially a bound thread. <strong>The</strong>re are two reasons why<br />

this approach was not chosen. First, it increases <strong>the</strong> inconvenience factor for casual<br />

users, as <strong>the</strong>y now need a separate call per host thread. Second, some mechanism<br />

like implicit threads must be implemented anyway: allocating a rump kernel thread<br />

context requires a rump kernel context for example to be able to allocate memory<br />

for <strong>the</strong> data structures. Our implicit thread implementation doubles as a bootstrap<br />

context.<br />

Implicit contexts are created dynamically because because any preconfigured reasonable<br />

amount <strong>of</strong> contexts risks application deadlock. For example, n implicit threads<br />

can be waiting inside <strong>the</strong> rump kernel for an event which is supposed to be delivered<br />

by <strong>the</strong> n + 1’th implicit thread, but only n implicit threads were precreated.<br />

Creating an amount which will never be reached (e.g. 10,000) may avoid deadlock,<br />

but is wasteful. Additionally, we assume all users aiming for high performance will<br />

use bound threads.

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

Saved successfully!

Ooh no, something went wrong!