Name Date Size #Lines LOC

..--

.github/workflows/H06-cze-2022-11295

bin/H20-maj-2023-41 82431 797

build/H22-lis-2023-714467

contrib/H14-wrz-2023-2 3051 871

etc/H14-wrz-2023-5635

include/H14-wrz-2023-29 93918 173

kftlib/H06-lut-2024-433319

lib/H06-cze-2022-77 31147 371

scripts/H12-maj-2023-4124

sys/H08-lip-2022-47 81532 410

toolchain/H06-cze-2022-1 082808

usr.bin/H14-wrz-2023-500408

wiki/H06-cze-2022-710544

.ackrcH A D06-cze-2022224 109

.clang-formatH A D06-cze-20222,8 KiB9492

.format-excludeH A D12-maj-2023430 3029

.gdbinitH A D22-lis-2023514 2721

.gdbinit-commonH A D22-lis-2023229 119

.gdbinit-kftraceH A D22-lis-2023473 3024

.gdbinit-testH A D22-lis-2023357 2319

.gitignoreH A D22-lis-2023818 8964

.gitmodulesH A D14-wrz-2023645 2120

.taghl_configH A D06-cze-202260 54

.tmux.confH A D06-cze-20222,8 KiB8128

CONTRIBUTORS.mdH A D06-cze-2022491 179

DockerfileH A D10-lis-20221,1 KiB2218

LICENSEH A D06-cze-20221,5 KiB2522

MakefileH A D19-maj-20231,5 KiB6336

README.mdH A D31-lip-20225 KiB10987

action.shH A D01-sie-2023757 4233

config.mkH A D22-lis-2023739 4731

git-setup.shH A D12-maj-2023846 3828

install-tools.shH A D10-lis-20223 KiB9067

launchH A D22-lis-202318,6 KiB596490

packages.txtH A D10-lis-2022162 21

requirements.txtH A D29-kwi-202389 65

run_tests.pyH A D01-sie-20232,3 KiB7556

verify-format.shH A D12-maj-2023568 2517

verify-pycodestyle.shH A D12-maj-2023388 1913

README.md

1# Mimiker: Unix-like system for education and research purposes
2
3Mimiker's main goal is to deliver minimal Unix-like operating system, i.e.
4the kernel and a set of userspace programs.
5
6Kernel design is heavily inspired by FreeBSD & NetBSD systems with some ideas
7taken from Linux, Plan9 and other OSes. We spend a lot of time reading source
8code of open-source operating systems. We carefully choose their best design
9decisions, ideas, algorithms, APIs, practices and so on, distill them to bare
10minimum and reimplement them or adapt to Mimiker code base. We hope not to
11repeat their mistakes and move away from legacy and non-perfect solutions.
12
13Mimiker project gathers like minded people who value minimalism, simplicity and
14readability of code. We strive for the lowest possible complexity of solutions.
15We love to throw away code that isn't terribly useful or handles rare edge
16cases. We know value of debuggability and we don't hesitate to spend time
17writing tools that help to improve it.
18
19Though userspace programs are part of Mimiker project, they've got simply ported
20from NetBSD or [suckless][1] project. We focus on kernel development, since we
21find it more interesting. We don't want to invest too much time into the device
22drivers, so we keep a list of target platforms small.
23
24If you'd like to get involved in the project please read our [Wiki][2] to find
25out more!
26
27## Where we are
28
29Mimiker is a real-time operating system. The kernel is preemptible and our
30mutexes support priority inheritance. We minimize work done in interrupt context
31by delegating it to interrupt threads instead of running it using soft
32interrupts.
33
34Mimiker runs on [MIPS][15] (32-bit), [AArch64][9] and [RISC-V][10] (both 32-bit
35and 64-bit) architectures under [QEmu][11] and [Renode][12] control.
36
37Mimiker has nice set of debugging tools: `gdb` scripts written in Python, Kernel
38Address Sanitizer, Lock dependency validator, Kernel Concurrency Sanitizer. We
39even have support for profiling the kernel using `gprof`! We use [Clang][19] to
40compile our code base, hence we can employ sophisticated dynamic and static
41analysis algorithms to aid code reliablity.
42
43A common set of synchronization primitives is provided, i.e. spin-locks, mutexes
44and conditional variables - all with simple semantics. We don't have multiple
45primitives that do similar things, but a little bit differently, which is common
46for FreeBSD or Linux kernels.
47
48Mimiker's kernel memory is wired (i.e. non-swappable), so you don't have to
49worry about choosing right locks when accessing kernel memory, unlike in
50FreeBSD.  We have buddy memory allocator for physical memory, virtual address
51space allocator and slab allocator based on [Magazines and Vmem][3] paper. Our
52memory allocators are simple yet efficient.
53
54Mimiker's driver infrastructure abstracts away concept of hardware register
55and interrupts in similar manner to FreeBSD's [NewBus][14]. Special care is
56taken to make drivers portable. We have enumerator routines that autodetect
57devices attached to PCI and USB buses. We use [flat device tree][13] to drive
58kernel configuration during startup phase.
59
60Virtual file system and user virtual address space management are loosely based
61on FreeBSD ideas. They need substatial amount of work to become as mature as in
62FreeBSD or Linux kernels.
63
64## What we are proud of
65
66We have over eighty [syscalls][4] that allow us to run various open-source
67tools, including NetBSD's [Korn Shell][5], [Atto Emacs][6] editor, [Lua][7]
68interpreter, and many more. We even have a game:
69
70![tetris][8]
71
72Mimiker supports:
73 * UNIX file I/O -- well known APIs for file-like objects access,
74 * interprocess communication -- POSIX signal and pipes,
75 * job control -- thus we can run unmodified [Korn Shell][18],
76 * UNIX credentials -- users, groups, file permissions,
77 * libterminfo, hence Mimiker can run some fullscreen terminal applications,
78 * [pseudoterminals][16] -- so we can run [script][17] or terminal emulators.
79
80## What is missing
81
82We would like to support:
83 * multi-core systems,
84 * VirtIO and virt platforms in QEmu,
85 * a filesystem for non-volatile storage devices,
86 * TCP/IP protocols.
87
88There's plenty of work to be done. Please refer to our roadmap!
89
90[1]: https://suckless.org
91[2]: https://github.com/cahirwpz/mimiker/wiki
92[3]: https://www.usenix.org/legacy/publications/library/proceedings/usenix01/full_papers/bonwick/bonwick.pdf
93[4]: https://github.com/cahirwpz/mimiker/blob/master/sys/kern/syscalls.master
94[5]: https://man.netbsd.org/ksh.1
95[6]: https://github.com/hughbarney/atto
96[7]: https://www.lua.org/docs.html
97[8]: https://mimiker.ii.uni.wroc.pl/resources/tetris.gif
98[9]: https://www.qemu.org/docs/master/system/target-arm.html
99[10]: https://www.qemu.org/docs/master/system/target-riscv.html
100[11]: https://www.qemu.org
101[12]: https://renode.io
102[13]: https://wiki.freebsd.org/FlattenedDeviceTree
103[14]: https://nostarch.com/download/samples/freebsd-device-drivers_ch7.pdf
104[15]: https://www.qemu.org/docs/master/system/target-mips.html
105[16]: https://en.wikipedia.org/wiki/Pseudoterminal
106[17]: https://man.netbsd.org/script.1
107[18]: https://man.netbsd.org/ksh.1
108[19]: https://clang.llvm.org/
109