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.

106<br />

synchronization part <strong>of</strong> <strong>the</strong> algorithm, <strong>and</strong> <strong>the</strong>n explain how it works in a rump<br />

kernel.<br />

Four cases must be h<strong>and</strong>led:<br />

1. execution <strong>of</strong> a system call which is loaded <strong>and</strong> functional (fast path)<br />

2. loading a system call<br />

3. attempting to execute an absent system call<br />

4. unloading a system call<br />

1: Regular Execution<br />

Executing a system call is considered a read side lock. <strong>The</strong> essential steps are:<br />

1. Set currently executing system call in curlwp->l_sysent. This step is executed<br />

lockless <strong>and</strong> without memory barriers.<br />

2. Execute system call.<br />

3. Clear curlwp->l_sysent.<br />

2: Loading a System Call<br />

Modifying <strong>the</strong> syscall vector is serialized using a lock. Since modification happens<br />

seldom compared to syscall execution, this is not a performance issue.<br />

1. Take <strong>the</strong> kernel configuration lock.

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

Saved successfully!

Ooh no, something went wrong!