mirror of
https://github.com/kevinalavik/minx.git
synced 2026-11-22 13:41:09 +00:00
A fully vibecoded OS
- C 93.8%
- Assembly 2.3%
- Makefile 2%
- Shell 1.3%
- Python 0.4%
- Other 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
"SMP works" is easy to claim and easy to get wrong, because a scheduler that round-robins one task to completion before starting the next behaves identically from the outside: every program runs, every program finishes, and nothing notices that four processors spent the run taking turns. So this does not check that the children finish. It checks two things a serial scheduler cannot fake. **They were on more than one processor.** Each child asks the kernel which processor it is on, and the kernel answers from the APIC's own identification register rather than from the scheduler's bookkeeping -- so "the scheduler spread them out" and "the hardware ran them at once" are checked against different sources, and a scheduler that believed it had migrated a task would be caught. That needed a `getcpu` syscall, which there was no way to ask for before; it is 75, which Linux also leaves open there. **Their lifetimes overlapped.** Every child records the millisecond clock on entry and on exit, and the check is that the *latest* start is before the *earliest* end. In sequence the last child starts after the first has finished, and this fails however many processors there are. The work is a sieve because it has an unpredictable memory access pattern and enough of one to keep a processor busy, and its answer is checked from every child, so a child that returned the right number without computing it cannot pass. Repeated 24 times because the finest clock here is a millisecond: one sieve finishes inside one, which is indistinguishable from having run in sequence. Both checks are conditional on there being more than one processor. A one-processor machine cannot fail either, and a test that reports a failure for a correct single-processor run is a test about the machine. Four bugs the first run found in itself, which is the argument for writing it: it counted "processor" as a substring and reported five CPUs on a four-CPU machine, because `model name: minx virtual processor` contains the word; it compared `wait()`'s returns against the fork order, which fails for every child after the first on any machine where they finish in a different order; it passed `minx_report()`'s return value as the exit status, which is a character count; and it passed the failure *count* where the API wants "did it pass". Four children, four distinct processors, `phase11-smp` green. Co-authored-by: Space Bunny Free <[email protected]> |
||
| .githooks | ||
| boot | ||
| docs | ||
| kernel | ||
| libc | ||
| tools | ||
| user | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| knowledge.md | ||
| Makefile | ||
| PROMPT.md | ||
| README.md | ||
| UNLICENSE | ||
minx - A fully vibecoded OS
This is an experimental OS that is 100% AI generated, i only prompt different models. (the model is noted in the commits).
Why?
I want to see how far AI has come and how useful it can be, i take 0 credit for this and the project is under the UNLICENSE license (public domain). Feel free to use any piece off code, but keep in mind all the code is 100% AI generated.