28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

53<br />

while <strong>the</strong> application logic still remains in <strong>the</strong> local client. <strong>The</strong> ability to use multiple<br />

types <strong>of</strong> clients on a single rump kernel makes it possible to reuse existing tools for<br />

<strong>the</strong> configuration job <strong>and</strong> still reap <strong>the</strong> speed benefit <strong>of</strong> a local client.<br />

<strong>Rump</strong> kernels used by remote or microkernel clients always include a local client as<br />

part <strong>of</strong> <strong>the</strong> process <strong>the</strong> rump kernel is hosted in. This local client is responsible for<br />

forwarding incoming requests to <strong>the</strong> rump kernel, <strong>and</strong> sending <strong>the</strong> results back after<br />

<strong>the</strong> request has been processed.<br />

2.3 Threads <strong>and</strong> Schedulers<br />

Next, we will discuss <strong>the</strong> <strong>the</strong>ory <strong>and</strong> concepts related to processes, threads, CPUs,<br />

scheduling <strong>and</strong> interrupts in a rump kernel. An example scenario is presented after<br />

<strong>the</strong> <strong>the</strong>ory in Section 2.3.4. This subject is revisited in Section 3.3 where we discuss<br />

it from a more concrete perspective along with <strong>the</strong> implementation.<br />

As stated earlier, a rump kernel uses <strong>the</strong> host’s process, thread <strong>and</strong> scheduling<br />

facilities. To underst<strong>and</strong> why we still need to discuss this topic, let us first consider<br />

what a thread represents to an operating system. First, a thread represents machine<br />

execution context, such as <strong>the</strong> program counter, o<strong>the</strong>r registers <strong>and</strong> <strong>the</strong> virtual<br />

memory address space. We call this machine context <strong>the</strong> hard context. It determines<br />

how machine instructions will be executed when a thread is running on a CPU <strong>and</strong><br />

what <strong>the</strong>ir effects will be. <strong>The</strong> hard context is determined by <strong>the</strong> platform that<br />

<strong>the</strong> thread runs on. Second, a thread represents all auxiliary data required by <strong>the</strong><br />

operating system. We call this auxiliary data <strong>the</strong> s<strong>of</strong>t context. It comprises for<br />

example <strong>of</strong> information determining which process a thread belongs to, <strong>and</strong> e.g.<br />

<strong>the</strong>refore what credentials <strong>and</strong> file descriptors it has. <strong>The</strong> s<strong>of</strong>t context is determined<br />

by <strong>the</strong> operating system.

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

Saved successfully!

Ooh no, something went wrong!