- Notifications
You must be signed in to change notification settings - Fork48
Simple unix-like operating system for education and research purposes
License
cahirwpz/mimiker
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Mimiker's main goal is to deliver minimal Unix-like operating system, i.e.the kernel and a set of userspace programs.
Kernel design is heavily inspired by FreeBSD & NetBSD systems with some ideastaken from Linux, Plan9 and other OSes. We spend a lot of time reading sourcecode of open-source operating systems. We carefully choose their best designdecisions, ideas, algorithms, APIs, practices and so on, distill them to bareminimum and reimplement them or adapt to Mimiker code base. We hope not torepeat their mistakes and move away from legacy and non-perfect solutions.
Mimiker project gathers like minded people who value minimalism, simplicity andreadability of code. We strive for the lowest possible complexity of solutions.We love to throw away code that isn't terribly useful or handles rare edgecases. We know value of debuggability and we don't hesitate to spend timewriting tools that help to improve it.
Though userspace programs are part of Mimiker project, they've got simply portedfrom NetBSD orsuckless project. We focus on kernel development, since wefind it more interesting. We don't want to invest too much time into the devicedrivers, so we keep a list of target platforms small.
If you'd like to get involved in the project please read ourWiki to findout more!
Mimiker is a real-time operating system. The kernel is preemptible and ourmutexes support priority inheritance. We minimize work done in interrupt contextby delegating it to interrupt threads instead of running it using softinterrupts.
Mimiker runs onMIPS (32-bit),AArch64 andRISC-V (both 32-bitand 64-bit) architectures underQEmu andRenode control.
Mimiker has nice set of debugging tools:gdb
scripts written in Python, KernelAddress Sanitizer, Lock dependency validator, Kernel Concurrency Sanitizer. Weeven have support for profiling the kernel usinggprof
! We useClang tocompile our code base, hence we can employ sophisticated dynamic and staticanalysis algorithms to aid code reliablity.
A common set of synchronization primitives is provided, i.e. spin-locks, mutexesand conditional variables - all with simple semantics. We don't have multipleprimitives that do similar things, but a little bit differently, which is commonfor FreeBSD or Linux kernels.
Mimiker's kernel memory is wired (i.e. non-swappable), so you don't have toworry about choosing right locks when accessing kernel memory, unlike inFreeBSD. We have buddy memory allocator for physical memory, virtual addressspace allocator and slab allocator based onMagazines and Vmem paper. Ourmemory allocators are simple yet efficient.
Mimiker's driver infrastructure abstracts away concept of hardware registerand interrupts in similar manner to FreeBSD'sNewBus. Special care istaken to make drivers portable. We have enumerator routines that autodetectdevices attached to PCI and USB buses. We useflat device tree to drivekernel configuration during startup phase.
Virtual file system and user virtual address space management are loosely basedon FreeBSD ideas. They need substatial amount of work to become as mature as inFreeBSD or Linux kernels.
We have over eightysyscalls that allow us to run various open-sourcetools, including NetBSD'sKorn Shell,Atto Emacs editor,Luainterpreter, and many more. We even have a game:
Mimiker supports:
- UNIX file I/O -- well known APIs for file-like objects access,
- interprocess communication -- POSIX signal and pipes,
- job control -- thus we can run unmodifiedKorn Shell,
- UNIX credentials -- users, groups, file permissions,
- libterminfo, hence Mimiker can run some fullscreen terminal applications,
- pseudoterminals -- so we can runscript or terminal emulators.
We would like to support:
- multi-core systems,
- VirtIO and virt platforms in QEmu,
- a filesystem for non-volatile storage devices,
- TCP/IP protocols.
There's plenty of work to be done. Please refer to our roadmap!
About
Simple unix-like operating system for education and research purposes