BSD 3-Clause "New" or "Revised" License

项目介绍

cahirwpz/mimiker 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前获得 307 个 Star、47 次 Fork。

仓库全名
cahirwpz/mimiker
开源许可证
BSD 3-Clause "New" or "Revised" License
Star 数
307
Fork 数
47
未关闭 Issue
18

README 摘要

Mimiker: Unix-like system for education and research purposes 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 ideas taken from Linux, Plan9 and other OSes. We spend a lot of time reading source code of open-source operating systems. We carefully choose their best design…

完整内容见 GitHub 原始 README 或本页 。

常见问题

mimiker 用什么语言开发?

主要使用 C 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前有 307 个 Star。

mimiker 可以免费商用吗?

仓库采用 BSD 3-Clause "New" or "Revised" License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 mimiker 的源码?

可以直接克隆仓库:git clone https://github.com/cahirwpz/mimiker.git,默认分支为 master;安装与运行步骤见仓库 README。

mimiker 最近还在维护吗?

仓库最近一次更新为 2024年9月4日,当前有 18 个未关闭 Issue;Star 数为 307,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Simple unix-like operating system for education and research purposes

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
411
价值分
198
活跃状态
活跃

语言占比

Assembly
C
C++
Dockerfile
GDB
Lua
Makefile
Python
Roff
Shell
Yacc

README

Mimiker: Unix-like system for education and research purposes

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 ideas taken from Linux, Plan9 and other OSes. We spend a lot of time reading source code of open-source operating systems. We carefully choose their best design decisions, ideas, algorithms, APIs, practices and so on, distill them to bare minimum and reimplement them or adapt to Mimiker code base. We hope not to repeat their mistakes and move away from legacy and non-perfect solutions.

Mimiker project gathers like minded people who value minimalism, simplicity and readability 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 edge cases. We know value of debuggability and we don’t hesitate to spend time writing tools that help to improve it.

Though userspace programs are part of Mimiker project, they’ve got simply ported from NetBSD or suckless project. We focus on kernel development, since we find it more interesting. We don’t want to invest too much time into the device drivers, so we keep a list of target platforms small.

If you’d like to get involved in the project please read our Wiki to find out more!

Where we are

Mimiker is a real-time operating system. The kernel is preemptible and our mutexes support priority inheritance. We minimize work done in interrupt context by delegating it to interrupt threads instead of running it using soft interrupts.

Mimiker runs on MIPS (32-bit), AArch64 and RISC-V (both 32-bit and 64-bit) architectures under QEmu and Renode control.

Mimiker has nice set of debugging tools: gdb scripts written in Python, Kernel Address Sanitizer, Lock dependency validator, Kernel Concurrency Sanitizer. We even have support for profiling the kernel using gprof! We use Clang to compile our code base, hence we can employ sophisticated dynamic and static analysis algorithms to aid code reliablity.

A common set of synchronization primitives is provided, i.e. spin-locks, mutexes and conditional variables - all with simple semantics. We don’t have multiple primitives that do similar things, but a little bit differently, which is common for FreeBSD or Linux kernels.

Mimiker’s kernel memory is wired (i.e. non-swappable), so you don’t have to worry about choosing right locks when accessing kernel memory, unlike in FreeBSD. We have buddy memory allocator for physical memory, virtual address space allocator and slab allocator based on Magazines and Vmem paper. Our memory allocators are simple yet efficient.

Mimiker’s driver infrastructure abstracts away concept of hardware register and interrupts in similar manner to FreeBSD’s NewBus. Special care is taken to make drivers portable. We have enumerator routines that autodetect devices attached to PCI and USB buses. We use flat device tree to drive kernel configuration during startup phase.

Virtual file system and user virtual address space management are loosely based on FreeBSD ideas. They need substatial amount of work to become as mature as in FreeBSD or Linux kernels.

What we are proud of

We have over eighty syscalls that allow us to run various open-source tools, including NetBSD’s Korn Shell, Atto Emacs editor, Lua interpreter, and many more. We even have a game:

tetris

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 unmodified Korn Shell,
  • UNIX credentials – users, groups, file permissions,
  • libterminfo, hence Mimiker can run some fullscreen terminal applications,
  • pseudoterminals – so we can run script or terminal emulators.

What is missing

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!

评论

暂无评论