Show HN: Very basic Unix-like operating system built when I was younger
github.com
github.com
In other words: "I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu)..."
I wouldn't even know where to get started on building an OS, so I think this is pretty awesome.
Some 'for dummies' step by steps on getting this to run would be great :).
http://pdos.csail.mit.edu/6.828/2012/
I took Dan Tzafrir's version of this course at Technion last semester. Best. Course. Ever!
[1] http://www.metafilter.com/119424/An-Operating-System-for-Son.... .... "bro i think you can be proud of the flight simulator you wrote for the operating system you also wrote"
Here's some great resources for OS dev, if you wanted to take this further (or if anyone else in this thread fancies a shot):
- http://wiki.osdev.org/Main_Page
- http://en.wikipedia.org/wiki/Master_boot_record (MBR layout)
- http://en.wikipedia.org/wiki/File_Allocation_Table
- http://www.ctyme.com/rbrown.htm (full BIOS interrupts list)
- http://www.emu8086.com/interrupts.html (much friendlier BIOS interrupts)
I came back about 4,5 years later to that school, then as a teacher of their newly founded IT classes. Chuckle.
To get back on post, this guy making his own OS is a wizard.
There are so many things to share that are usually exclusive, they should be pushed back into the 'OS'. So many lame devices surface a serial streams - the OS doesn't allow sharing those. Lots of OSs don't allow multiple clients access to a webcam, microphone or other capture devices.
Even the model of 'process, thread, priority' is inadequate today. I'd much rather schedule latency than priority. And I'd like virtual hardware to be mapped into app space to remove copy/interrupt/stack switch time from drivers (and reduce latency to zero). I'd like to schedule network traffic across purposes/apps.
I'd like the 'file system' to abandon the ceremonial file tree, and expose a persistent object store. Objects could (should) be uuid-labelled at root, have no fixed location. The local file system could be thought of as a cache of resources, with the authentic directory cloud-based. Access should be through attributes and relations.
I guess my point is, there's so much more to what an OS should be, than page table/scheduler/disk drivers.
Does the multiplexed access need to be at the kernel level? It could be done with a user space server.
> And I'd like virtual hardware to be mapped into app space to remove copy/interrupt/stack switch time from drivers (and reduce latency to zero).
There have been efforts to eliminate copies, and to allow direct access to network devices from userspace.
> I'd like the 'file system' to abandon the ceremonial file tree, and expose a persistent object store. Objects could (should) be uuid-labelled at root, have no fixed location. The local file system could be thought of as a cache of resources, with the authentic directory cloud-based. Access should be through attributes and relations.
I'm in agreement that the filesystem tree is problematic. It's inefficient to traverse a directory tree when it's structured as a persistent linked list, and it's brittle. The tree is intuitive, but you could create a tree interface even if there isn't a literal metadata tree on disk.
You might be surprised by all of the zany things that have been proposed and tried in the OS community. The abstractions that have stuck around are oldies but goodies that are simple but work. A lot of things don't need to be done at OS level, like cosmetic changes to the interface of some resource. You can usually do that in userspace. Linux is pretty remarkably flexible with filesystems, too. FUSE is about as flexible as you can get.
The best argument to change the kernel is when something simply can't be done efficiently in userspace. If there's a way to implement something useful in userspace on top of existing kernel functionality, that's the way to go.
In particular, no single OS can reimplement a distributed object store by themselves - there has to be an ecosystem. Somebody big has to invent that. Then, how to shim that under the file tree without changing the OS? E.g. I want an entire enterprise to get their apps from ... wherever its convenient for them to be stored today. Not from c:\xyz on their local disk. And I want some subset of my users to change to a new version without obsoleting the old, by changing the directory record in my enterprise cloud, NOT by triggering some binary update monstrostrosity, then writing another script to back out the update etc.
I'd say its universities that are letting us down, by continuing to teach the obsolete ideas current in the 1980s.
Do you mean like a SQLite file? You have to consider how much there is to gain from embedding this stuff deeper.
> In particular, no single OS can reimplement a distributed object store by themselves - there has to be an ecosystem. Somebody big has to invent that. Then, how to shim that under the file tree without changing the OS? E.g. I want an entire enterprise to get their apps from ... wherever its convenient for them to be stored today. Not from c:\xyz on their local disk. And I want some subset of my users to change to a new version without obsoleting the old, by changing the directory record in my enterprise cloud, NOT by triggering some binary update monstrostrosity, then writing another script to back out the update etc.
This doesn't necessarily need to be in the OS. Look at it as a technical problem to solve. Is there a way to meet this need without changing the OS? There's usually a creative solution.
I got a floppy to boot into my os and print hello world and I learned a ton about how to program a processor. It was fun. Oh the crazy things you do as a teenager...
I thought you might be interested in seeing what he's (and I are) working on now. (We've got some cool open source components here: https://github.com/FriendCode/, that you might want to check out).
Chrome Version 29.0.1547.65 Ubuntu 12.04.3 LTS
http://www.cs.berkeley.edu/~kubitron/courses/cs194-24-S13/
Its pretty cool. Unfortunately the Linux VM used for development does not exist any more. But Still cool.
freefull@freefull-hp ~/c/o/devos> make all
Building Kernel
make -C ./kernel
make[1]: Entering directory `/home/freefull/code/other/devos/kernel'
makefile:9: runtime/Makefile: No such file or directory
makefile:10: core/Makefile: No such file or directory
makefile:11: modules/Makefile: No such file or directory
makefile:12: arch/x86/Makefile: No such file or directory
make[1]: *** No rule to make target `arch/x86/Makefile'. Stop.
make[1]: Leaving directory `/home/freefull/code/other/devos/kernel'
make: *** [all] Error 2 make all runtime/cxx.cc:74:41: error: ‘operator new’ takes type ‘size_t’ (‘unsigned int’) as first parameter [-fpermissive]
runtime/cxx.cc:84:43: error: ‘operator new’ takes type ‘size_t’ (‘unsigned int’) as first parameter [-fpermissive]
make[1]: *** [runtime/cxx.o] Error 1However what does not yet work is booting the image with Qemu.
It was very fun experience. Probably that was my most enjoyable time in programming. I learned a lot about many things: OS internals, compilers, device drives, software engineering etc. Also spent good amount of time in exploring C++ object mode. Much later I wrote an online (short) article on C++ object model and how C code is translated into assembly (http://www.avabodh.com/cxxin/cxx.html, http://www.avabodh.com/cin/cin.html)
Also, how does one even start to write their own OS, I mean after you say "I'm going to write an OS form scratch", what's the first step, what's the first line of code and how do you figure out which components you need to implement and how? This is what really boggles me as a 30 year old crud guy, how do you design these sort of systems from scratch (OS's, emulators, compilers, etc)? It just makes me feel...completely useless compared to guys like you, you are so far ahead of the curve its not even funny, I could never reach your level.
Congratulations.
I took a shot at os development and it took me almost a month of reading to get something that boots and handles interrupts (https://github.com/raaapha/sos), and I'm in college. Now _that_ is "very basic"!
Looks like you've worked on the expected base functionality.
https://github.com/SamyPesse/devos/blob/master/kernel/arch/x...
Does anyone know of something similar for x64? Or maybe ARM? Online course materials would be nice.
http://www.stanford.edu/class/cs140/projects/pintos/pintos.h...
http://glider-kernel.sourceforge.net/
Unfortunately, I'm not allowed to put my 236376 Operating Systems Engineering course project online, due to the licensing issues with JOS-based project code.
So you can boot the whole thing with Vagrant. Check out the latest commits.
(Sorry for my english, I'm french)