April 25th OS X deep dive

Page history last edited by typicalmacuser@... 1 year, 8 months ago
Click "Edit page" to edit this list.

Topics for show

A deep dive into OS X

Well while I was gone on vacation I did a show about the history of the GUI. Matt Beckwith a listener and blogger on typicalmacuser.com wrote and reminded me that I forgot to mention NEXTSTEP in my history and of course he was right.

Tonight I wanted to dig deeper into exactly what is OS X and it's NEXTSTEP roots from a history, functionality and usability perspective. I'm confident that much of this information will be familiar ground to many of the long time mac user listeners but if you are like me and fairly new to the Mac you will discover some information about the OS X operating system that you may not have know.

As always I'll look to my live audience to keep me honest and chime in as many of my listeners in the audience are not Mac newbie’s.

A Brief History of Mac OS X

To look deeper into OS X we need to take a look at some history first.

    • May 1985 was not a good month for Steve Jobs. All of his operational responsibilities at Apple were "taken away" from him because the board at Apple was not please with his overall performance.
    • For Jobs this was not a demotion but an opportunity
    • Within week of Jobs “opportunity” he came up with an idea for a startup for which he pulled in five other Apple employees.
    • The idea was to create the perfect research computer (for Universities and research labs) and along the way a new OS would be needed. Apple was not happy with Jobs and so Jobs went off to create the next OS on his own.
