OS X in Depth: John Welch, AER inc.

By: Mike Kimball - Revised: 2006-06-20 devin


Purpose of this session:
  • To give a clearer idea of OS X history and the insides
  • To look at the Non-UI parts of OS X
"This is not an 'Aqua sucks' session...."

What is OS X anyway?

The Ultimate Legacy OS
  • MacOS (Classic)
  • UNIX Apps (Posix + BSD)
  • NeXT Apps (with porting)
The Ultimate Future-Foundation
  • Cocoa
  • Carbon
Brings together many technologies

History of OS X

Brief History chart
MacOS -> Copland -> OS X
NeXT -> Rhapsody -> OS X Server
Steve Jobs left Apple to develop new OS (NeXT)

Convergence (How did we get from there to here?)
Apple Wanted - New foundation, Better DevTools, More Developers, Newer Imaging/Printing, More OOD, New Markets.
NeXT Had - Mach/UNIX based, RAD Tools, Enthusiastic Developers, Better Imaging/Printing, OOD based OS, Enterprise Acceptance.
Apple bought NeXT in 1995. Now What? How do you make them work together?

NeXT + Apple = Rhapsody
All of NeXT features + 'blue box' for backwards compatibility, Hybrid Interface (worst of both worlds), Native apps must be from scratch (i.e. no Cocoa), and not much acceptance. Rhapsody became OS X Server.

NeXT + Apple (Take 2) = OS X
Rethinking some goals, Cocoa (and compatibility) = Mac Apps for the future, Avoid Copland Pitfalls, Avoid Rhapsody Pitfalls, Aqua Interface (new UI).

OS X = Buzzword Compliant

What is PMT (preemptive multitasking)?
"It takes care of people who write crappy apps but has higher overhead .... protects the rest of the apps & system. Still doesn't make it crash-proof though... Cooperative multitasking has lower overhead and works great if everyone writes according to specs....'good apps'...but tends to fall over if crappy apps reign.

What is Protected Memory?
"Keeps one app from killing others, comes from UNIX environment that catered to multi-user OS's.
"Problem apps/extensions: Kaleidoscope, After Dark ... apps that do modifications at the system level, or have global access to memory to time events.....doesn't allow a perfectly 'stable' operating system environment."

What is Memory Management?
"Major improvements to VM in later OS versions ... with OS X you get 'Dynamic Allocation' of memory to particular apps, though this can lead to leakage which might not crash the system but will slow it down to the point where you might as well reboot.

What is SMP (symmetric multiprocessing)?
"Asymmetric is where one processor is the master, delegates tasks to others.... but SMP is easier on software developers since they don't have to care....

Crash Proof?
"One definition of 'crash-proof' is, 'if you can telnet to the box and fix whatever is wrong, then it's crash-proof' .... well to the person sitting at the box, it's crashed! 'Crash-proof' doesn't really exist, it's merely an oversimplification of the truth, the result of redefining what 'crashed' means."
"Buzzword only, gives people warm fuzzies.....it's a big lie (hehehe). OS X is very 'crash resistant', to be quite accurate. Do not stop using Retrospect and keeping the safety net in place..."

Q: VM is now part of OS X and cannot be turned off...will this subject users to the according system slow-downs?
A: If you size your tasks properly, then no, otherwise, yes, possibly.

Darwin = kernel, Open Source. Darwin is Mach based Microkernel.
"Microkernels can be more secure than Monolithic...
Darwin is POSIX compliant.
"Darwin is BSD, i.e. UNIX, with command shell, etc.."
OS X is UNIX-based, not UNIX.
OSX uses Darwin for low-level services.

"Apps can be recompiled easily in this environment.... but also leads to shell scripting languages, etc... but all is harder to 'mess up', makes it harder for people to screw it up..."

"Streams are good, they are used by Solaris.....but it would require much more development time and delay the release of OS X, so it's not necessarily going to replace OT. There are other problems also with UI & multiple network cards. But, UNIX is tuned more as a network OS and is just tuned to be faster for that. Socket-requiring apps won't have problems running properly in OS X..."

