[Brandon University crest][The famous "Halfway Tree" of the Prairies, between Winnipeg and Brandon]


KModel
 


Site Map

  Kmodel Home  
  - Download
  - Installation
  - Javadoc

  Hardware Model
  - Serial  
  - Timer  
  - Disk  

  Kernel Design  
  - Modules  
  - User Process  
  - Kernel Entry  
  - Kernel Call  
  - Handles  
  - Signals

  Components  
  - Processes  
  - Console  
  - Timer  
  - Disk  

  File System  
  - Disk Layout
  - Buffer Cache
  - Inode Cache
  - Standard Files
  - Vnodes

  Study Questions  

 

   

KModel is a working design for an operating system. It is intended as an educational tool to illustrate concepts of operating system design through review and practice.

KModel incorporates a modular monolithic kernel with devices on one side and user processes on the other. It is modular in the sense that portions of the kernel are separated and intermodule communication is controlled. It is monolithic in the sense that only one thread of control is active in the kernel at any given time, and that thread is well defined.

In part, the constraints on the kernel design stem from its language of implementation. KModel is written in Java and makes use of Java threads to provide asynchronous behaviour. Threads are used as the context for each user process. Threads are also used as the context for each device. The only use of Java thread synchronization (synchronized, wait() and notify()) is to serialize kernel entry, wakeup device threads and control user threads cum processes.

A Java-based kernel yields a different view of how kernels should be written. A kernel written in C with a disciplined approach to the use of function pointers can approximate the object-oriented style of programming, to the extent that kernel programmers are willing to embrace that philosophy. KModel is designed using object-oriented techniques including UML, Design Patterns (Gamma et. al., 1994) and componentization (Martin, 1995). It is intended that the design is more important than the detail, and that component relationships expressed in the code are self evident.

This documentation has the following main sections. Refer to the navigation links at left to move around in the document.

  • Hardware model describes the bus, controller, device and interrupt structure of KModel along with the class structure of the Java implementation.
    • The serial controller provides communication between the bus and Java threads that provide the asynchronous behaviour required to model such a device.
    • The interval-timer controller can be programmed to provide an interrupt at selected intervals.
    • The disk controller handles a block device that resembles a hard disk.
  • Kernel Design describes the overall architecture of the kernel
    • The kernel can be extended by adding modules.
    • Navigate between modules is enabled by name and containing each module within the main Kernel class
    • how processes make system calls
    • how the kernel is entered from hardware of software interrupts
    • how the kernel dispatches system calls. 
    • how kernel resources are handled
    • how signals are handled
  • Components describes the main parts of the kernel.
    • Processes: creating and managing processes
    • Console: handling input and output from an interrupt-driven device
    • Timer: managing an interval timer
    • Disk: performing I/O on a disk device.
  •  File System describes the design of the file-system
    • Disk layout
    • Buffer cache
    • Inode cache
    • Standard files
    • Vnodes

Last update 01/24/05
Copyright © Gerald Dueck
[=]