is osx a true unix system


This may be a stupid question as i«am not really now anything about unix but my friend (a real pc geek) tried to convince me that os X is not truly a unix system due to the mach kernel.
If my friend was wrong could somebody please give me a god answer I could use to hit my friend with.
To answer your question ... we first have to ask what is Unix?

Before I answer that, let me say that it is VERY likely that I do not have my facts right - so you out there who know the facts, please correct me, don't flame me!

As far as I know, the term UNIX can only apply to the operating system developed by Bell Labs in the 60's and anything derived from that. These include all System V derivatives like SCO, HP-UX and Solaris, but not the BSD derivatives (including the older SunOS and MacOS X), and CERTAINLY not Linux/GNU and it's derivatives. The very idea of GNU (from whence Linux sprang) was that GNU is Not Unix (it has been scientifically proven that computer scientist type people like playing with recursive acronyms).

The Unix trademark originally belonged to Bell Labs (now AT&T) and has successfully passed through a number of owners including SCO at one time, to now belong to an organization called X/Open which is the de facto standards' body for all things Unix.

Over the years, the differences of opinion between these three factions (System V, BSD and GNU/Linux) alone have been the cause of so many religious wars (largely along the lines of my dad can beat up your dad any day) that whole books could be written about them. In the old days, wandering minstrels and bards would probably have sung songs about the long dead heroes of these vicious battles.

The differences still exist - but in truth, there has been so much cross pollination that no one derivative is pure bred any more. All three have learned from and contributed immensely to each other's body of work (the beauty of open source and academia). For example, TCP/IP - the basis of the internet - was not developed fior System V but for BSD in the first place. It made it's way into System V (true Unix) many years after that. The bash shell is a fairly recent GNU development, but it can be seen in almost every flavour of Unix around.

In today's more enlightned times, we have come to realise that there is no way that EVERYONE will agree on ONE TRUE WAY to design or implement something. The closest that the X/Open group has come to a common standard for what is Unix is the POSIX specification. This largely specifies designs and best practices regarding what a true Unix should look like and work like. Amongst many other things, this means that programs written for one POSIX complient system shoudl easily be ported and compiled on another POSIX compliant system.

You could say that anything that is POSIX compliant is a true Unix.

Linux (with glibc) is POSIX compliant. The various BSDs are POSIX compliant. And of course Solaris, SCO, HP-UX, and I think AIX, are all POSIX compliant - and so all of these can be cionsidered to be real Unix systems.

However, the funny thing is that many systems that are certainly not Unix have also borrowed from the POSIX specification. Windows NT (and hence 2000 and XP) have POSIX subsystems. BeOS is largely POSIX compliant. Some IBM mainframe OSs (MVS, OS/390) are 100% POSIX compliant.

So ... although none of the above diatribe really answers your question, it should give you enough insight to realise that your question is not trivial!

Now, about those microkernels ...

Usually in any operating system, there are three levels of action - the hardware, the operating system, and the applications. The hardware is the physical processor, memory, hard drive, network adapter etc.

Imagine a computer as being a sandwich shop. You, the consumer, is a user (or rather a user-run application). The people behind the counter are the operating system, and the raw materials and tools are is the hardware and resources.

