IanOS is an experimental 64-bit operating system written from scratch as a learning experience. The source code is available online and the creator of the OS has made some detailed documentation available to go with the source code. This is an excellent resource for anyone who wants to venture into writing a 64-bit OS. The author makes his intention about this OS clear “I never had any intention of producing a true OS. There are plenty of those about and it would be a very foolish, or vain, person who thought that they could compete with the likes of FreeBSD and Linux. But my interest in computers isn’t practical; I just find programming them, particularly at this level, to be a supremely satisfying intellectual pursuit”.
Writing an operating system from ground up is no small feat. It involves understanding the CPU architecture, structure of a boot sector, memory management, device driver etc. When a newbie decides to learn how to write a hobby OS, the usual advice from the bearded OS gurus is “Poke around Linux kernel”. But the inherent problem with that approach is the lack of proper documentation and the overwhelming size of the project.
IanOS is a 64-bit operating system, that was created for the sole purpose of understanding the initial steps of creating an OS. The disclaimer on the project page reads:
only by a very wide stretch of the imagination could my system be described as an ‘operating system’, but it does boot, multi-tasks simple programs, and even has rudimentary keyboard and IDE hard disk device drivers”
The project page has clear instructions on how to get started. The author recommends a list of tools that he used while developing this OS and some links to the required documentation.
Tools:
- Host OS – Any flavor of Linux
- Emulator/Debugger – AMD’s SimNow, qemu
- Compilers – gcc
- Editors – Hex editor and an IDE
- Disk image – mtools
The documentation page is constantly growing and has very specific information about the source code. This definitely makes it easy to follow the code and understand the different sections. It is a perfect place for anyone who is waiting to get started on writing a OS or simply to understand the low-level intricacies of an operating system.
Another great resource for understanding the OS internals and Computer Architecture is Gustavo Duarte’s articles on System Internals. These are some well-written series of articles that explain in detail the Memory Management, CPU Cache, CPU Privileges, Kernel Boot Process and other OS relevant subjects.
Great project and it sounds like fun, but claiming that the Linux kernel is undocumented is utter nonsense.
http://www.amazon.com/Linux-Kernel-Nutshell-OReilly/dp/0596100795
http://www.amazon.com/Professional-Linux-Kernel-Architecture-Progra…
http://www.amazon.com/Linux-Kernel-Development-Robert-Love/dp/06723…
http://www.amazon.com/Understanding-Linux-Kernel-Third-Daniel/dp/05…
http://www.amazon.com/Linux-Kernel-Programming-Michael-Beck/dp/0201…
http://www.amazon.com/Linux-Kernel-Primer-Architectures-Development…
http://www.amazon.com/Linux-Device-Drivers-Jonathan-Corbet/dp/05960…
http://www.amazon.com/Linux-Core-Kernel-Commentary-2nd/dp/158880149…
http://www.amazon.com/Linux-Kernel-Primer-Architectures-Development…
And there are lots more, not to speak of the huge amount of documentation available online.
So, please stop taking jives to score points with the peanut gallery.
I wouldn’t say utter nonsense. Take a look at the kernel tarballs themselves – yes, there’s some documentation there, but not a whole lot – especially early on in the boot process. And most of the books on the Linux kernel skim over the boot process fairly quickly giving little detail or insight into any of it.
I’ve tried that route. It doesn’t work too well.
So while I haven’t looked that the source for IanOS yet, I’ll probably do so in the next week or so and if it delivers what the summary says, it’ll be an invaluable resource to add to my collection.
The source code for Linux is obviously very complete, working code (as is the source for FreeBSD, or Darwin). But the problem is it’s very complicated and not really easy to understand; it does too much for educational purposes. There are several excellent books covering the design of these OSes, and I provide references to some of them on my web site, but they are hard reading.
I just wanted to be able to get the processor into 64-bit mode, set up Page Tables, Interrupt and Segment Descriptors, and then take it from there. I found it very difficult to find examples of how to do this (although there are plenty for 32-bit code), which is why I thought I’d share what I had learnt. Having got there I have taken it a little further, and will probably continue to do so. But it’s just for fun; it’s never going to be a serious OS.
Isn’t that what Linus said about Linux?
Any how…thanks for the great work!
Thanks for your kind words Amjith. I wondered why my web site had suddenly received so many hits! I haven’t updated the site for a while, although I have been doing further work on the project. This will be a spur for me to do so.
Forgive the minimalist style of my web site, but I’m on a limited-bandwidth free package, so thought it best to avoid all the bloat that you normally get.
Apologies to anyone who might have tried to contact me via the e-mail address on my site. There seems to be a slight problem with it at present. I’m looking into it now, so if any e-mails to me have bounced do try again in a little while.
Ian
I love minimalist styled web pages. Most of the modern pages have a lot of crap and little content.
please, don’t misunderstand me- but why did you started this project? Minix 1 and 2 were created for it.
regards
sz
64-bit! Just wanted to play about with 64-bit processors and low-level programming of them. Minix (is now up to 3) is exclusively 32-bit, I believe. When I started I couldn’t find many resources detailing the process of booting into 64-bit mode, hence I thought others might find this of interest. That’s all.
Ian
I think your minimalistic approach is also the most efficient approach for a learning resource. Great work btw, keep it up. I’ll be looking forward to see more updates.
Very wise words! That is IMO the right frame of mind if you are going to create a new OS on your own nowadays, not “My OS will take over the World”.
But, make sure it is designed in such a way that if it does take over the world, the process is easier
Besides, you don’t have to compete with the likes of Linux to be a true OS.