Page 1 of 1

OS to experiment - Focus on Distributed Operating Systems

Posted: Thu Aug 23, 2012 1:41 am
by Tapti
OK. Here's the deal.

I'm a Java software developer (please don't cringe :P) and I'm very curious about OS internals. Which operating system would be a gentler introduction to kernel hacking? My main interest is in the direction of Distributed Operating Systems.

Btw, I had studied OS at an under-graduate level and know the basics about process scheduling, file systems, etc. but it has been a while since I've done any coding in C or Assembly. [Edit - I've also been delving into the linux source code and reading up on OS stuff, on and off, over the past two years.]

I do use Linux as my primary OS at home and run FreeBSD on a virtual machine. And I also intend to go back to school and get my Masters degree in Comp Sci. next fall - if this has any bearing on the issue at hand.

So - Linux or FreeBSD or ... maybe ... something else altogether?

Thanks,
Tapti.

[Edit - Changed the post heading.]

Re: Linux or FreeBSD

Posted: Thu Aug 23, 2012 2:05 am
by iansjack
I'd go for Minix as a good, reasonably complete, OS which is simple enough to study. In conjunction with the book ( http://www.amazon.com/dp/0131429388 - seems to have got a bit pricey recently, but you may be able to find a second-hand copy) it should give you a good grounding. If you want to study a more complete OS, Linux would be your best choice, in conjunction with one of the many books about the kernel (e.g. http://www.amazon.com/Professional-Linu ... 0470343435 - just one of many). Books about FreeBSD internals tend to be rarer and more out of date.

Re: Linux or FreeBSD

Posted: Thu Aug 23, 2012 2:08 am
by bluemoon
If you aim for kernel hacking but not kernel development, go for linux as it has much more resources and tutorial on the internet. If you want to learn something on kernel, or OS development as a whole, there are other choices.

Re: Linux or FreeBSD

Posted: Thu Aug 23, 2012 2:51 am
by Tapti
Well, truth be spoken, I want to build a distributed operating system. I think (thought?) an existing OS would be a good platform to begin with, but after reading a little online I guess it wouldn't be wise to start with an operating system that didn't support "distributedness" to begin with, and try to "hack in" the support.

iansjack, I did consider Minix and would be using it right now, if I could only get it running on my system. I tried it on VMWare too, but it used to freeze randomly. I'll look it up again if you recommend Minix as a platform to do some fooling around in the "distributed world". Since it is microkernel based ... and everything is a service, I think it would be more suited for the purpose, no?

bluemoon, what are the other choices?

Thanks,
Tapti.

Re: OS to experiment - Focus on Distributed Operating System

Posted: Thu Aug 23, 2012 3:59 am
by bluemoon
To learn OS development, and I assume you got the necessary skill set, you can take the tutorials on the wiki and start your own :) and incrementally add designs and algorithm into it.

IMO it's not efficient to learn OS development by staring at an existing OS, you can get ideas and insight, but that is.

Re: OS to experiment - Focus on Distributed Operating System

Posted: Thu Aug 23, 2012 5:16 am
by Love4Boobies
It sounds like this is the book for you. It's also in our Books article, except I only added the C version---oops, I'll fix that soon.

Re: OS to experiment - Focus on Distributed Operating System

Posted: Thu Aug 23, 2012 5:25 am
by iansjack
Because of the way that it is written I think that Minix would be a good starting point for a distributed OS. Far easier to get an overall grasp of than Linux or FreeBSD and so probably easier to extend for your needs. I've never had any problems running it in a VM or on physical hardware. (In fact my first foray into OS internals was typing the code in from the first edition of the Minix book, compiling it with Turbo C, and getting it running on an IBM portable - the original sewing-machine portable. A lengthy, but educational, project.)

My main reason for recommending Minix was because of Tanenbaum's book which, to my mind, provides an accessible but comprehensive view of a Unix-style OS. The books that I have read about the BSD, Linux, and OS X kernels are more comprehensive but far harder to follow, IMO, as starter texts.