NeXTinfo (uh, Netinfo)
Hierarchal domain model for networks. Single point network management of all clients (including NetBooted clients). Databases used to hold network info, instead of flat files (a la NIS). Similar to LDAP but predates it. Integrates with other standards (NIS, LDAP).
"Can run *huge* networks. But will only be used for OS X boxes or NeXT boxes. Netbooting (disk-less workstations) is part of NetInfo, not really a new feature ;)

Uses PDF imaging (i.e. graphics are PDF's).
Where does quartz end and aqua begin?
"This is the low-level graphic imaging, how 'basic window' system works, how pixels get to your screen....
"Changes the display ownership of pixels from the all-or-nothing model to the model similar to layers in photoshop, varying percentages of ownership that translate to transparencies, etc....uses simple math values to affect the pixel values, all without huge hits to the system."

"It's a 3D API.....of course the best reason to include it is for games. 'Shouldn't the market settle this?' well the market doesn't settle anything, it's only a majority advantage....
"QuickDraw 3D was better at some things but ran only for Apple OS. Not cross-platform much at all.
"What other applications use OpenGL? Well y'all saw the Maya demo, so you must care ;)"

QuickTime (4D imaging)
"Cross-platform, not just a movie player (have to say that....). It's now part of the OS..."

Classic is a transition. Transitions take forever, and take longer the better they work.
"It is not an emulator, not like VPC. But, it doesn't get the benefits of OS X ... so if it crashes, it will probably take down the system with it, because it is still OS 9, has some protection but not much....
"Allows people to keep running old apps while buying the new OS and the new hardware it comes on..."

"Makes some things work without giving global memory access, etc.... it's not an emulator, it's a series of API's that allow apps to get out (in OS X) quicker."
"Office is not an OS X app, it's an OS 9 app with a shiny new coat. It's a Carbonized app, but .... doesn't use certain services....full carbonization takes time. Doesn't have same features as Cocoa apps.
"Carbonized apps if written properly will run under OS 9 (that's what the CarbonLib is for, and make sure you *always* download the latest one). A good analogy is the FAT apps, i.e. for use with both PPC & 68K... Carbon allows apps to run under either OS 9 or X."

Carbon or Cocoa
"Cocoa is more native, more object-oriented. Better to use when building apps from scratch. Cocoa apps will not run in OS 9."

"Java will be an equal player in OS X. Runs extremely well, robust, no more b.s. with MRJ...
"'Full support' is a vague term, means different things to different people - there are so many pieces Java uses that will never apply to OS X.....so, no, not exactly 'full support', but strong support."

How can Aqua do what it does without monstrous hardware?
"Aqua uses PDF files extensively for buttons, pics, etc, very easy to customize if you know where to go looking...."

How will this work in OS X, and why bother?
"Shell scripts are good for command-line things....but having access to shell scripts to run AppleScript, it gives you an interface to the apps themselves, to trigger them, etc. Yes, this of course leads to security issues. 'Script kiddies' now have a new place to play, but with all those features turned off (by default on shipment), they have to whine and find a windows box to hit."

Why change it? What was wrong with the old system? What new features in OS X?
"LaserWriter 8 is huge, kludgy, does crappy stuff, tied to chooser, etc..... Rewrote it for OS X... There is now better support for other features, like print-to-PDF, built-in."

Closing points

  1. Does OS X mean no more extensions as a concept? "no, you can always change things, especially with the command line."
  2. Do I have to learn the confusing UNIX directories? "no, you probably won't even see them, most of the time."
  3. Filename extensions suck, I'm not going to use them! "good, don't. but if you are using UFS you have to....but with HFS+ you don't need them. obviously you need HFS+ for running Classic, so.... Also, DiskWarrior 2.1 now fixes OS X drives (HFS+)."
  4. Command line, X-windows, all available....
  5. Isn't UNIX the fav for crackers & script kiddies ... "well, it ships pretty secure, and you can make it more so. If you don't do anything stupid, you won't have problems. i.e. don't give guest r/w access via File Sharing..... If you don't need it, don't turn it on...."
  6. I like the simplicity of running Mac networks, must I become a UNIX geek? "No you don't need to be a UNIX geek, don't need to rebuild the kernel, etc....."
  7. Logging in is stupid..."You can auto-login, so don't worry about that level of security. Besides, everyone makes mistakes."
  8. It's different!