next up previous contents index
Next: 1.6.1 Example Kernels Up: 1 Introduction Previous: 1.5 Building the OSKit

1.6 Using the OSKit

 

To use the OSKit, simply link your kernel (or servers, or whatever) with the appropriate libraries. Detailed information on how to use each library is provided in the appropriate chapters in this document. For initial experimentation with the OSKit, you can simply hack on the example kernels or create new kernels in the same directory (see Section 1.6.1 for a tour through our examples); however, once your own system grows beyond the stage of a simple demo kernel you will probably want to set up a separate source tree and link in the OSKit components from the installation directory.

Linking libraries into a kernel may seem strange at first, since all of the existing OS kernels that we have encountered seem to have a strong ``anti-library'' do-everything-yourself attitude. However, the linker can link libraries into a kernel just as easily as it can link them into application programs; we believe that the primary reason existing kernels avoid libraries is because the available libraries aren't designed to be used in kernels; they make too many assumptions about the environment they run in. Filling that gap is the purpose of the OSKit.

All of the OSKit libraries are designed so that individual components of each library can be replaced easily; we have taken pains to document the dependencies clearly so that clients can override whatever components they need to, without causing unexpected results. In fact, in many cases, particularly in the function libraries, it is necessary to override certain functions or symbols in order to make effective use of the toolkit. To override a library function or any other symbol defined by a library, just define your own version of it in your kernel or other client program; the linker will ensure that your definition is used instead of the library's. We strongly suggest that you use the linker to replace components of the OSKit, instead of making changes directly in the OSKit source (except, of course, to fix bugs in the OSKit). Maintaining a clean separation between the OSKit and your kernel will make things much easier when upgrading to a new version of the OSKit.




next up previous contents index
Next: 1.6.1 Example Kernels Up: 1 Introduction Previous: 1.5 Building the OSKit

University of Utah Flux Research Group