4 ms·
The little book about OS development
- zelphirkalt 2y agoA little (ha) bit of confusion with "The Little ..." series, with that title.
- _mlbt 2y agoThank you! This looks like a great resource on the topic. I wish I still had the source code for the “OS” I made as a teenager. I got as far as writing an MBR boot loader, switching to protected mode, displaying characters on the screen, and keyboard input. I highly recommend it if you’re looking for a fun challenge.
- shpongled 2y agoWriting my own "OS" (read: mostly copying from the OG Bran's Kernel Development Tutorial [1]) was also a formative experience for me as a teenager. Really great way to learn systems programming and what goes on under the hood! [1] http://www.osdever.net/bkerndev/Docs/gettingstarted.htm http://www.osdever.net/bkerndev/Docs/gettingstarted.htm
- qingcharles 2y agoHa! Same. Lost the code too. It was fun actually booting something into bare metal. This book helped a lot: https://www.amazon.com/Developing-32-Bit-Operating-System-Cd-Rom/dp/0672306557 https://www.amazon.com/Developing-32-Bit-Operating-System-Cd...
- rubiquity 2y ago[flagged]
- LPisGood 2y agoAre you implying GP’s story is an exaggerated brag?
- exe34 2y agoI didn't get as far as protected mode or keyboard input, but the MBR and characters on a screen were achievable by a teenager in the early 00s with the few online guides from osdev. I know, because I was one, and I achieved those things using nasm on a pentium and ran it on a 8086 in another room. it meant a lot of trips with a floppy disk and practising my swearing.
- peterfirefly 2y agoIt was achievable long before that. The only hard part in the 80's was getting access to the datasheets, usually in the form of photocopies of photocopies.
- rocky_raccoon 2y agoIs reddit leaking through to HNews? This childish comment doesn't add any value to the discussion whatsoever.
- furkanonder 2y agoThe book is good. I wish they would look at the issues on GitHub, there are some things that need to be fixed. The last commit was 10 years ago.
- roywashere 2y agoThere is an active fork here: https://ordoflammae.github.io/littleosbook/ https://ordoflammae.github.io/littleosbook/
- fragmede 2y agoSpeaking of OS development, games make learning fun. I had the idea of making a game to teach operating systems while taking a journey through the history of computers. The player would play the part of the process scheduler and interrupt handler, starting on a single CPU system with very limited RAM, before growing to SMP systems then maybe getting to multi-system distributed computing platforms that we have today.
- markus_zhang 2y agoI have thought about making a game or a Fallout 3/4 mod in which the player needs to assembly pieces to repair a broken vintage computer before the nuclear war, and then search for some manuals and write programs to solve quests.
- SoothingSorbet 2y agoThat sounds fun. I tried to design an assembly game once, but found I lack the creativity to design puzzles/goals that are not just "implement this common algorithm in assembly language". The idea of bootstrapping a PC from virtual firmware and writing an OS sounds nice, though.
- ignoramous 2y ago> ...to teach operating systems while taking a journey through the history of computers. The player would play the part of the process scheduler and interrupt handler, starting on a single CPU system with very limited RAM... Something similar by Ben Eater (not with game development, though): https://youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH https://youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1...
- vibrantrida 2y agoThere are two Japanese operating system development books I wish have English translations because they take you as far as getting a graphical environment with windows working [0], one of the books is even a 30-days challenge of sort [1]. Here is someone's take on MikanOS [0] https://github.com/uchan-nos/mikanos https://github.com/uchan-nos/mikanos And another one on 30-days Homemade OS [1] https://github.com/kamaboko123/30daysOS https://github.com/kamaboko123/30daysOS An attempt to translate "30-days Homemade OS" [1] to English but it didn't get far https://github.com/handmade-osdev/os-in-30-days https://github.com/handmade-osdev/os-in-30-days I do not know of any English book nor article that go this far, except Fusion but the graphical environment chapter is not done yet [2] [0] https://www.amazon.co.jp/dp/4839975868 https://www.amazon.co.jp/dp/4839975868 - MikanOS [1] https://www.amazon.co.jp/dp/B00IR1HYI0 https://www.amazon.co.jp/dp/B00IR1HYI0 - 30-days Homemade OS [2] https://0xc0ffee.netlify.app/osdev/ https://0xc0ffee.netlify.app/osdev/ - Fusion, an OS made in Nim
- khaledh 2y agoFusion author here. I haven't abandoned the project, and I do plan to complete it, including a graphics subsystem and a network stack. I'm currently trying to crack a tough nut, which is efficient zero-copy IPC using message passing over channels with a shared heap. This is a fundamental piece that will be used to communicate between different components (both within the kernel and across kernel-user space). Once I have a proper implementation, I expect the pace to pick up. And of course I will document everything as I make more progress.
- warangal 2y agoAre you trying to do this message passing using Nim channels ? For my use-cases, i always had to resort to just passing `pointers`, to prevent any copying, most of time i just divide the problem to use independent memory locations to write to avoid using locks, but that is not general pattern for sure. For read only purposes i just use `cursor` while casting to appropriate type. If you find a useful pattern, please share.
- 2y ago
- xmprt 2y agoMy favorite OS book (less about development and more about how it works) is Operating Systems: Three Easy Pieces. Free in HTML and PDF form but they sell a printed book as well. https://pages.cs.wisc.edu/~remzi/OSTEP/ https://pages.cs.wisc.edu/~remzi/OSTEP/
- drudolph914 2y agojust got recommended this and read a good chunk of it! it’s a great read
- joshgachnang 2y agoAhh my favorite professor and favorite class at UW. Remzi is great.
- checker659 2y agoBest part is that it comes with references to all the classic papers and sources.
- netbsdusers 2y agoUnfortunately this book has the classic fault of osdev tutorials: lots of talking about x86 minutiae, very little osdev. X86 minutiae is not osdev. It is a vanishingly small portion of what even a basic OS has to deal with.
- 01HNNWZ0MV43FF 2y agoI wonder if I could learn anything interesting by making a user space machine agnostic os using some VM like wasm that allows for preemption
- PhilipRoman 2y agohttps://github.com/rswier/swieros https://github.com/rswier/swieros is a cool project that uses it's own VM (with a C compiler included). I was surprised by all the capabilities it has.
- pjmlp 2y agoFor sure, all Xerox PARC famous OSes are kind of VM based for example. The compilers generated bytecode, and the CPUs were microcoded. So the first boot phase was to load the microcode into the CPU, and then boot into Smalltalk, Interlisp-D, Mesa, Cedar environments. There was a project that tried to be a future Amiga OS replacement that was also bytecode based with JIT, https://news.ycombinator.com/item?id=9806607 https://news.ycombinator.com/item?id=9806607 Inferno with Limbo, another example, get wasm to replace disVM role. Or like ART on Android, and so on. Ah, IBM i (née AS/400) is also bytecode based with a JIT on the kernel. Lots of examples out there, UNIX is not the only way.
- dokyun 2y agoIt would be great if there were more hobby OS resources targetting something other than X86. It is common and everything, but all the bootstrapping and device cruft involved isn't something you should need to get in your head, and 386 assembly by itself is terribly frustrating and obtuse to write by hand. I think most people might be better off starting out with a RISC microcontroller. There isn't nearly as much bullshit involved between getting a running kernel and talking some simple serial, and you can get an instruction set reference, assembler manual, and processor datasheet that will tell you everything you need to know. And it's easy to have fun hardware hacking that way too, making your own peripherals and such.
- rocky_raccoon 2y agoI love osdev. I don't know what the end game is for me, but there's something really cool about being able to just create... whatever I want. It all sort of clicked for me when I was able to get some basic x86 interrupts and syscalls working. Once you get the syscalls going, the world is your oyster! Seriously, I would highly recommend tinkering around with a hobby OS. I used it as an opportunity to learn Rust and I got more than I bargained for. Now, I feel somewhat comfortable in Rust AND I can throw more double and triple faults than most people in the world.
- endorphine 2y agoDid you use a book or similar resource? I vaguely recall there was some book about implementing an OS in Rust.
- ibobev 2y agoHere are some other tutorials about operating systems development including some in Rust programming language: https://github.com/bobeff/programming-math-science?tab=readme-ov-file#operating-systems-development https://github.com/bobeff/programming-math-science?tab=readm...
- hedonhermdev 2y agohttps://os.phil-opp.com/ https://os.phil-opp.com/ This one?
- checker659 2y agoHave you considered making your own CPU core in an FPGA and running your OS on it? (Oysters all the way down, I know)
- Rochus 2y agoEven Wirth had good fun with this: http://www.projectoberon.net/ http://www.projectoberon.net/
- initramfs 2y agoNow, where's the instruction manual for the little red OS book? https://en.wikipedia.org/wiki/Kylin_(operating_system) https://en.wikipedia.org/wiki/Kylin_(operating_system)
- vishnuharidas 2y agoThis took me a nostalgic dive back to 2000's when a website called planet-source-code.com was popular among the developer community. It had hundreds of mini operating systems written by members. Most of them were written in C/C++ and Assembly for the bootloader, compiled using Mingw32, and booting from a regular Floppy disk.
- pjmlp 2y agoSince everyone is plugging their favourite alternatives, I am still a big fan of Project Oberon, it may be not fit for purpose on 2025 computing, however it is a tiny graphical based OS, written in a memory safe systems language, with enough content to learn about OS development. https://www.projectoberon.net/ https://www.projectoberon.net/
- deleted 2y ago[deleted]