The applications you and I run (whether they are simple things like the Finder, or complex things like Photoshop) usually never deal with the hardware directly. This is for exactly the same reason that you would not be allowed to go behind the counter in a sandwich shop and start making your own sandwich from the raw materials there (although I am sure you are perfectly capable of making your own sandwich_ - the people who work there know where all the correct tools and raw materials are, they know how to use the tools properly, and they can ensure that people are served in the correct order. This is the advantage of platform independence. You can go into any shop and order a tuna sandwich on whole wheat bread - and you know pretty much what to expect - even though the location of the resources, and the exact technique of making the sandwich may be different from one shop to another

Now, some sandwich shops are small, and their sandwiches are not very complicated. Usually in such places, you would have just one person take your order, make your sandwich, and take money from you. This is similar to how Windows 3.1/95/98 and MacOS (up to 9.1) work. In the case of Windows 3.1 and MacOS before System 7, there would only be one person working there, so while your order was being processed, no one else would be able to get a sandwich. In later versions, you could have two or three people working there, but each person would take a customer all the way through the whole cycle. This kind of shop is prone to outages - what do you do when that one person is sick?, and is not scalable - to serve a hundred customers, you need a hundred times the space, and a hundred times the number or people working.

In some bigger sandwich shops, you have one person take your order, and s/he passes on your order to someone else who makes the sandwich, and they pass your sandwich on to the person who takes money, and you get your sandwich. This makes sense for a system where there are a lot of customers, and the sandwiches are a bit more complex so you have people who specialise in only making sandwiches. By taking your order and passing it on to a sandwich maker, the order taker is free to accept a new order while your sandwich is being made. This is the model that most Unix systems use. You, the user, place an order (request a task to be performed). The message is passed to the sandwich maker (the kernel) where the sandwich is made (the task is performed), and it is sent on to the cashier where it is handed to you for your consumption. You still have one person making your sandwich (a monolithic kernel), but the whole process is more efficient, more reliable and scalable. Also, the layers are independent of each other - you can replace one order taker with another order taker without having to replace th sandwich maker or the cashier. The same goes for the sandwich maker and the cashier - you can swap them out without having to retrain, or rebuild the complete process as long as they speak the same language and use the same terms (implement the same specifications).

Now, there is a third type of sandwich shop - usually even bigger, or more complex - where your sandwich is not made by just one person - you have one person who prepares the bread, another who adds the meat, a third who adds the condiments - and your order is passed from one person to another who fill in the appropriate item. The task of executing tasks is split up into smaller and smaller units - each one independent of the others and you can very easily add or remove people from the assembly line to cope with demand. This is a microkernel architecture - what MacOS X and other Mach based systems use.

Now that you are thoroughly confused with my obscure metaophors, I should probably answer your question ...

MacOS X is basically derived from BSD for the Mach microkernel running on PowerPC. Note the usage of the term "BSD for Mach" like you would have "BSD for x86", and "BSD for PowerPC". I am sure they could have based MacOS X on a native PowerPC implementation of BSD, but by choosing Mach, they have kept a door open for porting it to other processor architectures very easily.

As such, MacOS X is a true Unix - as much as anything can be called a true Unix - especially when compared to Linux. The choice of whether to use a microkernel or not is a small implementation issue - it is a question of form, not of function. Microkernels are fairly new (in real world systems, that is - not in academia) and so you will find people deriding them - some will have valid reasons, but most will simply be the same kind of people who tell you that in their day thay had to walk two miles in the snow ... uphill ... both ways ... just to get to school.

I personally do not know the exact merits and demerits of microkernels vs. monolithic kernels, but I would guess that microkernels need more overhead to manage the little sub-kernel tasks, but are more flexible and more platform- and implementation- independent. For those familiar with programming paradigms - I somehow see it as being very similar to the procedural vs. object oriented issue. That's right - one big messy glob of goo vs. lots of little discrete self-contained drops that sometimes come together to exchange their contents!

Hope this helps (or at least spurs someone to write something in reply that helps).

P.S. Linux Torvalds (original creator and current manager of the Linux kernel) is a staunch supporter of monolithic kernels over microkernels

vihung is essentially correct. Macos X has quirks but it is a Unix. Linux technically is a Unix clone but all these things being open source (even darwin) the code from all of them has mixed. Basically if it calls itself a Unix and most CLI unix apps will compile on it then it is a Unix. Sort of like if it walks like a duck, quacks like a duck then it is a duck. Also Linus says that mach is a unix. His comments are directed at the fact that he thinks monolithic Unix kernels (like his) are better than micro Unix kernels (like mach). Basically you're friend doesn't know what he's talking about.

I can just see this article being published in
(you should copyright you metaphors, a matter of fact the whole post
shoule be copyrighted LOL :p)

>So ... although none of the above diatribe really answers >your question, it should give you enough insight to realise >that your question is not trivial!

So I tought but my friend kept telling me that osx is not unix ,just some unix like mix

>Basically you're friend doesn't know what he's talking >about.

Yep, but I can«t say that I now what I«am talking about.
If I try to explain to my friend why I love mac (easy to use, easy to be creative....) he tells me for instance: Macs have only a one button mouse so it must be crap.

Thank you all for the informative posts. I feel a little wiser now :)
Perhaps your friend, at some subconscious level, is nervous.

Most of the really cool stuff in computing lately has been coming from the various parts of the unix world.

microsoft is looking more and more pathetic as it continues to try and rewrite the standards for the world it wants to live in ie the .Net initiative. The only people who are even remotely exciteed about that stuff are those who feel like they will be stuck using it - those who have already invested too much to switch to a less crappy platform...

Users of OS X can finally get in on the real party and users of that other O$ may be left out in the cold.

Originally posted by Click
he tells me for instance: Macs have only a one button mouse so it must be crap.

yeah we run into that crap all the time don't we. It isn't until you see a new user try to use a pc and watch as they press both buttons down and get nowhere.

As for power users if they want a three button mouse, go to to any computer store, buy logitech 3 button with scroll wheel, take off PS/2 adaptor, plug into USB port and OS X recognizes 2 buttons and the scroll wheel automatically. No extra software needed. I did this about a month ago. Note: Carbon apps don't recognize the scroll wheel yet.

I can just picture this:
Brand new user to a PC (windows) system.
Hey goes to click on something, using both buttons.
THe computer complains and pops up a dialoge box
saying: "Sorry, your timing was off, please try again
pressing both buttons simultaneously" LOL ....

Yeah ... I have to say that the one-button mouse can restrict power-users a bit. However, there have been third-party two- and three- button mice available for Macs almost since the beginning. I personally use a four-button mouse (currently I have a Logitech Cordless Desktop Pro wireless keyboard and mouse - works fine in OS X and the older OS)

