Mac OS X vs Windows kernel development

I always thought that Mac OS is something poorly documented and developing kernel modules under “Mac” will be hard & complex. Until I actually tried it. It turns out, many things under Mac are actually more simple than under Windows.

Just to give you some thoughts:

On Mac OS X:

1. If you are going to write kernel module for Mac you are free to use standrad IDE called xCode to develop & compile code.

On Windows:

1. You have to download DDK or WDK and use command line tools to develop kernel driver. You can trick Visual Studio to use ddkbuild.bat, but this is unsupported way. Good luck making IntelliSense to work. It took Microsoft quite some time to make WDK for Windows 8 to be integrated in Visual Studio.

On Mac OS X:

2. You have nice documentation to start from for newbies, samples and explanations.

On Windows:

2. You have some documentation and samples dir in WDK dir, however, this is rather “see and figure out how it works on your own” approach. It is just different.

On Mac OS X:

3. If you are confused about some piece of functionality, you are free to see how it is implemented in BSD kernel or pick-up any module from and see how it is done.

On Windows:

3. If you have some questions and you cannot find any replies, feel free to take Ida Pro and go start disassembling binaries. Takes more time, and is not a very pleasant process.

Among things which annoy me is, of course, legal restriction not to use Mac OS X in virtual machines (VmWare, VirtualBox), thus making the driver debugging only on physical machine. I used to have dozens of Windows vms with dozens of snapshots ready to be restored and debugged via WinDbg.

In general, from developers point of view, it seems like Apple has invested a lot into usability of documentation, samples and even code writing to make it nice & easy to use. Well done.



Leave a Reply

Your email address will not be published. Required fields are marked *