6 ms·
SkiftOS: A hobby OS built from scratch using C/C++ for ARM, x86, and RISC-V
- pkphilip 1y agoThis looks really cool! congratulations to the person who made this! Is there a video demo of this somewhere? I am amazed that you also managed to write a browser engine!
- monax 1y agoDidn’t expect to see my project on the main page today ‘^^ Right now the build is broken, so you can’t test the full OS, but you can run individual apps with: ```bash ./skift.sh run --release <app-name> ``` on Linux or macOS. To see all available apps: ```bash ls ./src/apps ```
- monax 1y agoThis works for everything except the browser. For that, use: ```bash ./skift.sh run --release vaev-browser -- <url-or-file> ``` The HTTP stack is super barebones, so it only supports `http://` (no HTTPS). It works with my site, but results may vary elsewhere. Most of my time so far has gone into the styling and layout engine rather than networking.
- pjmlp 1y agoKudos for exploring other avenues outside UNIX.
- monax 1y agoThanks! Skift is basically a patchwork of all the OS ideas I like. The UI takes inspiration from SwiftUI/Flutter, the microkernel is influenced by Zircon, and there are some Plan 9 ideas where everything is a URL. A few bits are probably inspired by NT and Darwin too, though I don’t remember exactly which.
- keyle 1y agoSounds like really solid ideas. You must have a lot of experience to inspire yourself from so many diverse niche worlds. GL!
- pjmlp 1y agoMaybe adding some Xerox PARC, Oberon, NeXTSTEP / NeWS style, Powershell ideas could also be interesting, on how the shell, UI, and dynamically loaded code (or OS IPC), makes the whole OS customizable, , just throwing another set of ideas into your bucket. Overall it looks interesting, all the best.
- DeathArrow 1y agoHow much time did it take you to get the project to this phase?
- Rochus 1y agoImpressive achievements, congrats! You said that your microkernel is "influenced by Zircon". Did you also study other architectures like e.g. sel4, Minix or openQNX? What do you consider the important design choices in your microkernel design? Is there a document where you go into this? Have you done performance measurements, i.e. to which other microkernel design do you think your kernel is comparable in terms of performance?
- QuantumNomad_ 1y agoSkift, Karm, Hjert, Opstart. As a Norwegian, the name of this system and those components sound Danish (Skift, Karm, Opstart) and Danish-inspired (Hjert). Am I right? :)
- monax 1y agoYes, you're right, I found the Danish word cool-sounding
- detached_prx 1y agoHi monax, I would like to hear how you started the project. I am also currently trying to implement my own micro kernel, with hopes of doing something similar to SkiftOS in order to learn OS fundamentals, but I don't know how to start. What are the first things to tackle when taking on such a project?
- monax 1y agoI don’t know what I can tell you, I think where you start and how you start don’t really matter. The important thing is to keep going. These kinds of projects are a lot of work, and as long as you keep making progress, you’ll eventually get to what you want.
- detached_prx 1y agoThank you for the reply, one more thing. Did you study established code bases and/or books to guide you through the architecture process and initial implementation? If so, how do you take advantage of these resources without falling into the trap of "borrowing" implementation while trying to build your vision? What you did here is really cool and inspiring :).
- qingcharles 1y agoI always paste this book here when hobby OSes appear. I wrote my own GUI OS in the 90s and I couldn't have done it without this. Copies available on your usual shadow library I would imagine... https://us.amazon.com/Developing-32-Bit-Operating-System-Cd-Rom/dp/0672306557 https://us.amazon.com/Developing-32-Bit-Operating-System-Cd-...
- Panzerschrek 1y agoWhat else does it have rather than beautiful UI? Network support? Sound? What file systems does it support? What about multiple users? What about applications isolation? It would be nice to have such information displayed somewhere on the site.
- monax 1y agoIt’s a microkernel-based operating system. Mostly just a learning/fun side project for me. It implements something akin to the NixOS /store. Hardware, networking, sound, and the file system are all very barebones. Most of the work so far has been put into the framework, some example apps, and the browser.
- deleted 1y ago[deleted]
- binocry 1y agodamn this is really good. I hope the register folk sees this.
- akash100x 1y agoso cool! building from past 6 years (impressive)
- spuz 1y agoWhat ideas do you employ around security? Do apps have full access to memory? To hardware? Is there a permissions system? Sorry I'm not that familiar with how microkernels work.
- monax 1y agoApps don’t get full access to memory or hardware. The kernel only maps what they’re allowed to see. Drivers live in user space, and apps talk to them through capabilities (handles you can pass around). There’s no ambient authority, you only get access if you’ve been given the key.
- spuz 1y agoInteresting. Thanks.
- Panzerschrek 1y agoWhat about filesystem access rights? Does any application have full access to all user's files? Or only to files belonging to this particular application?
- monax 1y agoApplications will each have their own namespace, and will only have access to user files if given the right to, on a per directory/file basis
- Panzerschrek 1y agoThis is a very nice approach. You should mention it on the main page of your OS site.
- rubymamis 1y agoThe code is really well written - very understandable and modern, kudos on that! I'm curious, how come the app I just compiled works on macOS?
- monax 1y agoThe framework has a layer of OS abstraction, and uses SDL to create the window and get user inputs
- brodo 1y agoVery impressive! Do you support GPUs or is the UI completely CPU rendered? It looks really beautiful.
- monax 1y agoIt's CPU rendering, GPU is on the roadmap
- thegeomaster 1y agoWhat an astounding achievement. In 6 years, this person has written not only a very well-designed microkernel, but a build system, UEFI bootloader, graphical shell, UI framework, and a browser engine. The story of 10x developers among us is not a myth... if anything, it's understated.
- nylonstrung 1y agoAnd unlike a similar project, they accomplished it without the benefit of divine guidance. Very impressive!
- YJfcboaDaJRDw 1y ago[dead]
- speed_spread 1y ago[flagged]
- reactordev 1y agoNot with Messiah.ai :D
- kencut801 1y ago[flagged]
- Dementor430 1y agolooks like a cool project
- tampueroc 1y agoSlightly related and coming from ignorance here, but what is the general intuition for the pros and cons of a microkernel approach in OS development?
- logicchains 1y agoMicrokernels are conceptually cleaner, and easier to make secure, but in practice generally slower than unikernels.
- wucke13 1y agoGernot Heiser would strongly disagree with you on the last one :D
- mike_hearn 1y agoEvery modern commercial OS is a hybrid architecture these days. Generally subsystems move out of the kernel when performance testing shows the cost isn't too high and there's time/money to do so. Very little moves back in, but it does happen sometimes (e.g. kernel TLS acceleration). There's not much to say about it because there's never been an actual disagreement in philosophy. Every OS designer knows it's better for stability and development velocity to have code run in userspace and they always did. The word microkernel came from academia, a place where you can get papers published by finding an idea, giving it a name and then taking it to an extreme. So most microkernels trace their lineage back to Mach or similar, but the core ideas of using "servers" linked by some decent RPC system can be found in most every OS. It's only a question of how far you push the concept. As hardware got faster, one of the ways OS designers used it was to move code out of the kernel. In the 90s Microsoft obtained competitive advantage by having the GUI system run in the kernel, eventually they moved it out into a userland server. Apple nowadays has a lot of filing systems run in userspace but not the core APFS that's used for most stuff, which is still in-kernel. Android moved a lot of stuff out of the kernel with time too. It has to be taken on a case by case basis.
- hollerith 1y agoCan you explain why TTY-PTY functionality hasn't been moved from the Linux kernel to userspace? Plan 9 did so in the 1990s or earlier (i.e., when Plan 9 was created, they initially put the functionality in userspace and left it there.) I don't understand that, and I also don't understand why users who enjoy text-only interaction with computers are still relying on very old designs incorporating things like "line discipline", ANSI control sequences and TERMINFO databases. A large chunk of cruft was introduced for performance reasons in the 1970s and even the 1960s, but the performance demands of writing a grid of text to a screen are very easily handled by modern hardware, and I don't understand why the cruft hasn't been replaced with something simpler. In other words, why do users who enjoy text-only interaction with computers still emulate hardware (namely, dedicated terminals) designed in the 1960s and 1970s that mostly just displays a rectangular grid of monospaced text and consequently would be easy to implement afresh using modern techniques? There a bunch of complexity in every terminal emulator for example for doing cursor-addressing. Network speeds are fast enough these days (and RAM is cheap enough) that cursor-addressing is unnecessary: every update can just re-send the entire grid of text to be shown to the user. Also, I think the protocol used in communication between the terminal and the computer is stateful for no reason that remains valid nowadays.
- drob518 1y agoLooks beautiful.
- j1000 1y agoHow devs can create something like this with normal time constrains? I couldn't squeeze this kind of project having day to day 9 to 5 job as dev.
- reactordev 1y agoObviously not her first rodeo... I dove deep into the code base. Found lib-sdl. Found impl-efi. Found co_return and co_await's. Found try's. Found composable classes. Found my codebase to be a mess compared to the elegance that is this. We are not worthy... The modules... :chefs-kiss:
- hisamafahri 1y agodang, so cool
- FerkiHN 1y agoWow, you did it yourself?! This is just wow, as a C/C++ developer I know how to create an OS, but at most I could come up with an idea, but writing all this myself, I have no words.
- monax 1y agoI had some help for the browser engine
- kirito1337 1y agoWhat a great project.
- nerflad 1y agoI find every project of this nature so so beautiful and incredible. Congrats.
- kookamamie 1y agoLooks great. I did pick up pretty strong NIH vibes, though. As an example, would CMake or Meson not work as a build system?
- monax 1y agoMeson doesn't support C++20 modules, cmake is not my cup of tea, and most importantly it's fun hobby project so I do what I want :^)
- kookamamie 1y agoMakes sense. How have you found C++20 modules?
- boogerlad 1y agoThis is your chance! As a clean slate design, you can abandon the concept of a hierarchal file system and replace it with rdbms.
- monax 1y agoYeah, an RDBMS would be nice, I still need to figure out the concrete implementation.
- throw10920 1y agoI would love to read a writeup when you do - I've been wanting to build a hobby OS with a database-like storage system and have been paralyzed about the design.
- kragil 1y agohttps://www.silicon.co.uk/data-storage/database/tales-tech-history-pick-operating-system-214939/amp https://www.silicon.co.uk/data-storage/database/tales-tech-h... Just inspiration.
- the__alchemist 1y agoThank you! We need more GPOS options. We have been entrenched in the main 3. I think there's lots of room for making something better. [misaligned incentives?]
- anta40 1y agoLooks awesome. Consider it bookmarked. I'm on macOS, and still no luck building the code. But anything which doesn't involve building a custom GCC easily gets my vote :)
- hu3 1y agoThis is the kind of project that allows you to have a 2 line CV: contact: your e-mail skills: project website and you'd get hired in a ton of places.
- darkamaul 1y agoAwesome project! Looking forward to seeing it included in the next CCC CTF, like SerenityOS [0]. [0] https://2019.ctf.link/internal/challenge/1fef0346-a1de-4aa4-8df9-2d18229c6dbb/ https://2019.ctf.link/internal/challenge/1fef0346-a1de-4aa4-...
- thorn 1y agoKudos to the owner of this project. Well done. It is really modern C++ (with modules) and improvements on top. I see that it introduced some kind of GC and other high-level quality-of-life improvements. I noticed stuff like `co_try` and `.unwrap()` and `async`. Was it inspired by Rust? What plans do you have with this project?
- ktosobcy 1y agoHmm... what about wider hardware support? How difficult would be to port/adapt/etc libre drivers from other OS (linux comes to mind) considering SkiftOS is microkernel? :)
- TinkersW 1y agoThat looks like alot of work, am surprised they built a custom build system, tho given the state of C++ build systems I can't really blame them. Also why do OS devs seem to have a thing for making browsers? Shouldn't browsers be mostly agnostic to the OS? The UI looks nice :)
- monax 1y agoBrowsers are just application runtime ;)
- DesiLurker 1y agoapologies for offtopic rant, but why cant they (palmsource/??) just open source BeOS codebase? what possible gain they can have by holding onto 20yo codebase just out of licensing spite. honestly for all the do-gooder talk in VC community this is the easiest thing to achieve. have a funding clause that if your company dies then all rights of unfinished works goto investors and by charter opensource it for benefit of other startups. we could have had greatness many times over. rant over!
- KerrAvon 1y agoBecause it costs money to open source something as large as an OS, because you need to vet the source base to ensure that you own the rights to publish all of the source code under whichever license. To execs, it looks like throwing money into the toilet.
- DesiLurker 1y agothats a strawman, here's a summary of ownership from google: Be Inc. => Palm => PalmSource => ACCESS Co. this is ho many times they moved it around or sold it. each one of these times they had to do due diligence before same as you do with any ip acquisition. okay if you dont want to do full opensource, how about taking a few modules and just bsd-3 or MIT-ing them. it shows Intent, how many time any VC has done this in last 20 years? none that I recall. this is the problem, big do-gooder talk about changing the world, but at the end of day they are out to JUST make money.
- xbar 1y agoSo very lovely.
- dataflow 1y agoLooks amazing! Out of curiosity: how much (if at all) did you use AI to write code?
- monax 1y agoI was an early adopter of Copilot, but over time I found myself using it less and less. Now I’ve removed AI assistants from all my editors entirely. The way they’re integrated into IDEs feels distracting and intrusive, and honestly, I love coding, so why automate the fun part?
- userbinator 1y ago"You need to enable JavaScript to run this app." Nope. Unless your hobby OS also has a browser with a JS interpreter... which would be even more impressive.
- neilv 1y agoSkriftOS is impressive. It's very similar to a plan that I assumed I could only do as early-retirement avocation (if ever hit a startup equity lottery jackpot). I didn't imagine it could be done on the side.