Mac-OSX-by-Mike-Smith-2005

Download Report

Transcript Mac-OSX-by-Mike-Smith-2005

The Mac OS X Kernel
Michael C. Smith
CS 550 section 1
Fall 2005
Mac OS X version history
Mac OS X version Release date
Major features
10.0 “Cheetah”
March 24, 2001
- first complete overhaul of Mac OS since 1996
- far fewer “kernel panics” than in the Beta
release of September 2000
10.1 “Puma”
September 25,
2001
- minor system performance upgrades
-some missing features added (e.g., DVD
playback)
10.2 “Jaguar”
August 24, 2002
150 enhancements (according to Apple)
- more support for Windows-based networks
- upgraded graphics and networking software
- improved file manager (Finder)
10.3 “Panther”
October 24, 2003
- discontinued support for G3 computers
- further (cosmetic) upgrades to Finder
- new window management system (Exposé)
- improved PDF rendering for faster viewing
Mac OS X Kernel
2
Mac OS X version history
Mac OS X version Release date
Major features
10.4 “Tiger”
April 29, 2005
200 new features (according to Apple), but
support for older machines dropped
- metadata-based file search tool (Spotlight)
- new versions of iChat, QuickTime, and Safari
- Automator (automates repetitive tasks)
- screen reader for users with vision disabilities
(VoiceOver)
- 64-bit memory support for G5 computers
- updated UNIX utilities
10.4.1 – 10.4.3
Intel x86 versions
June – November
2005
- run on computers with Intel x86 processors
- feature parity with the PowerPC versions
10.5 “Leopard”
late 2006 / early
2007, anticipated
- support for both PowerPC- and Intel x86-based
Macintosh computers
Mac OS X Kernel
3
Mac OS X Architecture
Layers of Mac OS X
Mac OS layer
Features
User Experience
Aqua, Finder
Application
Environments
Classic, Carbon,
Cocoa, Java, X11
Application
Services
disc recording,
font management
Graphics and
Multimedia
2D / 3D graphics,
audio, video
Core Services
memory / process
management
Core OS
Mach, BSD,
device drivers
Mac OS X Kernel
4
Darwin and the XNU Kernel
•
•
•
•
•
•
XNU (XNU is Not Unix)
Mach 3.0, Carnegie Mellon University
FreeBSD (version of 4.4 BSD)
Darwin Operating System
version 0.1, March 1999
all open source, no proprietary technology
Mac OS X Kernel
5
Mach
Key UNIX concepts:
• OS consists of 2 parts
– utility programs that control most operations
– kernel that directs and supports these programs
• rest of system runs outside of the kernel
• processes communicate through unidirectional “pipes”
UNIX shortcomings:
• large memory footprint
• everything-is-a-file model insufficient for some modern
services
Mac OS X Kernel
6
Mach
Key Mach concepts:
• microkernel and servers
• tasks and threads
• ports, port rights, and inter-process
communication (IPC)
• “directing traffic” vs. kernel trap handling
• support for symmetric multi-processing
(SMP)
Mac OS X Kernel
7
Memory Management
•
•
•
•
•
•
•
handled by Mach VM manager
up to 4 GB for 32-bit applications
up to 18 exabytes for 64-bit applications
demand paging
Mac OS X memory protection vs. OS 9
program crash, not system crash
memory sharing through Mach messaging
Mac OS X Kernel
8
Tasks and Threads
Task:
• collection of system resources
• possesses its own virtual address space
• must contain at least one thread
Thread:
• all instructions executed by threads
• lightweight entity (low overhead, primarily register state)
• can execute concurrently with other threads, even
threads within the same task
Mac OS X Kernel
9
CPU Scheduling
•
•
•
•
preemptive vs. cooperative multitasking
prioritization of threads (time-sharing and fixed-priority)
real-time support
efficient use of CPU
Priority
Band
Characteristics
Normal
normal application thread priorities
System high
priority
threads whose priority has been raised above normal threads
Kernel mode
only
reserved for threads created inside the kernel that need to run at a higher
priority than all user space threads (I/O Kit workloops, for example)
Real-time
threads
threads whose priority is based on getting a well-defined fraction of total
clock cycles, regardless of other activity (in an audio player application)
Mac OS X Kernel
10
BSD
• management of system peripherals
• security model: user and group
identifications
• networking support via TCP/IP
• firewall services
• virtual file system
• command line environment
Mac OS X Kernel
11
End