Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Does Darwin have any features that are specific to it? Do other Unixe(s) have features that Darwin lacks?

share|improve this question

9 Answers 9

up vote 14 down vote accepted

OS X is the only remaining operating system based on the Mach microkernel which is also still commercially relevant. There are a few ongoing research projects and obsolescent OSes that no doubt are still being used in production settings on old machines, but nothing you can go out and buy on a new machine today.

OS X has the usual assortment of kernel feature incompatibilities that any *ix has. The biggest one I most recently had to work around is a lack of System V message queues. (msgget(2) and friends.) We had to replace our message queue code — which was written for a "real" System V variant and later ported to Linux — with TCP/IP to get our software to run on OS X. For our application, the differences between these two IPC methods mattered at the time we made the choice to go with message queues, but due to later architectural changes, it ended up not being a big deal to switch to TCP/IP.

share|improve this answer

When it comes right down to it, isn't Darwin just a thin BSD layer on top of Mach 2.0?

I used to use NeXTStep, I don't know how much current MacOSX departs from NeXTStep, but...

Mach 2.0 offered a different set of abstractions at the kernel level:

  1. A "task": that's an address space + a set of "ports", possibly with a thread running in it.
  2. Threads. This was the schedulable unit of execution. A task (address space) could have more than 1 running in it. I believe that Mach-O files (Mach's executable file format) could specify more than one thread at process run time: no main() function that started more Cthreads, the OS would start one.
  3. Ports. These aren't like TCP or UDP ports. They were typed, ordered streams of messages. Rather RPC-like. You made up a protocol spec file, then ran that through a compiler to get server and client side stubs, marshalling and unmarshalling routines, etc.
  4. User level memory pagers. You could set up a task+thread to handle paging of other tasks' address spaces.

The original CMU Mach folks used these abstractions to emulate BSD Unix processes, MS-DOS processes, and in a fabulous fit of freakiness, VMS tasks. Each VMS task took 2 Mach tasks, plus many threads. Somebody used to sell a Mac OS (pre-OSX) emulator for NeXTStep that used the user-space-pagers to good effect.

The old CMU Mach publications page: http://www.cs.cmu.edu/afs/cs/project/mach/public/www/doc/documents_top.html

The VMS-on-Mach paper: http://www.sture.ch/vms/Usenix_VMS-on-Mach.pdf

share|improve this answer
    
Mac OS X (and thus Darwin) uses Mach 3.0. –  bahamat Sep 5 '11 at 18:21

This isn't quite an answer but, DTrace is an awesome system debugging tool. That exists for Solaris, Darwin/OS X, and *BSD, but not Linux.

share|improve this answer

I think it's best to describe Darwin as just another flavour of UNIX. Solaris is one. HP/UX is another. There are lots more, maybe not as "high-profile" but they're there. And with every flavour comes its own specifics. That's why there are flavours in the first place. Some company thinks up something which would help selling it (or simply working with it or even administrating it) and creates it and gives it its own name.

share|improve this answer

If I've heard right Darwin, as released by Apple, no longer functions as an independent operating system, so I'd point out that the biggest difference it has is OS X on top of it. :D

Although the integration between the old Mac OS, new Mac OS X, and NeXT stuff is sometimes laughable, little utilities like diskutil and hdiutil are great. Maybe it is some old Mach kernel architects left over from NeXT who use these little things and care about them who have made sure XCode such a good tool, too.

share|improve this answer

Darwin has a relatively small set of supported file system types. Apart from specials like devfs and network types like webdav, the list is:

  • HFS/HFS+
  • UFS/FFS
  • ISO-9660/UDF/CDDA
  • NTFS
  • FAT

Of this list, only UFS was designed for Unix, although HFS+ has been upgraded to support all necessary Unix functionality. As of Mac OS X 10.6, UFS cannot be used for the root partition, although this restriction probably doesn't apply to Darwin. By default, HFS+ is case-insensitive, although case sensitivity can be requested at creation time. Although Mac OS X will run on a case-sensitive partition, many high-profile Mac applications will not (eg Adobe CS).

For a while, Apple was planning to supersede HFS with ZFS, and even shipped ZFS with some versions of Mac OS X, but sadly this experiment eventually failed because of unresolvable licensing issues.

share|improve this answer

The main feature of Darwin that actually matters is that OS X uses it, really.

share|improve this answer

Darwin is based on FreeBSD. One cool feature that is not present in other Unix operating systems (in my experience) is the Berkeley Packet Filter, aka /dev/bpf. This is a very versatile device you can use for packet capturing.

share|improve this answer
    
Darwin isn't really based upon FreeBSD, though it borrows some userland things from it. Other comments here explain that better. bpf(4) isn't solely Darwin and FreeBSD/NetBSD/OpenBSD, and I've got a feeling that someone might have even implemented it for earlier Linux kernels. SCO (in-)famously had it in their Unixware offering. –  jrg Sep 2 '10 at 20:32

Fist that comes to my mind is all tools that OSX have in console.. there are tons of more useful commands that unix have. Diskutil it's like partition magic in shell, this tool have so much options for disk operations that fdisk is really just 10% of what this beast have... btw osx supports really great Software Raid support you can have JBOD, Strip and Mirror software raid types.. does really unix have this? in your dreams!! ;D

SystemProfiler - great tool which display all hardware id's,names,models,sn's and stuff like that in a VERY comfortable way.

darwin kernel isn't totally transparent like in unix.

darwin have killall util =P unix don't, only skill

different file system also.. HFS, HFS+

maybe latter i'll remember more =)

share|improve this answer
1  
Do you mean Darwin has 'killall' and other Unix variants don't? That's not true. –  kbyrd Aug 10 '10 at 23:44
2  
this answer is suspect of trolling. It is not necessary to be so defamatory in your statements about *nix other than os X. Also, last time I EVER USED *NIX killall was absolutely present in my PATH. Also also, linux has system profilers. Do your homework. Don't be a déuche. edit: I use and am very fond of OS X. –  Eli Frey Aug 11 '10 at 2:53
2  
I have killall on linux, so it's not unique to darwin –  xenoterracide Aug 11 '10 at 3:08
1  
This answer is vague and inaccurate. What useful features does fdisk lack? Linux RAID (mdadm) does have concatenation (LINEAR), striping (RAID0) and mirroring (RAID1), among others. Linux also supports both HFS and HFS+. –  Matthew Flaschen Aug 11 '10 at 4:13
2  
BTW: Linux-killall and Solaris-killall are quite different –  EricSchaefer Aug 11 '10 at 21:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.