Mac OS X programming-System Architecture)

Source: Internet
Author: User

Chapter 1 system components and programming technologies

1. Mac OS X Introduction

Mac OS x is Apple's latest operating system. Based on UNIX, Mac OS X has an extremely beautiful interface Called Aqua:




2. Mac OS X Architecture

Mac OS X architecture:



2.1 user interface-User Interface Layer

1. Aqua is the Mac OS X user interface

2. For general users, Mac OS X = aqua

3. You can use resedit/interface builder to create the aqua interface.

2.2 application environments-ApplicationProgramEnvironment Layer


2.2.1 classic

1. Classic environment exists to be compatible with Mac OS 8/9 before Mac OS X

2. Classic environment is not a Mac OS X simulator. In fact, Mac OS x runs a virtual machine and starts a Mac OS 9 that is basically not changed. Mac OS x replaces the hardware abstraction layer of Mac OS 9 so that requests are transmitted to Mac OS X for execution.

2.2.2 carbon

1. Carbon is an old version of Mac OS's Macintosh toolbox API which has been removed and enhanced. The author thinks carbon = A enhanced subset of Macintosh toolbox API.

2. The carbon API is largely compatible with the old Macintosh toolbox API, and 70% of the API interfaces remain unchanged.

3. Apple added a number of new APIs to carbon to use the new features of Mac OS X.

4. In some cases, the program using the carbon API in Mac OS x can run on Mac OS 8/9 without modification.

5. It is relatively easy to port the old program written by the carbon API to Mac OS X.

6. The carbon API is designed for C and is not object-oriented. Similar to Windows APIs. C ++ can also use carbon. Other languages that can call C functions can call carbon API theoretically.

2.2.1 cocoa

1. Cocoa is a set of object-oriented frameworks specially designed for Mac OS x, so it cannot run on Mac OS 8/9.

2. The main cocoa programming languages are objective-C and Java. We recommend that you use objective-C.

2.2.1 Java

1. Mac OS X supports Java program execution and the latest JDK and Vm

2. Java can also be used to write cocoa programs

2.2.1 BSD

1. The BSD environment is used to support BSD tools and applications

2. Mac OS X supports the entire BSD API

2.3 Application Services-Application Service Layer


2.3.1 quartz & windows

1. 2d Z implements 2D drawing and window

2. quartz is based on PDF, so quartz supports automatic PDF generation

3. Most of quartz cannot be accessed directly using APIs.

4. quartz is similar to Windows user32.dll.

2.3.2 Quick Draw

1. Quick Draw is another API that supports 2D plotting.

2. Quick Draw can call most functions directly through APIS.

3. Quick Draw is similar to Windows's GDI/GDI +

2.3.3 OpenGL

Open GL is the standard API for Mac OS X 3D plotting. I don't need to talk about it any more.

2.3.4 quick time

1. Quick time is used to support multimedia functions of Mac OS X.

2. the quick time function can be called through APIS.

2.3.5 others

1. Process Manager provides Process Management

2. event manager provides Event Management

3. Clipboard provides access to the clipboard

2.4 core services-core service layer 2.4.1 carbon managers

1. A large number of system services are provided in the form of managers

2. File Manager provides access to files

3. text encoding conversion manager provides text operations

4. Memory Manager utilities provides access to memory

5. Thread manager provides thread access

6. etc.

2.4.2 Apple Events

1. Apple events is the communication between applications

2. Applications can send Apple Events to each other and reply to Apple Events

3. Apple events is mainly used by third-party programs to operate other programs, such as Apple Script

2.4.3 open transport

Opentransport provides network access and protocol support, such as TCP/IP.

2.4.4 core Foundation

Core Foundation provides support for services that are basically used by most programs, such as date operations and string operations.

2.5 kernel environment-kernel layer

Apple's kernel, also known as Darwin

2.5.1 mach

1. Mach is the core of Mac OS x and is modified on the basis of old Mach, mklinux, Mac OS x Server, and next OS.

2. Mach is a micro-kernel architecture, while a general Unix kernel is a monolithic kernel.

3. provides basic operating system services, such as process scheduling, IPC, SMP, and virtual memory management.

4. The unit of Mach scheduling is thread

2.5.2 BSD

1. Mac OS X implements the 4.4 BSD Kernel Based on the Mach kernel.

2. Mach has some unimplemented basic kernel functions, which are implemented by BSD kernel, such as I/O, file system, and network.

2.5.3 networking

1. Mac OS X network is implemented based on 4.4 BSD

2. Support for TCP/IP protocol stacks and sockets

2.5.4 I/O Kit

I/O kit is an object-oriented framework for writing driver

2.5.5 File System

1. Mac OS x supports the HPS (hierarchical filing system standard) and HPS + file systems supported by previous Mac OS

2. In addition, Mac OS X supports UFS (Unix File System), NFS (Network File System), and ISO 9660 (for CDROM)

Http:// OP = pre & curtime = 1312769487000
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.