I remember the pains I went through teaching my dad (an otherwise technically savvy person) who is a PC user (because as an architect he needs to use AutoCAD, and they stopped making it for Mac a long time ago) the differences between left- and right- click and single- and double- click.

I remember reading somewhere that one of the members of the original team designing the first Macintosh was strongly against even having double-clicks - stating that having to double-click in some places, and single click in others was too confusing. I think that Steve jobs was against it as well. But it became too difficult to build the system that way while still using the metaphors they were using

Now of course, the web has changed that, and people have learned how to build applications where every action can be performed with a single-click.

And people still think question whether the web has really changed everything! ;-)

See I have fared well with a one button mouse since the beginning of my compuer use which was like a decade ago. I consider myself a power user and having only once button is ok *for me*, but one click ???? I dont use contextual menus THAT much and when I do its once in a blue moon :)

If that were the case we would have to redifine how we select a single item. remember the "launcher" and "at ease" those were one click based, and they only launched apps, they did not provide any means for selecting.

just sound tooo weird :p

Originally posted by monty

... buy logitech 3 button with scroll wheel, take off PS/2 adaptor, plug into USB port and OS X recognizes 2 buttons and the scroll wheel automatically. No extra software needed. I did this about a month ago. Note: Carbon apps don't recognize the scroll wheel yet.


But the OS X Finder doesn't get my Logitech's wheel either. Does it mean it's Carbon? That would keep me awake at night...
It is strange, I have worked with NeXT systems for close to 7 years, and I still don't know why they have the second mouse button.

Remember that in REAL unix, you DON'T have mice. The mouse is for the GUI on top.
The Finder is Carbon. At first you'd think it was different enough from OS 9 and earlier that surely that didn't just carbonize the old Finder, but perhaps they did. In any event, the Finder is not Cocoa. Too bad. No Services menu. No scroll wheel.

To the one who started the thread, try not to let your friend get to you. People are idiots (that's The Dilbert Principle). People often confuse a <em>preference</em> about an operating system with a <em>universal truth</em> about an operating system, which I'm sure is an oxy moron.

There's no one perferct OS. What cracks me up are the people who get positively offended that people would even think of using an OS different than what they use, and trust me, you'll find those people using MacOS, Windows, Linux, TRS-80, whatever.

I've always been of the opinion that decent software shouldn't need more than one Mouse button..

Take a look at all (most) of the software that Mac's have been running for years, and you'll see that they still rely heavily on well layed out, and complete menuing systems, and the keyboard shortcuts.

A proficient user can be a wiz, one hand on the option/apple keys and the other on the mouse, click and pressing to zoom around applications with ease.
The best thing is, learn the keys for cut and paste in one app, and 5 years later in new programs it's still the same key sequence. Standards are bliss when obeyed.

Now take a look at what's happened with Windows over the years, starting with Two buttons, in early days, there was almost no need to the right mouse button, it was very useless.. Then with Win95 the idea of "Good interface design" went quickly to the trash can and the right click came into fame.

There is something very wrong with the right mouse button, and the way it is used in applications under windows. The rigth click has become a quick way to get to "common" or "needed" options. And generally it is very hard or impossible to find the same options or controls under the normal menu's.

Too many programs are going this way, and becoming bad examples of what to do when making a menu system for programs. It is not good design to have the user, have 2 or 3 or even more places to find controls, it becomes confusing at best, especially to learn a new app. things could be completly different.

I'm all for one mouse button, it means you have to think about what your program should be doing when the user is interacting with it, and it also helps you creat a well designed program that is easy to learn and easy to navigate.

I *HATE* it when I go online to web sites and they say "right click here"..... I DO NOT have a right click!!!! Bad, idiotic, stupid programmers!
i cringe whenever i see the phrase "click here" at atll.

If the user is using mouse/gui browser, hyperlinks and and to use them should be obvious enough.

More importantly, not all users can click at all...
Originally posted by rharder

To the one who started the thread, try not to let your friend get to you. People are idiots

I wont. Actually he was a little embarrassed when he admitted that OsX is Unix. I have another friend who is studying programing at university. He has always teased me for using mac. Now he said that if he had the money he would instantly buy a cube and OsX :)

Originally posted by vihung

one of the members of the original team designing the first Macintosh was strongly against even having double-clicks - stating that having to double-click in some places, and single click in others was too confusing

I have been noticed in our school that there are many who don´t now when you should double click and when you don´t ,so they keep double clicking on everything. And it works for them.

I think the greatest problem with 2 buttons mouse on the pc and 1 on mac is that its different way of working. I use both and it can be quite confusing sometimes. My opinion is that one button is enough.

OS X is a true UNIX.

Linux is not.
Linux is a unix clone.

OS X is largely derived from BSD which was developed at UC Berkely is a true unix, though different from AT&T Unix.

Linux does not have the legal right to call itself Unix. I believe Darwin does (I'm *almost* positive).
There is some sort of "board" that brands OSes UNIX or non unix dependant on the particular OSs abilities to resemble what a UNIX OS is. I think that the definition evolves as time goes by. Liux has not received such a certification.