Crocos: tiny kernel for educational purposes
Posted: Tue May 05, 2009 3:23 pm
Hi all,
This is my first post here to announce that a (very) small kernel I've been working on (for now 3 years...), called CROCOS, has been made available for everybody.
Here is the project webpage.
Quick description:
CROCOS is a small opensource (GPLv3) UNIX-like kernel for x86/x86_64 systems, designed with simplicity in mind, for educational purposes. It is developed in several steps to allow people to understand how a tiny operating system can be built from scratch.
CROCOS is written in C and assembly language when needed. GNU gcc and make are used for compilation, as well as some others traditional UNIX tools.
The two main features of CROCOS are the following:
- CROCOS development is cut into distinct phases. A main phase can include sub-phases. The code for every (sub)phases is provided, so that it is possible to compare two successive phases. This way, one can extract the subset of code implementing a given feature.
- I don't find convenient the approach consisting in starting kernel development by the boot sequence, and then building kernel components on a "naked" machine or emulator. I think that implementing sensitive kernel components require robust and reliable debugging facilities. In early development phases, CROCOS provides a multiprocesses environment embedded inside one Linux process. This is achieved by using the standard setjmp and longjmp functions to perform task switching. This way, it is possible to implement a maximum of features with the comfort of Linux for debugging and tests. Boot sequence and architecture dependent developments will come later, once heavily tested tasks manager and file system will be implemented.
As of today, the development phases implemented are:
- phase 1: the kernel libc
- phase 2: the tasks manager
---- phase 2.1: a simple tasks manager
---- phase 2.2: process hierarchy and init task
---- phase 2.3: signals
---- phase 2.4: user and kernel stacks
---- phase 2.5: process synchronization (mutex)
More documentation (and the source code of course) can be found on the project webpage.
Feel free to try/comment/criticize...
Cheers - Guillaume
This is my first post here to announce that a (very) small kernel I've been working on (for now 3 years...), called CROCOS, has been made available for everybody.
Here is the project webpage.
Quick description:
CROCOS is a small opensource (GPLv3) UNIX-like kernel for x86/x86_64 systems, designed with simplicity in mind, for educational purposes. It is developed in several steps to allow people to understand how a tiny operating system can be built from scratch.
CROCOS is written in C and assembly language when needed. GNU gcc and make are used for compilation, as well as some others traditional UNIX tools.
The two main features of CROCOS are the following:
- CROCOS development is cut into distinct phases. A main phase can include sub-phases. The code for every (sub)phases is provided, so that it is possible to compare two successive phases. This way, one can extract the subset of code implementing a given feature.
- I don't find convenient the approach consisting in starting kernel development by the boot sequence, and then building kernel components on a "naked" machine or emulator. I think that implementing sensitive kernel components require robust and reliable debugging facilities. In early development phases, CROCOS provides a multiprocesses environment embedded inside one Linux process. This is achieved by using the standard setjmp and longjmp functions to perform task switching. This way, it is possible to implement a maximum of features with the comfort of Linux for debugging and tests. Boot sequence and architecture dependent developments will come later, once heavily tested tasks manager and file system will be implemented.
As of today, the development phases implemented are:
- phase 1: the kernel libc
- phase 2: the tasks manager
---- phase 2.1: a simple tasks manager
---- phase 2.2: process hierarchy and init task
---- phase 2.3: signals
---- phase 2.4: user and kernel stacks
---- phase 2.5: process synchronization (mutex)
More documentation (and the source code of course) can be found on the project webpage.
Feel free to try/comment/criticize...
Cheers - Guillaume