NEXT Computing was born and Jobs was off to the races once more to build his next "perfect OS" which he called NextStep

    • NEXTSTEP 1.0 shipped on September 18, 1989, over two years later than what Jobs had first predicted and hoped for.
    • By 1996, there had been many version of NEXTSTEP including ONESTEP and one version for the PC, and things were not looking good for them.
    • All along the way Apple had been looking for a new Operating system. In 1996 Steve Jobs called Amelio the current CEO of APple, to discuss possibilities of licensing OPENSTEP (the follower to ONESTEP. Jobs pitched NeXT technology very strongly to Apple, and eventually Apple acquired NeXT in February, 1997, for $427 million. Many think this was one of the best moves (one of very few that Amelio made.
    • Apple named its upcoming NeXT-based system Rhapsody. Rhapsody saw two developer releases, in September, 1997, and May, 1998.
    • Next a monumental even took place at Apple. After many years of decline Apple was in troule and once again Jobs became the interim CEO of Apple on September 16, 1997, clearly Jobs was going to bring some his NEXT OS to Apple with him.
    • Mac OS X was first mentioned in Apple's OS strategy announcement at the 1998 WWDC. Jobs said that OS X would ship in the fall of 1999, and would inherit from both Mac OS and Rhapsody. Moreover, backward compatibility would be maintained to ease customers into the transition.
    • Mac OS X did come out in 1999, as Mac OS X Server 1.0 (March 16, 1999), a developer preview of the desktop version, and as Darwin 0.1. Mac OS X beta was released on September 13, 2000.
So now that we are grounded in the roots of Mac OS X lets dig a lot deeper into OS X architecture

  • Mac OS X’s foundation is Darwin
    • The first version of Darwin, 0.1, was released on March 16, 1999 as a fork of a developer release of Rhapsody. Although Darwin is an operating system in itself, it's really a collection of technologies that have been integrated by Apple to form a major, central part of Mac OS X. By the way a learning for me was that critical application environments of Mac OS X, like Cocoa and Carbon, are not part of Darwin. I simply did not know this until doing the research for this piece.
    • So what's in Darwin?
If you don't believe that Darwin is a mash up of many technology's consider that starting with Darwin 7.0.x (corresponding to Mac OS X 10.3.x) Darwin consists of over 250 packages.

      • Many of these are Apple packages (including the Mac OS X kernel and various drivers), while the others originate from *BSD, GNU, etc.
      • Apple has leveraged a lot of existing open source software by integrating it well (usually) with their system: Some of the technologies read like a who’s who of application development: apache, bind, binutils, cvs, gcc, gdb, gimp_print, kerberos, mysql, openssh, openssl, pam, perl, postfix, ppp, python, rsync, samba, and many more BSD/GNU/other packages ... are all part of Darwin.
      • The one thing you can count on with Darwin is that in a lot of case, Apple has made important modifications to open source code to optimize/adapt it to their platform which helps create a unique version of an OS and this is why they charge for it and it’s not just in the Open Source space.

  • Any house is built of layers
    • Mac OS X like any operating system is built of layers of operations. It is a very difficult thing to describe but let me try by using the metaphor of building a house.
Any house needs a good foundation or it will surely fall. Well MAX OS Ten's foundation starts with the hardware.

  • We need a physical computer to run the OS. That in essence is our foundation on which the house rests. Apple Inc was Apple computer just a few months ago and they have always said they are primarily a hardware company not a software company. Now I necessarily agree with this today but the MAC hardware certainly is the foundation of OS X as it does not run on any other system (unless it’s hacked of course)
      • The framing for the walls of our house come in the form of the Open Firmware. Open Firmware is a non-proprietary, platform (CPU and system) independent boot firmware. Similar to a PC's BIOS, Open Firmware is stored in ROM and is the first stored program to be executed upon power-up.
I’m going to digress a bit here and teach you how to get into Open Firmware. All you have to do is press the key combination cmd-opt-O-F just as you power on a Macintosh. Once you do this you should see a welcome message and some other verbiage, and should be dropped into a prompt . You can continue booting the machine by typing mac-boot, or shut it down by typing shut-down.

      • Next in our house is putting in the pipes fro the plubming, the core electrical wiring and finally the dry wall. The equivalent of all of this is the Kernel. The Mac OS X kernel, and it's object extensions make up the Kernel Environment, the lowest (most fundamental) layer of Mac OS X. These objects include. . .
        • XNU Mach: which takes care of preemptive multitasking, including kernel threads, protected memory, virtual memory management, inter-process communication ,interrupt management and other things.

        • Next is BSD: BSD component uses FreeBSD as the primary reference codebase. Some aspects that BSD is responsible for include: * process model, user ids, permissions, basic security policies, the TCP/IP stack, BSD sockets, and firewall

        • The I/O Kit uses a restricted subset of C++ (based on Embedded C++) as its programming language. This system is responsible for input and output, throwing exceptions and too many low level functions to get into here.
      • Once our foundation is poured, the walls are framed, plumbing is in and electrical is done, and dry wall is hung we can start building our house even more with some the Core services layer In Darwin
        • The Core Services layer can be visualized as sitting atop the kernel. This layer's most important sub-components are CoreFoundation.framework and CoreServices.framework. It contains various critical non-GUI system services (including APIs for managing threads and processes, resource, virtual memory and file system interaction):
        • Application Services. This layer can be visualized as being on top of Core Services. It includes services that make up the graphics and windowing environment of Mac OS X.The core of the windowing environment is called Quartz. Quartz consists of broadly two entities: Quartz Compositor: consists of the window server (the WindowServer program) and some private libraries. Quartz implements a layered compositing engine, in which every pixel on a screen can be shared between different windows in real time.
        • Next comes the Application Environments which to are equivalent to the final touches or our home. The carpet, wood flooring, nice kitchen cabinets, toilets that flush etc. They provide the programming environments that all of our favorite OS X programs depend on and that we must have in order to have what we call our "mac user experience"


These include:

      • BSD: This application environment is similar to a traditional *BSD system and provides a BSD-based POSIX API. It consists of a BSD runtime and execution environment. Mac OS X uses FreeBSD as a reference code base for its BSD derivations.
      • Carbon: This is a set of procedural C-based APIs for Mac OS X that are based on the "old" Mac OS 9 APIs.
      • Classic: This is a compatibility environment so that Mac OS 9 applications can be run on Mac OS X. The Classic application is technically a virtualizer that runs in a protected memory environment, with multiple processes in Mac OS 9 layered on top of one BSD process.
      • Cocoa: This is an object-oriented API for developing applications written in Objective-C and Java. Cocoa is an important inheritance from NEXTSTEP . It is very well supported by Apple's rapid development tools, and is the preferred way of doing things on Mac OS X if what you want to do can be done through Cocoa. There are many parts of Mac OS X that have not "converted" to Cocoa completely, or at all. A Cocoa application can call the Carbon API. Cocoa is largely based on the OpenStep frameworks, and consists of primarily two parts: the Foundation (fundamental classes) and the Application Kit (classes for GUI elements).
      • Java: This environment consists of a JDK, both command-line and integrated with Apple's IDE, a runtime (Hotspot VM, JIT), and various Java classes (AWT, Swing, ...).

So now we have our OS X house built and you probably know a bit more about OS X than you wanted to. I must say I really enjoyed doing the research for this show and better understanding what the compoments that make OS X special are. I hope you enjoyed listening to this as much as I enjoyed recording it. As always let me know at typicalmacuser@gmail.com

SHOW ENDING:

When adding, put a star "*" and space " " before items.
Use hyphens "-" to cross items out

Comments (0)

You don't have permission to comment on this page.