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.

181<br />

25<br />

remote (unix domain)<br />

local<br />

20<br />

time (s)<br />

15<br />

10<br />

5<br />

0<br />

0 1 2 3 4 5 6 7 8<br />

copyin/out pairs<br />

Figure 3.37: Local vs. Remote system call overhead. <strong>The</strong>cost<strong>of</strong>remote<br />

system calls is dominated by <strong>the</strong> amount <strong>of</strong> client-kernel roundtrips necessary due<br />

to copying data in <strong>and</strong> out. For local clients <strong>the</strong> cost <strong>of</strong> a system call is virtually<br />

independent <strong>of</strong> <strong>the</strong> amount <strong>of</strong> copies in <strong>and</strong> out.<br />

<strong>The</strong> straightforward optimization which does not involve modifying <strong>the</strong> host system<br />

is to decrease <strong>the</strong> number <strong>of</strong> remote copyin/out requests required for completing a<br />

syscall request. This decrease can be reached in a fairly straightforward manner by<br />

augmenting <strong>the</strong> syscall definitions <strong>and</strong> pre-arranging parameters so that pre-known<br />

copyin/out I/O can be avoided. Possible options are piggy-backing <strong>the</strong> data copy<br />

as part <strong>of</strong> syscall request/response, or by using interprocess shared memory in case<br />

<strong>the</strong> client <strong>and</strong> server are on <strong>the</strong> same machine. For example, <strong>the</strong> open() syscall<br />

will, barring an early error, always copy in <strong>the</strong> pathname string. We can make <strong>the</strong><br />

syscall code set things up so that <strong>the</strong> pathname copyin is immediately satisfied with<br />

a local copy operation instead <strong>of</strong> a remote request <strong>and</strong> <strong>the</strong> associated round trip<br />

delay.

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

Saved successfully!

Ooh no, something went wrong!