Minix vs Linux for Learning Operating System Design?
Asked Answered
S

5

10

I wish to learn operating system design. I was wondering if I should tackle Minix or GNU/Linux in the process? I like books so I would be following mainly a book, though video resources (presumably videotaped lectures) would also be welcome.

I have formally studied C and C# and can program small to medium sized programs in them. I also have a very basic understanding of data structures.

If I take the Minix route, should I tackle version 2 (simpler??) or version 3?

Saguache answered 24/11, 2011 at 9:45 Comment(3)
can program [...] medium sized programs in them -> I would contest this opinion if you have only formally studied them and have only a very basic understanding of data structures. For me, a medium sized programs is in the 100kLoC regions, which means you need a good grasp of how to organise the code, how to chose good names for your entities, namespaces, good class design, and intuition based on years of experience. It boils down to: If you have not written a good and clean medium sized program yet, you can't know whether you are already able to.Maiga
@phresnel I think your definition of competence in programming would exclude most University students majoring in Computer Science; most of whom are actually expected to go through an operating systems programming course.Saguache
"can program" is not the same as "programming competence". I've written games and stuff in the beginning, they worked well, but nowadays, w.r.t. good programming style and idiomacy, I would grade them as "fail".Maiga
D
17

I would go for the Minix route, just because of my personal experience with it. Minix is very straightforward, and written from an educational point of view. Linux kernel on the other hand has been around for so long, and is therefore optimized heavily. I do not think that it is a good start.

I wouldn't worry too much about which minix version. The concept remains the same. With the newer versions you are able to run X on it, which can be helpful, but at the same time adds more complexity. Just go with the version you find a good book of.

Destined answered 24/11, 2011 at 9:48 Comment(7)
This time it's Linux only, not GNU/Linux, I think :)Maiga
@phresnel hmm, not sure, GNU Hurd is a kernel as well right? So GNU/Linux in this case would mean GNU Kernel Or Linux kernel. Right?Destined
Linux is the kernel, GNU/Linux is the Linux kernel coupled with the GNU tools. GNU Hurd is both kernel and tools, both made by FSF.Beabeach
I understand he wants to study Kernels. Otoh, I've missed when haziz said 'GNU/Linux'. Wouldn't it be GNU/Minux vs. GNU/Linux vs. ... then? Oh, this is confusing under undercaffeeination.Maiga
I typed GNU/Linux out of habit, most of what I would study is the Linux kernel, though I would wish to also cover some of the basic GNU utilities, such as gcc, gdb and GNU Make at some point, probably later. I am not ready to tackle compiler design just yet, at least not while tackling the kernel. If I do choose to study the Linux Kernel I may also opt for an older version (??2.4 or even much earlier) to keep it simple. It will depend on which book or resource I pick since I would likely try to match the version of the kernel covered.Saguache
Minix has also been around for long... but Linux has been worked on more.Debora
Minix came first. And has been worked on a lot.. But it's been kept small by design. It is what Linus learned, tis a great start.Protostele
M
7

Operating Systems: Design and Implementation covers Minix, so this might a good argument pro Minix.

Without having touched this topic myself, Linux is rather large (last time I checked 10 millions line+, though of course you would not have to study all of it), and Minix uses a microkernel architecture with separate modules, so it might be easier to grasp.

I would go for Minix.

(on the other hand, O'Reilly has a number of books on Linux; but I think I would still go with Minix, having that phat book as the reference)

Maiga answered 24/11, 2011 at 9:50 Comment(2)
+1 for the book - it's very nicely structured, this is the book I used as well, the only problem was that I had the 2nd edition (the one for Minix 2), not the one for Minix 3.Jellybean
I am attracted to Minix due to Tanenbaum's book and history of it's use as a teaching tool. It is partly why I asked the question, I use Linux day to day though.Saguache
A
5

At an internship I did, I had to change the hard drive driver in Minix so that it serves requests using the elevator algorithm instead of first-come-first-served. I was supposed to do it in Minix 2, but I wanted to do it in Minix 3 because I never like using old technologies.

In the 2 months I was working on it, the most frustrating thing was that Minix 3 took about 20 minutes to compile in VMWare on a laptop with an I5 processor, 4GB of RAM running Windows 7. Finally, after 2 months, I gave up on Minix 3 and switched to Minix 2, which compiled in about 20 s.

Now I'm not saying there couldn't have been something very wrong about how I was compiling the system, but I was trying really hard to speed it up with no success.

Let me just say that at the time I had just received my Master's degree in computer science and I had 5 years of intensive experience with programming in C (just so that you don't think I'm a self-taught programmer that just decided to jump in to programming by redesigning an operating system :D )

EDIT: In the end, I suggest you to try compiling Minix 3 to see how it goes for you. If you have more luck, definitely go with this one because it has more modern OS concepts, on the other hand, if you are a complete beginner, you'll probably learn tons from Minix 2. I did.

Ardithardme answered 24/11, 2011 at 9:55 Comment(0)
O
0

As other posters have said, starting with Linux can be difficult because it is now so large and complex that the barrier to entry has sky-rocketed. But, if you do choose this route, I recommend starting with one small subsystem and focusing on that.

Overstay answered 24/11, 2011 at 11:47 Comment(0)
I
0

There are other possibilities, FreeBSD or even GNU/Hurd (or even your own toy kernel). And it depends of what you really want to learn.

If you know Linux and what to learn how to write drivers, writing your own Linux driver kernel module is sensible.

It also depends upon your precise definition of Operating System. This is not necessarily the same as an OS kernel

Not all operating systems are "Unix-like", e.g. coyotos, Kangaroo, ... See also tunes.org

J.Pitrat's book Artificial Beings (the conscience of a conscious machine) have interesting insights on what an OS could be.

Inflectional answered 24/11, 2011 at 11:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.