Transcript
Page 1: Mac OS X Panther Operating System

Mac OS X PantherOperating System

Tomomi Kotera

CS 550 Section 3

Fall 2003

Page 2: Mac OS X Panther Operating System

Presentation Overview

• Overview of Mac OS X– System Architecture

• Key technologies– CPU scheduling– Symmetric Multiprocessing– Memory Management

• Conclusion

Page 3: Mac OS X Panther Operating System

Overview of Mac OS X

• UNIX-based Operating System with the intuitive user interface called Aqua

• “Classic” Mac OS vs. Newer Mac OS

• Four major successes of Mac OS X– Preemptive Multitasking– Symmetric Multiprocessing– Memory Protection– Virtual Memory

Page 4: Mac OS X Panther Operating System

System Architecture• Four layers of system software

– Application Environments– Application Services– Core Services– Kernel Environments

Page 5: Mac OS X Panther Operating System

Preemptive Multiprocessing

• Cooperative multitasking (Classic Mac OS) vs. Preemptive Multiprocessing (Mac OS X)

• Preemptive Multiprocessing– Multilevel Feedback Queue Scheduling

Algorithm – Round Robin Scheduling Algorithm

Page 6: Mac OS X Panther Operating System

Preemptive Multiprocessing (cont.)

• Multilevel Feedback Queue Scheduling Algorithm– 128 priority levels are divided into four bands

• Normal (0-51) • System High Priority (52-79)• Kernel Mode Only (80-95) • Real-Time Threads (96-127)

– Real-Time Threads are treated differently– Avoid Starvation– Threads migrate within a given band

Page 7: Mac OS X Panther Operating System

Symmetric Multiprocessing

• Dual processor capabilities

• Share Memory and I/O bus

• Kernel can execute on any processor

Page 8: Mac OS X Panther Operating System

Memory Protection

• Crush Resistant– Processes are isolated in own memory

spaces– Cannot interfere one another– If one applications crashes, the system, and

other applications are unaffected - no restarts

Page 9: Mac OS X Panther Operating System

Virtual Memory

• Classic Mac OS uses Segmentation

• Mac OS X adopts Demand Paging– Large, sparse virtual address spaces

– Mapping a page reference to a physical address

application

pager

Pagefault

resume

Address spaceFunction call

Page 10: Mac OS X Panther Operating System

Virtual Memory (cont.)• VM Object (Virtual Memory Object)

– Object-oriented nature of Mach– Contiguous repository for data

indexed by byte– All data in an address space is

provided through VM objects– Track and manage the resident

and nonresident pages

• Memory Sharing– Inheritance (shared, copy, none)– Copy-on-Write

Page 11: Mac OS X Panther Operating System

Virtual Memory (cont.)

• Content of a VM objectField Description

Resident pages

List of resident pages in physical memory

Size The size of the region, in bytes

Pager The pager responsible for tracking and handling the pages of this region in backing store

Shadow Used for copy-on-write optimizations

Copy Used for copy-on-write optimizations

Attributes Flags indicating the state of various implementation details

Page 12: Mac OS X Panther Operating System

Virtual Memory (cont.)

• Second-chance first in, first out (FIFO) Algorithm

• Three lists of physical memory pages

List Description

Active list

pages that are currently mapped into memory and have been recently accessed

Inactive list

pages that are currently resident in physical memory

Free list pages of physical memory that are not associated with any address space of the page table

Page 13: Mac OS X Panther Operating System

Virtual Memory (cont.)• Continuously check the free list• When the number of pages in the free list dips

below this threshold, remove pages from the inactive list to place them on the free list

• Always maintains a few pages on the inactive list

• Once the free list size exceeds the target threshold, the pager rests

• FIFO-like page replacement • The inactive list serves as a second chance

Page 14: Mac OS X Panther Operating System

Conclusion

• Technical Success of Mac OS X– Marriage of stability, reliability and security of

UNIX, with the ease of use of the Macintosh GUI

– Benefits from UNIX features• Preemptive Scheduling

• Symmetric Multiprocessing

• Memory Management

– Target both home users and IT professionals


Recommended