Re: OS to experiment - Focus on Distributed Operating System

Posted: Thu Aug 23, 2012 6:58 am
by Tapti
Because of the way that it is written I think that Minix would be a good starting point for a distributed OS. Far easier to get an overall grasp of than Linux or FreeBSD and so probably easier to extend for your needs. I've never had any problems running it in a VM or on physical hardware.
OK. I'll give Minix another try then. Can you please tell me which version of Minix you used with which version of VMWare (or any other emulator / virtualizer you had used)? That will be extremely helpful.
To learn OS development, and I assume you got the necessary skill set, you can take the tutorials on the wiki and start your own :) and incrementally add designs and algorithm into it.
Ahh... the temptation! :P My C skills are a year old and ASM skills a couple of years old. I have (or think I have) reasonable understandings of the OS "concepts". And since, I'm stuck in a desert land for the next two weeks, with not much on my hands, I think I'll be able to get this thing bootstrapped!
It sounds like this is the book for you.
OS concepts in Java!! :shock: :shock:
On a serious note, I'll definitely try to get my hands on it. Sounds an interesting approach. Thanks :)

Re: OS to experiment - Focus on Distributed Operating System

Posted: Thu Aug 23, 2012 8:17 am
by iansjack
Try Minix 3, whatever the latest version is, on VirtualBox. It may just be me, but I find VirtualBox a bit more versatile than VMWare. There's a guide to installing Minix 3 on VirtualBox here: http://wiki.minix3.org/en/UsersGuide/Ru ... VirtualBox

Re: Linux or FreeBSD

Posted: Thu Aug 23, 2012 11:30 am
by Brendan
Hi,
Tapti wrote:Well, truth be spoken, I want to build a distributed operating system. I think (thought?) an existing OS would be a good platform to begin with, but after reading a little online I guess it wouldn't be wise to start with an operating system that didn't support "distributedness" to begin with, and try to "hack in" the support.
Using an existing OS as the basis for a distributed operating system probably isn't a good idea; however, using an existing kernel as the basis for a distributed operating system may be a wise idea.

Mostly you'd have to figure out exactly what "distributed operating system" actually means to you (for some people, just using NFS and X on a LAN is "close enough" to distributed(!) ), then weigh the advantages/disadvantages. The advantages of using an existing kernel are relatively obvious (you'd save yourself many years of work on things like scheduling, device drivers, etc). The disadvantages depend on how close an existing kernel is to what you actually want, and losing the flexibility you'd get if you were doing it yourself.


Cheers,

Brendan

Re: OS to experiment - Focus on Distributed Operating System

Posted: Fri Aug 24, 2012 12:46 am
by Tapti
Thanks for the wonderful responses. I'm thinking things out in my head and reading up on resources online to understand things better.
Mostly you'd have to figure out exactly what "distributed operating system" actually means to you (for some people, just using NFS and X on a LAN is "close enough" to distributed(!) ), then weigh the advantages/disadvantages.
That's put very succinctly. What I have on my mind isn't really that - I'm not even thinking about an operating system targeted at the every-day users. I'll see if I can get something remotely resembling a prototype up and running, in the next ... weeks (months? years?) and then will elaborate. Don't want to sound like an idiot with fancy ideas and nothing real to show! :D

Thanks for the wonderful help. Really appreciated ... muchas gracias :)

Re: OS to experiment - Focus on Distributed Operating System

Posted: Sun Sep 09, 2012 4:35 pm
by TylerH
MIT's Xv6 might be a suitable alternative to Minix. It's an educational kernel also, and they freely distribute the accompanying textbook/commentary. I've never tried running it, so I don't know how reliable it really is, although I would think MIT is capable of building a working kernel.

You can get it here: http://pdos.csail.mit.edu/6.828/2011/xv6.html.