नया programming project: Bunnix
प्रोजेक्ट की पृष्ठभूमि
- हाल ही में "असल काम" से थोड़ा हटने के लिए, कम जोखिम और पूरी तरह अवकाश के लिए एक नया programming project शुरू किया गया।
- 21 अप्रैल से यह देखने का फैसला किया गया कि x86_64 target के लिए लगभग एक महीने में Unix-जैसा operating system कितना बनाया जा सकता है।
- इसका परिणाम Bunnix नाम का operating system है।
- कुल 27 दिनों तक इस project पर समय लगाया गया।
Bunnix डेमो
Bunnix के घटक
- Bunnix kernel मुख्य रूप से Hare में लिखा गया है, और इसमें कुछ C components (lwext4, libvterm) शामिल हैं।
- supported drivers:
- PCI (legacy)
- AHCI block device
- GPT और MBR partition table
- PS/2 keyboard
- platform serial port
- CMOS clock
- framebuffer (bootloader द्वारा सेट किया गया)
- ext4 और memfs file system
- supported kernel features:
- virtual file system
- विभिन्न /dev devices
- terminal emulator और termios support
- लगभग 40 system calls (जैसे: clock_gettime, poll, openat, fork, exec आदि)
- Bunnix एक single-user system है, और फिलहाल Unix file mode तथा ownership लागू नहीं करता।
bootloader
- इसमें दो bootloader शामिल हैं:
- Legacy boot: Hare में लिखा गया।
- EFI boot: C में लिखा गया।
- यह kernel को ELF फ़ाइल के रूप में load करता है, और आवश्यकता पड़ने पर initramfs भी load करता है।
user-space software
- यह मुख्य रूप से third-party software से बना है:
- Colossal Cave Adventure (advent)
- dash (/bin/sh)
- Doom
- gzip
- less (pager)
- lok (/bin/awk)
- lolcat
- mandoc (man pages)
- sbase (core utils)
- tcc (C compiler)
- Vim 5.7
- libc, musl libc से व्युत्पन्न है और Bunnix की ज़रूरतों के अनुसार संशोधित किया गया है।
Bunnix का development process
- development process को Mastodon पर documented किया गया।
- Bunnix का कुछ code पिछले project Helios से लिया गया।
- ext4 support और virtual terminal integration सबसे कठिन हिस्से थे।
- scheduler और signal handling को implement करना भी चुनौतीपूर्ण था।
- musl libc आधारित होने की वजह से third-party software को port करना अपेक्षाकृत आसान था।
सीखी गई बातें
- file systems के बारे में बहुत कुछ सीखा गया।
- drivers के लिए approach अधिक सरल हो गई।
- signal handling की जटिलता को बेहतर समझा गया।
- memory management में bitmap allocator प्रभावी साबित हुआ।
- यह स्पष्ट हुआ कि monolithic kernel को implement करना microkernel की तुलना में कहीं अधिक सरल है।
आगे की योजना
- Bunnix अवकाश के लिए बनाया गया project था, और फिलहाल इसमें आगे समय लगाने की योजना नहीं है।
- भविष्य में Helios project पर वापस जाकर कई सीखे गए सबक लागू किए जाएंगे।
- Bunnix के सुधारों की प्राथमिकताएँ:
- file system cache
- ext4 bug fixes
- procfs और top
- mmap files
- अधिक signals (जैसे: SIGSEGV)
- multi-user support
- NVMe block device
- IDE block device
- ATAPI और ISO 9660 support
- Intel HD audio support
- network stack
- base system में Hare toolchain
- self-hosting
GN⁺ की राय
- Bunnix का महत्व: Bunnix, Hare भाषा का उपयोग करके kernel hacking का एक अच्छा उदाहरण है, और यह नए language तथा technologies सीखने वाले developers के लिए दिलचस्प हो सकता है।
- file system design: operating system development में file system design एक महत्वपूर्ण हिस्सा है, और Bunnix के माध्यम से इसके बारे में बहुत कुछ सीखा जा सकता है।
- monolithic vs microkernel: यह monolithic kernel और microkernel के फायदे-नुकसान की तुलना करने का अच्छा उदाहरण है, जो operating system design की गहरी समझ देता है।
- community participation: Bunnix एक open source project है, और community की भागीदारी व योगदान के साथ इसके और विकसित होने की संभावना है।
- भविष्य के सुधार: Bunnix के भविष्य के सुधार operating system development में रुचि रखने वालों के लिए अच्छे learning opportunities प्रदान करते हैं।
1 टिप्पणियां
Hacker News राय
Hacker News टिप्पणियों का संक्षिप्त सार
This is really cool. Reminds me of the original Unix was invented in a couple weeks while Ritchie's family went on vacation to CA to visit his in-laws.
I also finally learned how signals work from top to bottom, and boy is it ugly. I’ve always felt that this was one of the weakest points in the design of Unix and this project did nothing to disabuse me of that notion.
Impressive, super cool, and inspiring!
Example of “creating something impressive in X days” requires a lot of experience and talent that is built over years.
It was really cool watching the ~daily updates on this on Mastodon - seeing how someone so skilled gradually pieces together a complex piece of software.
From "Linux System Call Table – Chromiumos"
Code is here: Git Repository
Hare looks like an interesting language. Though this limitation will limit its adoption in this multicore age I think:
Very cool. Most of these Unix clones are usually written in C. This one is written in a new programming language.
Quite cool, by making use of Hare instead.
Waiting for an OS that treats GPU(s) as a first class citizen ...