↑ Back to main site.

EPOS

Experimental Protected-mode Operating System

README-KERNEL.txt
==============================================

  THE EPOS KERNEL
  Systems of the EPOS kernel and structure of the source code.
  http://www.atanaslaskov.com/epos/
 
  Atanas Laskov,
  20 March 2011
 
==============================================

This folder contains the source code of the EPOS kernel. The kernel is the only
piece of code that runs in supervisor mode. It provides higher-level
functionality to the rest of the system through system calls. Drivers and
everything else runs in user mode (EPOS is a "micro-kernel").

The source code of the EPOS kernel is organized in folders coresponding to
kernel sub-systems. What follows is a list of kernel sub-systems and description
of their functions.


* kernal\access
Access to low-level functionality for the C programming language.

This directory contains assembly routines that encapsulate some
of the unpleasant hardware details. They are conformant to the
specification for C function calls.


* kernel\debug
Debug routines and text output.


* kernel\gdt
C and assembly routines for working with the IA32 Global Descriptor Table.


* kernel\idt
C and assembly routines for working with the IA32 Interrupt Descriptor Table.


* kernek\init
Kernel boot sequence.


* kernel\memory
EPOS memory manager.


* kernel\paging
Implementation of IA32 paging for the memory manager.


* kernel\process
EPOS process manager and task scheduler.


* kernel\service
Interface of the kernel for user-level processes; Implementation of
Inter-process Communication (IPC) and synchronisation.

System calls are implemented as an interrupt ( more precisely int 48 ),
invoked by an user process. The interupt handler switches to the kernel
running in supervisor mode. Afterwards it returns to user mode.

Thanks to the library in lib\epos user processes can call the kernel with
a simple C function call.
 
==============================================
 
 EPOS KERNEL - SYSTEM CALLS

==============================================

EPOS system calls are implemented in kernel\service. They provide an interface
for inter-poresss communication, memory allocation, and management
of other resrouces.

The following list is a description of implemented kernel services.

* kernel\service\bios
Access to BIOS calls (used by generic drivers).


* kernel\service\debug
Provides some debug functionality and system status information to
user processes.


* kernel\service\ipc
Inter-process Communication (IPC) as message-passing.

The EPOS kernel implements both blocking and non-blocking calls,
making it possible to use message-passing for synchronisation.

Other types of synchronisation are implemented in kernel\service\sync.


* kernel\service\ipc_thoth
An alternative system for IPC.


* kernel\service\irc
Interface for acessing hardware interrupts (used by drivers).


* kernel\service\mem
Memory allocation and management.


* kernel\service\ports
Interface for acessing hardware ports (used by drivers).


* kernel\service\process
Process management services.

This includes tasks like starting a new process, killing a process,
suspending and resuming a process.


* kernel\service\specmem
Access to special areas of memory. In older versions
of the kenel specmem was used by drivers. In the current version
this functionality is merged with general memory management.


* kernel\service\sync
Process synchronisation implemented with events.


=================================
Copyright (C) 2011, Atanas Laskov