How to write a simple operating system
mikeos.sourceforge.net
mikeos.sourceforge.net
...and indeed, this page has no ads and is in a very readable style, although it's actually quite new.
"How to write a simple operating system with node.js, Angular, Bootstrap, Electron, and MongoDB"
https://sourceforge.net/blog/sourceforge-acquisition-and-fut...
I wouldn't go as far as calling it a ghost town, but... how do you feel about google code links?
https://github.com/SamyPesse/How-to-Make-a-Computer-Operatin...
Disappointing...
https://web.archive.org/web/20140719115200/http://mikeos.sou...
Maybe even (2011): https://news.ycombinator.com/item?id=2100115
Design a decent computer first, then write an OS for it.
1. Most sample code out there for "real" OS's might be x86. Most projects that aren't embedded will target it. So, might bite the bullet for that reason.
2. Other reason is if the end goal is to improve software on x86 hardware. As in, learner explicitly wants to take advantage of high-performance, x86 chips or code.
A shortcut might be porting more sample OS's to non-x86 CPU's. They learn each thing for simple architecture followed by ugly one later. Alternatively, abstract away what one can like Fluxkit project did. That was how a number of OS's were built in high-level languages without having to redo all the low-level stuff.
http://www.ethoberon.ethz.ch/native/
They also did one, Active Oberon System, based on a multi-threaded language called Active Oberon. The latest version of that was A2 Bluebottle. I ran its ISO in VirtualBox a year or two ago to get a bare-bones, but fast, experience.
http://www.ocp.inf.ethz.ch/wiki/OCP/Downloads
You might also love the alternate history we missed in the Juice project to replace Java applets (or todays JS apps) with Oberon apps sent as compressed, abstract-syntax trees. If you know how fast Go is, then you'll know what we lost when it got ignored.
>" If you know how fast Go is, then you'll know what we lost when it got ignored"
I am intrigued by that statement but I don't understand it. Can you elaborate? Cheers.
So, with Juice, you're looking at getting an Oberon program or subset of Go delivered to your computer as compressed source, type-checked + compiled in a second, and then running safely at native performance. Much better than Javascript or Java applets. Would've had way fewer vulnerabilities, too, since Oberon effectively has no runtime except the GC. It's also memory-safe.
EDIT: Looking at Pascal stuff, I found an example of Wirth-style, compile speed in a Delphi discussion. Delphi was the VC++ alternative from Pascal family. One commenter on HN talking a legacy codebase praised compile speed: "a full build of 2 million lines takes less than a minute on a single core." That's for an exe with no VM's, dependencies, etc that runs on vanilla x86 & win32. Or alternative platforms with FOSS Lazaurus.
I remember reading that Go took some inspiration from Oberon.
This is a good info-graphic on where Oberon and some of the Wirth languages fit in the Algol tree if anyone else is interested:
https://www.quora.com/Are-all-programming-languages-based-on...
Funny to read how PC memory can be "millions of bytes on modern machines". To be fair, I was using a computer with only 128MB as recently as 7 years ago :-)
The best class I ever took when I was an undergrad was a class where we built our own OS for a Data General Aviion workstation. Our systems staff was already under contract to help port 4.3BSD to the Aviion, and they had tons of test hardware and docs. So one of the group taught an OS class where whey basically turned us loose with a cross-toolchain and a manual and let us hack all semester. I think by the time we were done, we had something that booted and interacted with a very basic shell (but could not fork, no multi-tasking, no mem prot, etc).
If it were not for this class, I think the more theoretical OS class that I took later in grad school (all dreadfully boring queueing theory style stuff) would have turned me off to doing OS work. Instead, I've had a career doing lots of low-level stuff (drivers, OS ports to new CPUs, network stack improvements, etc).
- Andrew Tannenbaum's MINIX, and his Operating system books
- The OSDev wiki: http://wiki.osdev.org
It's hello world in assembly, loaded onto the first sector of an emulated floppy. That's neat, but nothing to do with operating systems. Other than you've now learnt the very first stage of bootstrapping from a floppy disk back in the 90s. Which is cool, and good info to know and start out with.
I get the vast majority of people seeing this post have probably only ever experienced nodejs, or Ruby on Rails or something equally high level. But this is trivial with respect to an operating system or even a boot loader.
For anyone seriously interested in building something less trivial, I recommend starting here: http://wiki.osdev.org/Getting_Started
I think we both have our biases.
An operating system is everything needed to run a machine, a kernel is the foundation on top of which all that user space code runs.
So from a unix perspective everything in /usr/bin /bin /usr/local /etc, /boot and whatever other directories are there after you install makes up the operating system. Whatever you install after you get the base system up and running are applications, the programs we run on top of operating systems.
Now, the line can get a little blurry: is 'X' part of the operating system or not? Is your window manager, are the various built ins? Probably yes, but not always.
Is a text editor part of your OS? Probably not, but there is a good case to be made for the fact that without a text editor of any kind an operating system is fairly useless. But that doesn't make 'libreoffice' or 'sublime' part of your OS, those are applications.
For myself, I draw the line where a minimum base install stops, so everything up to and including window manager for a desktop machine (for a headless machine or server much less than that).
From a very technical perspective you could have an operating system that consists of just a kernel and one user space program, in that case the kernel really would be the entirety of the operating system. But that's a pretty rare case (though it can be done).
This is all written from a UNIX/Linux perspectie, for OS you might draw the lines a little different and for MS/Windows different still. But those basic principles apply.
What you are trying to get at is that everything in userspace is not part of the kernel and that is correct. But the kernel does not make a complete operating system.
This is also the reason why the whole GNU/Linux thing existed, without the userland that GNU provided the Linux kernel would have been pretty useless.
Linux is an OS, just a terrible one without any GNU.
You sound defensive.
ls? Basic sh (without the scripting part, but there are tutorials on building compilers/interpreters)? Basic init?
That's not to say these articles are bad, they're still fun, but it's like having a "simple emulator in 24 hours" that just sets up a simple GUI and doesn't actually start designing the emulator. It's technically the start of an emulator, but while that part might actually be complicated it's still not really that relevant to designing an emulator.