“MINIX is an operating system designed for ‘resource limited’ or embedded computer systems. Versions 1 and 2 were teaching operating systems upon which the famous book, Operating Systems Design and Implementation, by Andrew S Tanenbaum and Albert S Woodhull, is based and also was the inspiration for Linux. With this latest release, version 3, MINIX aims to be a complete, stable, secure desktop operating system for everyday use. Does it live up to those claims? Read on to find out.”
It’s interesting to see it described here as a ‘complete, stable, secure desktop operating system for everyday use.’ As against that, in my copy of the author’s book The Minix Book: Operating Systems, Design and Implementation, the author himself described Minix 3 as having been created mainly to teach the fundamentals of operating system design, which meant that design choices were made that sacrificed speed and stability but kept the code legible and understandable for the student. Having it here on live CD, and looking at the complete lack of software for it, I’d have to say it’s closer to the latter.
Unfortunately, it’s not that good as a teaching OS either. I haven’t been able to learn much except some of the most fundamental theories from the book, as the sort of operating system that Minix 3 is (microkernel) has nothing to do with any serious commercial operating system, so I have learned nothing about how actual operating systems are structured.
Edited 2007-03-01 23:12
While certain parts are different because of the microkernel structure, a lot of the code is very similar to what you would see in any OS, so I don’t think it’s fair to say you’ve “learned nothing” unless you really weren’t trying very hard.
Luckily, Mr. Tanenbaum’s book is not the only one available to me. Operating System Concepts has been a much better reference, and compares more concepts in cleaner language, instead of presenting the-One-True-Design.
I dare hope that it’s not that I’m not trying hard enough; this is what I’ve wanted to do since I was a little kid, and it’s what I’m paying $50K/year to get a degree for!
For instance, you can see how x86 cpus are handled – loading the OS into protected mode, switching tasks, security rings. Interrupts are handled almost exactly like in any other Unix like system. Drivers tend to be different at a high level, but if you look at them close up they would be similar. There’s a primitive scheduler. Etc.
If you’re looking at the overall architecture then maybe it wouldn’t be the best place to start, but there are tons of details that are more interesting IMHO. After all, you can learn the basic architecture really quickly – it is the details of how things work that takes a while to learn.
Edit:
I have to admit I never really read through the book itself – the class I took spent most of our time going through the code at the end with the rest spent on slides/lectures my professor made. So perhaps if I was just going through the text I would think differently.
Edited 2007-03-02 00:02
If you’re looking at the overall architecture then maybe it wouldn’t be the best place to start
Can you reccomend somewhere better, then? Right now, my primary goal is learning architecture.
If I ever want to create my own OS or work for someone else on theirs, I need to be able to understand architecture. If I know what I am doing, even if I write bad code to start, I can work on it it and improve it until it is good code; but if I can’t see the ‘big picture’ to understand what my code needs to be doing, then all my work will be in vain.
You might want to look at DragonFly BSD and Darwin both.
I recommend DragonFly because it’s designed to be less architecturally complex than the 5.x, 6.x, etc. FBSD releases.
Darwin is microkernel based with the Apple userland/GUI layered on top of it. Perhaps looking at the two will help you at this stage of study to look at the large blocks of functionality in those two common archtectures (monolithic and micro kernel).
From the hardware architecture standpoint Net BSD is what you’ll want to look at since it runs on just about everything. Also monolithic so still a good counterpoint to Darwin.
These are all BSDs though, so it may not offer as much difference between each example OS as you may want in order to get a wide scope of OS architectures. But it will show you a variety of implementations developed from the same root. And you still have your Minix CD.
You might want to look at DragonFly BSD and Darwin both.
I recommend DragonFly because it’s designed to be less architecturally complex than the 5.x, 6.x, etc. FBSD releases and thereby easier to build, maintain, debug and understand.
Darwin is microkernel based with the Apple userland/GUI layered on top of it. Perhaps looking at the two will help you at this stage of study to look at the large blocks of functionality in those two common archtectures (monolithic and micro kernel).
From the hardware architecture standpoint Net BSD is what you’ll want to look at since it runs on just about everything. Also monolithic so still a good counterpoint to Darwin.
These are all BSDs though, so it may not offer as much difference between each example OS as you may want in order to get a wide scope of OS architectures. But it will show you a variety of implementations developed from the same root. And you still have your Minix CD.
The book that you mentioned describes older Minix. Minix 3 is designed to be real world OS for real world problems.
The book I am using includes a live-on-disc version of Minix 3.
You’re not going to learn out to write an OS from studying the Linux source code. You might learn a lot about how commercial systems are architectured, but you’re not going to be able to write one.
MINIX is a nice OS from a pedagogical point of view. It teaches the important stuff (dealing with interrupts, dealing with devices, creating threads, setting up userspace, I/O, virtual memory, etc) without obscuring the concepts with optimizations.
…Minix 3 is (microkernel) has nothing to do with any serious commercial operating system…
What about QNX? QNX is a very powerful, stable, real-time OS that is used all around the world for mission critical systems and it’s a microkernel.
SymbianOS? Another mircokernel, and one that powers 2/3 of all mobile devices used today.
I don’t think it’s quite fair to say that you can learn nothing about and OS’s structure from Minix.
Woah, looks awesome. Is that a head exploding gray moire pattern i see in the backgr
I think Minix 3 is important as a real, live example of a usable true microkernel system. Some may find it spartan, but if you have used something like openBSD, netBSD, the choice of packages will suit you fine.
I HOPE the age of a zillion drivers living in the kernel code is drawing to an end. To be honest, it is great to boot up a giant, generic, monolithic kernel and have so much hardware recognized, but I do believe it compromises on stability and simplicity.
For the future, I believe a simpler, more robust kernel is the way to go. I also believe it will take a LONG time to get there.
( snip )
( quote )
For the future, I believe a simpler, more robust kernel is the way to go. I also believe it will take a LONG time to get there.
( end-quote )
I like the simple-but-robust approach too.
For those interested in microkernel OS’s, you may also want to check out MonaOS. It’s a 5 Mb download, MIT license and great GUI – very nice –
http://sourceforge.net/projects/monaos
Well worth a download.
Edited 2007-03-02 00:02
There is actually already a microkernel based os that doesn’t suck and is in pretty wide use. It is proprietary and called QNX. QNX is a realtime operating system that kicks the crap out of Linux in hard realtime usage.
http://www.qnx.com/
Minix doesn’t really have a niche. The niche it tries to go for, Linux has filled and then some.
A realtime OS like QNX would absolutely suck at some workloads, though.
I agree that Minix 3 is mostly a toy OS though.
What about Minix 3 makes it mostly a toy? I’m just curious on your perspective.
It seems obvious to me that Minix at present is no competitor to full-fledged operating systems like Linux or FreeBSD. But I’m wondering if it might make a good OS for specialized systems, such as high-availability network appliances, touchscreen point-of-sale systems, etc… The biggest downside at present seems to be a limited choice in software, but how much of that could be fixed if more open source developers got interested? Is it a real nightmare to port standard open-source software to Minix, or mainly just a question of lots of tedious, repetitive work?
Perhaps toy isn’t the right word – I just think it is a very niche OS that doesn’t really have any advantages over, say, Linux. Having a microkernel is very interesting and could be good long-term, but for the moment it doesn’t really provide any tangible benefits to end users. I still see Minix as an educational tool more than an OS I’d like to use.
Is it a real nightmare to port standard open-source software to Minix, or mainly just a question of lots of tedious, repetitive work?
When I was working on version 2, it was a real pain because it had an ancient version of cc on it and no graphical text editors. I see that the new one has gcc4 now, and since the OS is POSIX compliant it should be quite simple to port over apps.
I looked at the possibility of porting my own application to Minix 3 just after its announcement. I couldn’t do that at the time because there was no threading support. I has been tracking comp.os.minix since that time, and still there doesn’t seem to be any interest in getting multi-threaded applications to work. Almost at the same time there was an attempt to get GNU Portable Threads library to work on Minix, don’t know where it is now, though.
Edited 2007-03-02 13:07
Having a microkernel is very interesting and could be good long-term, but for the moment it doesn’t really provide any tangible benefits to end users.
Did you miss the parts in the article where it explains how bad pointers or infinite loops in drivers do not crash or hang the system, which they usually do in monolithic systems? Less crashes and less hangs sound like end user benefits to me.
I’m well aware of the benefits a microkernel brings. However, it doesn’t mean it will be better than other designs, it just means it won’t be worse. Maybe I’m just absurdly lucky, but I haven’t had any problems with crashes or hangs in XP or recent Linux versions. Think of the microkernel design as a safety net under a highwire – there’s one school of thought that says the person crossing without it is going to be more careful and thus better than the person who requires one to be there to catch him.
I think as the future brings more and more pieces of hardware and drivers get harder to maintain that it will be important, but for now I don’t think users would really notice the benefits.
Edited 2007-03-02 16:11
It is still difficult to port software to Minix3 because it misses several basic stuff, like native support for threads, dynamic library loading and linking and virtual memory; anyway, it is just question of time!!!
I’m sorry, did I misunderstand you. Did you say it was missing native support for threads, dynamic library loading and virtual memory?
What year is this? This is not an OS, this is an application that runs the computer……DOS.
Minix3 has been rewritten from the scratch since late-2005, they have no man power, so the features are getting implemented at a very low rate; but it does not mean that they will not be implemented in a, I hope, near future.
“QNX is a realtime operating system that kicks the crap out of Linux in hard realtime usage. ”
It sure does, since GNU/Linux is *not* a real-time operating system. There are, however, Linux-based real-time operating systems, like RTLinux.
BTW, it’s interesting to note that real-time operating systems tend to be much *slower*. Average speed is sacrificed for low latency. Microkernels also have an impact in speed. QNX is both a microkernel-based and real-time operating system, and it is (at least in my experience) very slow to use. But then again, it’s not the kind of OS you use for big batch work.
Regarding Minix-3, I think the reincarnation server is a pretty interesting idea. I’ve tried it a while ago, and it feels rock solid, albeit somewhat spartan. For instance, a failed startx doesn’t hang your system. Intend to try it again when/if they implement virtual memory (IIRC they are close but not there).
“BTW, it’s interesting to note that real-time operating systems tend to be much *slower*”
That’s because “real-time” != speed.
RT is, simply put, about guaranteeing deadlines, not about speed or latency.
RT is, simply put, about guaranteeing deadlines, not about speed or latency.
Must be over a year ago, Bascule made a very good post about latency vs. throughput vs. speed and how the very notion of ‘speed’ can be a subjective benchmark given that people who think ‘speed’, they think about how fast an application loads or how ‘teh snappy’ the GUI are, which are attributed to other factors.
Bascule talked about Solaris, FreeBSD and Linux; scalability and the whole issue of having to weigh up latency and scalability etc. quite a complete description.
On the other hand; to make a micro kernel scalable will take work *BUT* it is possible, Tru64, for example, which was based off OSF/1 Mach kernel proved that you could create a highly scalable kernel, with a top notch M:N threading and achieve some damn good performance in the process – its more complex, but the yield in terms of stability and scalability shows its worth the price.
With that being said, its funny how there is a gradual, although implicity move, to a more modular kernel as the performance of processors have increased and thus the price paid will be alot lower – hence the reason why, for example, Microsoft have pushed the vast majority of the graphics and audio out of the kernel, along with printing and the likes – thats the prime reason why people will notice a percieved performance decrease, a decision to put stability ahead of performance, which IMHO is a good price to pay given what I’ve experienced so far.
thats the prime reason why people will notice a percieved performance decrease, a decision to put stability ahead of performance, which IMHO is a good price to pay given what I’ve experienced so far.
Naturally. I have been saying this for quite a while already .
Many people still seem to be stuck in the days of yore when processor power and memory were scarce goods. During that time, it made perfect sense to just stuff everything inside the kernel and kernelspace. However, today, with 92 core 400000Mhz processors with 83947093285793845 MB of RAM, it just does not make any sense, at all, to continue to shove everything inside the kernel because of “performance issues”.
Anyone who has ever used QNX and its PhotonUI knows that there is absolutely no justification for assuming that microkernel-based operating systems are slow, in this day and age.
The advantages of a muK design are fairly clear, and with today’s computer power, the main downside has become void.
The advantages of a muK design are fairly clear, and with today’s computer power, the main downside has become void.
IMO the major downside is the increased difficulty in writing and debugging a microkernel.
(quote)
Microsoft have pushed the vast majority of the graphics and audio out of the kernel, along with printing and the likes – thats the prime reason why people will notice a percieved performance decrease, a decision to put stability ahead of performance, which IMHO is a good
price to pay given what I’ve experienced so far.
(quote)
Well, I believe you are wrong here. AFAIK the latest versions of Windows (XP and Vista) are using what I call ‘marketing kernel design’ or Hybrid Kernel according Microsft specifications. That strange architecture design put the majority of services inside the kernel, including graphic engine, audio and printing [1]. The Windows still monolithic with a huge single binary file running in kernel mode.
The lost of performance has nothing to do with his kernel design, is most probably because his graphical resources.
[1]http://en.wikipedia.org/wiki/Image:Windows_2000_architecture.svg
Well, I believe you are wrong here. AFAIK the latest versions of Windows (XP and Vista) are using what I call ‘marketing kernel design’ or Hybrid Kernel according Microsft specifications. That strange architecture design put the majority of services inside the kernel, including graphic engine, audio and printing [1]. The Windows still monolithic with a huge single binary file running in kernel mode.
May I suggest you have a look at Windows Vista design changes; because you have failed not only to read into that changes between Windows 2000 and Windows XP, you have taken to account the changes between Windows Vista and Windows XP.
I know all the ‘cool kids’ are bashing Windows, and prancing around using Linux – and hey, when I was a youngster, I thought Linux was the bee’s knees – I rant it as a desktop operating system along with FreeBSD for around 9 years, so I’m hardly foreignt to the fanboyish drooling over the latest distribution.
At the same time, however, there is no use abusing Microsoft whilst at the same time ignoring the improvements Microsoft have made to their operating system – yes, Microsoft *DO* actually do some good things (technologically) and its time for you to look and acknowledge it when it does actually occur rather than being dragged down into the low brow diatribe that occurs here.
I know all the ‘cool kids’ are bashing Windows
In defense of the cool kids, they’re probably bashing Windows because they’re still using Windows.
In defense of the cool kids, they’re probably bashing Windows because they’re still using Windows.
Reminds me of my days on comp.os.linux.advocacy (COLA) at the number of Linux users who seemed to be running Windows on a regular basis, or the number of Windows advocates who seemed to be clueless about the very operating system they advocated for.
“Bashing Windows because they’re still using Windows” – no, more like, “lets whine and complain about things I know nothing about”, its like watching the shear ignorance of Hollywood throw their 5cents worth into the debate over Iraq with half witts like Sean Penn coming out of the wood works claiming their needs to be a withdraw instantly whilst convienently forgetting that the last country the US left to the devices of religious extremists, Afghanistan, turned into a spring board for terrorist activities and made worse by the support from so-called US allies such as Pakistan (who current still support the Taliban) and Saudi Arabia; the two countries were also the first to recognised the Taliban as the new rulers of Afghanistan when they first took over.
Edited 2007-03-02 22:52
its like watching the shear ignorance of Hollywood throw their 5cents worth into the debate over Iraq with half witts like Sean Penn coming out of the wood works claiming their needs to be a withdraw instantly whilst convienently forgetting that the last country the US left to the devices of religious extremists, Afghanistan, turned into a spring board for terrorist activities and made worse by the support from so-called US allies such as Pakistan (who current still support the Taliban) and Saudi Arabia; the two countries were also the first to recognised the Taliban as the new rulers of Afghanistan when they first took over.
Umm, what does that have to do with Minix? We’re starting to get a little off topic here.
*points to the grand unifying effect* it is about people who are too stupid to make comments about things could probably find it prudent to keep their mouths shut before posting mindless rants to osnews.com about apparent problems they have with Windows.
Btw Smitty, stop being such a coward by deducting points off peoples posts; if you’re going to take off points, atleast have the good decency of actually stating that it was you who did it.
Edited 2007-03-02 23:25
Actually, I didn’t take off any of your points. I thought about it but then decided to post my response instead because I don’t like modding people down unless they’re being idiots/trolls. Must have been someone else.
Calling me a coward for no reason is getting close, but I guess I’ll give you the benefit of the doubt since I know you’ve made good posts in the past.
Edited 2007-03-02 23:31
Calling me a coward for no reason is getting close, but I guess I’ll give you the benefit of the doubt since I know you’ve made good posts in the past.
*gives smitty a hug* don’t mind me, I some times get pissed off sometimes *blush*, my point I was getting at was this, with the long winded rant about Iraq and hollywood, its about looking at both sides of the story; both good and bad.
I talked about Windows in my previous post because the original (first) post to my bought except to the fact that I said there were major changes; what gets my feathers riled up is when people come back quoting out of date sources, and knowing very little about the situation whilst at the same time thinking that because there is ‘freedom of speech’ their ideas some how hold the same credience to mine which might actually have a smidgen of reality thrown in, in reference to the changes made in Windows Vista vs. Windows XP vs. Windows 2000 which ties back to the micro-kernel argument relating to the amount of services being pushed out of the Windows kernel into userspace (or atleast a large portion of it being moved out) vs. the microkernel design of minix along with the eventual move in one form or another to push things out of the kernel that don’t actually need to be in there; Linux and FUSE being a good example which could result in future file systems that are non-core necessary, being pushed out.
Edited 2007-03-02 23:44
Speaking of people too stupid to make comments about things they should keep their mouths shut about…
Well, I believe you are wrong here. AFAIK the latest versions of Windows (XP and Vista) are using what I call ‘marketing kernel design’ or Hybrid Kernel according Microsft specifications. That strange architecture design put the majority of services inside the kernel, including graphic engine, audio and printing [1]. The Windows still monolithic with a huge single binary file running in kernel mode.
Although that argument has historically been true for a LONG time, it isnt quite accurate anymore and you should at least give credit where credit is due. Vista HAS made some changes in this area.
Although it is still not a micro kernel by any stretch of the imaginantion, they actually do have some significant components of the system carved out into usermode again.
Vista’s printer drivers are now entirely usermode and in fact it no longer even allows kernelmode drivers We are back to where we started in 3.51, hehe.
Video Drivers, which were 100% kernelmode in 2000/XP are now split into 2 parts. The majority of the heavy lifting is done in usermode with a (relatively) small streamlined stub in kernelmode doing the low-level stuff. This is drastically different than a pure usermode driver, but it does protect the kernel’s environment from the majority of the drivers code.
As for audio, it is still not in usermode, but they have created a new miniport driver type (Wave RT) which would allow newer software/drivers to control audio streaming without any kernel mode code being executed. A first step towards usermode audio I guess, just getting the feet wet…
Now having said all that – It STILL is nowhere near a micro kernel. Hell, Linux does video and printing pretty much exactly the same way, so MS has basically just reached parity with Linux.
“That’s because “real-time” != speed.
RT is, simply put, about guaranteeing deadlines, not about speed or latency.”
Well, that’s correct, but deadlines also apply to interrupt handling, and this has a lot to do with latency (while it has little/nothing to do with throughoutput).
From Wikipedia:
http://en.wikipedia.org/wiki/Real-time_operating_system
“An RTOS is valued more for how quickly and/or predictably it can respond to a particular event than for the given amount of work it can perform over time. Key factors in an RTOS are therefore a minimal interrupt latency and a minimal thread switching latency.”
“I HOPE the age of a zillion drivers living in the kernel code is drawing to an end. To be honest, it is great to boot up a giant, generic, monolithic kernel and have so much hardware recognized, but I do believe it compromises on stability and simplicity. ”
Whew, thank god you weighed in on this issue. We were all waiting breathlessly to hear what you had to say. Nevermind that the microkernel architecture is the favorite of college kids who haven’t had a real job yet.
When they grow up, they give up the micro stuff.
Whew, thank god you weighed in on this issue. We were all waiting breathlessly to hear what you had to say.
You can breathe now.
Is it GPL ?
No, it’s BSD.
Not quite. It’s a copyleft license.
“Not quite. It’s a copyleft license.”
Nope. No “Copyleft, Copyright, CopyUp or Copydown” license here. lol.
It’s a plain *BSD style license.
Look at it like a “Less Strings Attached” license.
Edited 2007-03-02 04:47
To attribute the authors name is a law in most of the countries apart from USA. While attributing the authors name you show respect too.
http://www.minix3.org/doc/faq.html
What is the MINIX 3 license?
The MINIX 3 license is a clone of the Berkeley (BSD) license. In plain English, it says you can do whatever you like with the system provided that (1) you agree not to sue us under any conditions, and (2) you keep the credit lines in the source, documentation, and publicity unless other arrangements have been made. Specifically, you are free to modify the source code, redistribute it, incorporate it into commercial products with only the above restrictions.
Author should’ve tried Equinox Desktop Environment.
Hey, not too shabby!
Minix has a very nice kernel but with nearly no drivers.
Andrew should donate money to KDE, Gnome, and XFCE to get those DEs ported to Minix. Then he should pay ATI and Nvidia to port their drivers to Minix. Then pay Mozilla to port Firefox and Thunderbird. Then he should pay Adobe to port Flashplayer and Shockwave player. After that, he should pay Broadcom to port some of their BCM drivers.
So on…
I think with enough money, Minix can start gaining momentium.
Man, if professors got paid like that I’d stay in academia after finishing school
After that we have a second Linux, paid at every corner
Hmmm … Can minix3 support filesystems bigger than 4G ??
better question: will 64bit minix be a priority or just a “side project”?
It would be nice if Minix really took off but I have a feeling that Tanenbaum’s confrontational approach to communication might end up isolating the very people who who would have otherwised contributed to to Minix’s development.
Its not going to hurt any of the established *BSDs out there as those who are interested in Minix will be attracted because of the ‘micro-kernel’ architecture first and formost.
As for his ‘dream’ of a “to be a complete, stable, secure desktop operating system for everyday use” – he will need to be looking at the base in regards to DRI/DRM support for Xorg, porting as many BSD drivers as he can get his hands on, wpi being at the top given the lack of wireless for Centrino laptops will kill of a large number of users.
If he can get those drivers ported over, and atleast OpenSound support ported over from FreeBSD – if Minix is bought up into feature comparison to FreeBSD, it’ll bring Minix along way as an alternative to Linux – and better still, with a stable driver API/ABI and commercial friendly licence, it should avoid the current issues that plague Linux hardware support.
As an aside, perhaps the code for Minix should be linked to on this site’s OS Resources page. For an operating system, it is well-explained in the comments.
the kernel of minix is suppose to have 4000 linux
somebody have a link who explain theses line, the design, architecture…. with some diagram….
I assume you mean ‘4000 lines’?
In the book about Minux 3, there are about 23,500 lines, but this is mostly because just about every line with any logic on it has one to four lines of comments and up to five times that much in the start of every individual file. If you took out the white space and comments, yeah, you might get it down to the 4,000 they claim.
I haven’t seen a diagram, though.
I think the 4000 lines refers to the microkernel only, which means a lot of the code included in the book would not count. The memory server, networking server, file system server, etc. all sit on top of the microkernel but are included in the book as part of the OS.
Edited 2007-03-02 23:33