The kernel consists of several modules, mostly one per object type, plus some utilities.
- oz_knl_ast.c - ast objects
An ast is an 'asynchronous system trap'. VMS programmers know them well. Unix programmers can think of them as
sort of like SIGIO's, but they are specifically tied to a particular I/O. Like you start an asynchronous read and
you specify an particular ast routine to be called when that particular read completes. They may also be thought
of as a user-mode equivalent of an interrupt.
There are several flavors of ast's:
- user mode normal - these are what you get when a user-mode initiated I/O completes (they can be masked).
- user mode express - these are used by the debugger to 'halt' threads in a process (they cannot be masked).
- kernel mode normal - you would get one of these from a kernel-mode initiated I/O. They are also used to abort
threads (they can be masked).
- kernel mode express - these are used at the end of an I/O operation to complete things like returning the
status and lengths back to the proper place (they cannot be masked).
- oz_knl_boot.c - boot startup routine
This routine initializes the pool areas, creates the system user, job and process, creates the system logical names,
starts the other cpu's running and initializes the device drivers
- oz_knl_cache.c - generic caching routines
These routines use otherwise unused physical memory pages to store data that can be reconstructed, like exact copies
of disk blocks, or name to ip address translations
- oz_knl_crtl.c/oz_knl_crtl_486.s - some C runtime library routines linked into the kernel
- oz_knl_dcache.c - disk cache routines
- oz_knl_debug.c - kernel debugger
- oz_knl_devio.c - device objects and I/O utility routines
- oz_knl_diag.c - system diagnostic routines
- oz_knl_event.c - event flag objects
These are basically the only thing a thread can wait for (except for an available cpu). They normally get set when
an I/O operation completes or a thread exits, etc, but they can also be used for things like inter-thread/process
communication/synchronization.
- oz_knl_handle.c - handle table manipulation routines
- oz_knl_image.c - image loader routines
- oz_knl_image_oz.c - ozone image loader
- oz_knl_kmalloc.c - kernel memory (nonpaged and paged pool) allocation
- oz_knl_kthread.c - kernel thread objects
- oz_knl_logname.c - logical name objects
- oz_knl_logon.c - logon startup routines
These routines start the logon process running on a terminal when the terminal driver calls them
- oz_knl_lowipl.c - lowipl objects
These routines are how a driver operating at interrupt level can call a routine at softint (low ipl) level
- oz_knl_malloc_binned.c - general memory allocator
- oz_knl_phymem.c - physical memory allocator
- oz_knl_printinstr.c - disassembler
- oz_knl_printk.c - kernel mode console print routines
- oz_knl_process.c - process objects
- oz_knl_sdata.c - shared data (kernel global data)
- oz_knl_section.c - memory section objects
- oz_knl_security.c - security objects
- oz_knl_spte.c - system page table entry routines
- oz_knl_startup.c - mount system disk and spawn startup process
- oz_knl_thread.c - thread objects
- oz_knl_userjob.c - user and job objects