New functionality is added to the kernel as required. Examples of kernel extensions are device drivers, network stack modules, virtual file systems, etc. The extensions are loaded to the kernel dynamically. After being loaded they are executed in the privileged mode when the kernel calls them. This contributes to extensions' efficiency but hinders their debugging. To take the best, Dusk allows programmers to develop the extensions at the user level. When an extension is ready it is transformed to the kernel modules without additional programmer's effort. That is, Dusk allows programmers to write extensions using the native kernel API. It provides a compiler that generates the user-level code. This allows to debug programs using gdb, for example. Whenever a problem is detected, a user-level program rather than the kernel crashes. The recovery after this crash is much easier then that after a kernel crash which typically requires a reboot.
Another feature of Dusk is the cross-platform development of kernel modules. For example, one can take a Netfilter module for Linksys WRT54g and compile it to a user-level program. The program will run on x86 computer and communicate with the router. The effect is as if the extension were running in the kernel mode on the router.
The idea behind Dusk is to transform each reference to a kernel memory and a kernel function call to a call to the kernel-level Dusk component. This component handles the request and sends the result back to the user-level program. The kernel-level module is generated automatically for each kernel extension. It has the functions for processing user-level module requests and callback proxy functions that communicate with the kernel on behalf of the user-level kernel module. The following figure presents the idea:
A. Smirnov and T.-C. Chiueh. A User-Level Development Environment for In-Kernel Network Protocol/Extension Implementations. ECSL Technical Report (pdf).
2/20/2006: Dusk 1.0 released.
Dusk uses ecsl_config, a library that parses the config file and implements the pool data structure. A modified GNU C compiler is required. Install GEM, the framework for writing GCC extensions first. It will download a copy of GCC, patch it, and build extensible GCC. Then download the library and compile it using this GCC. Specify the location of the modified GCC in Makefile. Finally, download Dusk and compile it using the modified GCC and ecsl_config.