10 ms·
I'm pretty impressed that 37 people are capable of writing an entire OS with a gui in under a year. Looks really cool.
by qz_ 11y ago
I'm pretty impressed that 37 people are capable of writing an entire OS with a gui in under a year. Looks really cool.
- teamhappy 11y agoOperating systems aren't that big, and if you know your stuff, I'm sure it's not too hard to pull off. Here's an example I borrowed from StackExchange: According to cloc run against 3.13, Linux is about 12 million lines of code. 7 million LOC in drivers/, 2 million LOC in arch/, and only 139 thousand LOC in kernel/. (http://unix.stackexchange.com/a/223753 http://unix.stackexchange.com/a/223753) Edit: Would be nice to have the numbers for the latest Minix release for comparison. Does anybody know how big their core team is? (The kernel is something like 15k LOC IIRC.)
- Manishearth 11y agoBtw, if anyone is interested in learning how to write an OS, and interested in Rust, check out https://intermezzos.github.io/ https://intermezzos.github.io/. It's a "learning OS" in Rust, with a companion book. Incomplete, but a good start.
- caipre 11y agoThis looks outstanding, thanks for the link.
- steveklabnik 11y agoProject lead here. I haven't had time in the last few weeks to work on this, so the book is pretty far behind the kernel itself at the moment. Playing the long game. I was hoping to do some more today, in fact...
- BinaryIdiot 11y agoIt looks really interesting! I'm going to be looking at it probably next weekend :)
- steveklabnik 11y agoAwesome. Please open issues if anything is confusing!
- caipre 11y agoI'm reading through now, and would love to contribute. I've been trying to break into this space (systems programming, especially OS and compilers) for a long time and the biggest hurdle for me has been to actually do it. I really appreciate that this project is focused on explaining just enough to jump in, complemented with nods to further resources that can add on to whatever knowledge the reader brings. Steve, thanks for all your work on this and with Rust. Your attitude toward teaching and your writing ability go a long way in encouraging people to learn and in having the lesson be worthwhile.
- steveklabnik 11y agoThanks so much. We had a few contributors at the start, but once I lost time, so did they. Would be very happy to have you involved :)
- qz_ 11y agoThis is great and so much clearer than osdev wiki. I've wanted to learn os development for quite some time and I think this is where I'll start.
- steveklabnik 11y agoThat is exactly my goal. Thanks :)
- Animats 11y agoThe "everything is a URL" concept is interesting. QNX uses pathnames in a somewhat similar way; programs with the privilege to do so can register to own some portion of the pathname space, and requests with such pathnames go to that program. The kernel has no idea what pathnames mean. This gets file systems out of the kernel. It looks like Redox is doing something similar, but not enough of the documentation is written yet for me to tell quickly.
- steveklabnik 11y agoTo be clear, lead on intermezzOS, not Redox. I do some small editing to their docs but don't regularly contribute.
- deleted 11y ago[deleted]
- olalonde 11y agohttp://littleosbook.github.io/ http://littleosbook.github.io/ is another good resource though it uses C.
- iagooar 11y agoWarning: I have no idea about systems programming. I understand that the amount of lines of driver code comes from the variety of devices. But still, it looks completely unbalanced, when compared to the kernel code itself. So I have some questions here: 1) Shouldn't there be common interfaces / abstractions for most of the devices? 2) If they exist, could they be improved somehow? 3) A bit unrelated, but how fun / interesting is it to develop driver code?
- bluecmd 11y agoThere are. USB, SATA, SCSI and such share a lot of code between the drivers - but drivers are huge.
- k__ 11y agoI would guess, that most of the size comes from history. Like, once it seemed a good idea to have it like that and later people found out there are a bunch of things missing. Now many of them have to be implemented on the driver side over and over again.
- mrob 11y agoHave you read the USB specs recently? They're publicly available here: http://www.usb.org/developers/docs/ http://www.usb.org/developers/docs/ Just making a standards compliant implementation takes a huge quantity of code. And with a standard this complex people inevitably get it wrong, so you'll need workarounds for all the broken devices too.
- tracker1 11y agoNot just with hardware interfaces, but even in pure software... I wrote an LMS that the core of which was used by a fortune 100 company, and a few airlines for nearly a decade... I literally left out about 1/3 of the SCORM spec, and implemented one piece badly... it wasn't until about 8 years in that the missing piece was even an issue, and the part I got wrong never became an issue. In the end, you understand as much as you can, implement what you have to, and do your best to get through it... and even then, someone will mess things up on some end or another... to this day, I'm surprised that SCORM was synchronous... hell, it feels like they're half the reason XHR has a sync option. I feel the same way when looking at terminal emulators... sigh, so many things to implement to get something useful, even if you're only looking to get a small subset working.
- pmlnr 11y agoActually, they can be really small... http://kolibrios.org/ http://kolibrios.org/
- zongitsrinzler 11y agoAre you the guy that says stuff like "How hard can it be?" and "It shouldn't take that long" in meetings?
- carussell 11y ago> Does anybody know how big their core team is? Right now it's about 2.
- jotux 11y agoI worked at a company that made POS terminals on the OS development team. We had a proprietary OS based loosely on UNIX that was ~100KLOC (kernel). It was largely designed by 3-4 core developers and maintained by ~12 embedded software engineers (in addition to drivers, apps, UI, etc).
- bane 11y agoit's actually a pretty common task in undergrad CS programs for an individual or a small group (3-4 students) to write an *nix-like OS from the ground up, including most of the core utils, scheduler, process management, etc. This is obviously much more full featured (includes a GUI), so this is actually a very nicely sized team for the task.
- notalaser 11y agoOurs didn't have a GUI. It took us less than a year to write and the team was never larger than 6 people. It's less complicated than it seems at first sight. There are a lot of things about machines that you need to understand, but the technology itself is relatively well-understood and sane practices are encouraged. It blows my mind that less than twenty people can string up something non-trivial with Node.js et co.. Operating systems are trivial in comparison.
- joepie91_ 11y agoAs somebody who develops significantly complex in Node.js and considers operating systems to largely be black magic, I'd love to have a chat about this some day, and compare notes :)
- maaku 11y agoRead the MINIX book. It's basically a walk-through (with source code) of entire operating system.
- gravypod 11y agoThe book is over a hundred dollars. As someone who is working on a simple os and a college student, this saddens me. I'll have to see if my library has one.
- abiox 11y agowell, it is a textbook after all. perhaps the textbook industry isn't so virulent in your neck of the woods.
- bigtunacan 11y ago@gravypod if your college library doesn't have it you should ask them if they can get it through interlibrary loan; most colleges (in the USA) participate in this program which gives you access to virtually every book ever printed.
- jakub_h 11y agoHave you heard of Oberon? That's like three people in a year. Including building the computer. ;)
- ape4 11y agoAnd rust only hit 1.0 on May 15, 2015 (I looked it up https://en.wikipedia.org/wiki/Rust_%28programming_language%29 https://en.wikipedia.org/wiki/Rust_%28programming_language%2... )
- deleted 11y ago[deleted]
- jroesch 11y agoIts actually much easier then it sounds, we had an undergrad write an entire windowing system on-top of implementing the rest of the OS for undergraduate operating systems at UW in a single quarter (2.5 months~).
- jstimpfle 11y agoAlso relating to the whole thread, I think these kinds of statements are dangerous. What is a "windowing system" here? There is a huge spectrum. If a windowing system were so easy, why has Wayland taken such a long time? It's best to give a link to the project so people can see what problems were actually solved and how useful it is in practice. I have been thinking hard about a simple plain text file format and associated tools for the last couple months. Sounds nowhere near as impressive. Yet I hope the end result could eventually make a practical difference.
- nickpsecurity 11y agoWirth and a few others went to Xerox to see their personal computer with GUI that Steve Jobs also envied. They were told they couldn't buy it. "So, I built one..." (Wirth) http://www.cfbsoftware.com/modula2/Lilith.pdf http://www.cfbsoftware.com/modula2/Lilith.pdf Lilith was a custom computer with all kinds of hardware. The mouse eventually inspired Logitech. The software included a safe language (Modula-2), its compiler, an OS (Medos-2), a relational DB, and some other stuff. The trick was safe language, modularity, and simplicity in implementation details. Two or 3 people over a few years. Later, that turned into the Oberon series of languages, compilers, and OS's. The extensions or ports usually took 1 or 2 students months to a year or two to pull off. Last one they released IIRC was A2 Bluebottle OS. Primitive, but usable. I keep telling people to rewrite it in other safe, C alternatives to save them work. Students got it done fast so I'm sure hobbyists could too. https://github.com/Ignat99/a2 https://github.com/Ignat99/a2
- vram22 11y agoInteresting. I had read about Oberon (the OS) and probably Lilith in an old BYTE magazine issue years ago.
- PaulRobinson 11y agoYou'd be surprised. There are lots of people writing operating systems as hobbies. There's a wiki to get you started if you're interested: http://wiki.osdev.org/Main_Page http://wiki.osdev.org/Main_Page