ece1cae8b0c30ef858663f27333273bc8195ac18
[ikiwiki.git] / docs / user / vKernelOverview.mdwn
1 ## The DragonFly virtual kernels 
2
3
4
5 ***Obtained from [vkernel(7)](http://leaf.dragonflybsd.org/cgi/web-man?command#vkernel&section7) written by Sascha Wildner, added by Matthias Schmidt***
6
7
8 The motivation for writing the vkernel was finding an elegant 
9 solution to one immediate and one long term issue in pursuing the project’s main goal of Single System 
10 Image clustering over the Internet. First, as any person who is familiar with distributed algorithms will 
11 attest, implementing cache coherency without hardware support is a complex task. It would not be made 
12 any easier by enduring a 2-3 minute delay in the edit-compile-run cycle while each machine goes 
13 through the boot sequence. As a nice side effect, userspace programming errors are unlikely to bring the 
14 machine down and one has the benefit of working with superior debugging tools (and can more easily 
15 develop new ones). 
16
17 The second, long term, issue that virtual kernels are intended to address is finding a way to securely 
18 (which is the top priority) and efficiently dedicate system resources to a cluster that operates over the 
19 (hostile) Internet. Because a kernel is a more or less standalone environment, it should be possible to 
20 completely isolate the process a virtual kernel runs in from the rest of the system.
21
22 The vkernel architecture allows for running DragonFly kernels in userland.
23
24
25
26 ### Supported devices 
27
28 A number of virtual device drivers exist to supplement the virtual kernel.
29
30
31
32 #### Disk device 
33
34 The vkd driver allows for up to 16 [vn(4)](http://leaf.dragonflybsd.org/cgi/web-man?command#vn&section4) based disk devices.  The root device will be `vkd0`.
35
36 #### CD-ROM device 
37
38 The vcd driver allows for up to 16 virtual CD-ROM devices.  Basically this is a read only `vkd` device with a block size of 2048.
39
40 #### Network interface 
41
42 The vke driver supports up to 16 virtual network interfaces which are
43
44 associated with [tap(4)](http://leaf.dragonflybsd.org/cgi/web-man?command#tap&section4) devices on the host.  For each `vke` device, the per-interface read only [sysctl(3)](http://leaf.dragonflybsd.org/cgi/web-man?command=sysctl&section=3) variable `hw.vkeX.tap_unit` holds the unit number of the associated [tap(4)](http://leaf.dragonflybsd.org/cgi/web-man?command=tap&section=4) device.
45
46