kernelthread.com

Advanced Programming in the Mac OS X Environment

If you look back upon the last five decades or so since computer operating systems came to be, you would realize that their evolution has been very dramatic, particularly in how a user interacts with them. A friend of mine who is a well-known professor of Computer Science once observed that in contrast, the automobile industry hasn't changed all that much! I was about to talk about multimedia interfaces in cars, adaptive air suspensions, state of the art engines from Audi, BMW, Porsche, and so on, but he interrupted me with a simple question: "If you could somehow (say, through a time warp) get a person who drove a car 100 years ago to drive a current model year car, he would probably be able to figure things out. How do you think is the situation with computers, software, and operating systems?"

Well, computers and operating systems as we know them today haven't been around "long enough" — most people's ideas about computers have evolved alongside the evolution of computing. This leads to the "I'm not impressed" effect, wherein you are not impressed with an entity's evolution, no matter how dramatic, because you have evolved with it. I find it fascinating to study and analyze various operating systems, as can be seen on my operating systems page and my Virtual PC page.

Aside from analyzing numerous systems, I too have my "everyday" operating system that houses and runs my "everything" (technically speaking). It used to be Linux for several years, until I got so deeply involved with Solaris professionally that I found it convenient to switch entirely to Solaris — for two years. The running joke was that I read my mail in the Solaris kernel debugger. I came back to Linux and was more or less content. Eventually I gave Mac OS X a shot, and soon Apple announced the Aluminum PowerBooks. I was enticed to get one, and I did.

This page is a semi-organized account of some of the random things I have done with and on Mac OS X.

Contents

An intermediate-level presentation (Flash format) that provides a brief overview of the Mac OS X kernel. It is a minorly edited version from a talk I gave at the NSA.
fslogger is a file system change logger for Mac OS X "Tiger" that uses the same underlying kernel mechanism as Spotlight to report file system changes in real time.
Result and Report: The Mac OS X Expert Challenge — 2005.1.
The Apple Motion Sensor as a Human Interface Device.
The PowerBook Sudden Motion Sensor, analysis and examples of use.
hfsdebug is a file system debugger for HFS Plus volumes.
"Fragmentation in HFS Plus Volumes" is a technical discussion of fragmentation in file systems formatted with Apple's HFS Plus volume format.
"A History of Apple's Operating Systems" is a brief technical history of most systems Apple has dabbled with.
"What is Mac OS X?" is a hacker-friendly answer to the same question.
10 Things Apple Did To Make Mac OS X Faster.
More Power to Firmware contains some notes on Open Firmware.
URL-based Security Holes in Mac OS X.
Re-routing function calls by overwriting and injecting PowerPC machine instructions.
Re-routing system calls through kernel extensions.
Re-routing dynamic library calls using environment variables.
Implementing the Towers of Hanoi in Open Firmware on "new world" Macintosh systems. There is also a graphical implementation available on the same page.
Miscellaneous notes on archiving files.
Running multiple operating systems using Virtual PC on Mac OS X.
Notes on adding the proc file system to Mac OS X.
Booting Mac OS X briefly describes the sequence of events that happen when Mac OS X boots.
Mac OS X Hacking Tools is a compendium of some useful programs for exploring Mac OS X.