Darwin - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Darwin

Description:

File System and Networking part of BSD. Mach handles Scheduling ... MS-DOS (FAT) AFP. NFS. WebDav. SMB/CIFS. Virtual File System. 22. HFS plus. Volume Header ... – PowerPoint PPT presentation

Number of Views:139
Avg rating:3.0/5.0
Slides: 31
Provided by: tcnj
Category:
Tags: darwin | dos

less

Transcript and Presenter's Notes

Title: Darwin


1
Darwin
  • Kevin Centofanti
  • Jason Snyder
  • Kevin Turner

2
What is it?
  • Unix core to the Mac OS X Operating System
  • Based on BSD 4.3 and Mach 3.0
  • File System and Networking part of BSD
  • Mach handles Scheduling and Memory Management

3
Mac OS X Architecture
4
Mac OS X Architecture
5
Mac OS X Kernel Architecture
6
Scheduling
  • Tasks Basic unit of resource ownership
  • Contains address space, threads, and ports
  • Threads Unit of CPU execution within a task
  • Ports - Communication channel with associated
    rights

7
Scheduling Policy
  • Originally developed as part of Mach at CMU
  • Combination of Real Time and traditional
    scheduling
  • Allows for multimedia applications to run
    simultaneously with interactive applications

8
Priority Bands
  • Normal - Normal application thread priorities
  • System High - Above normal
  • Kernel Mode - Threads created in kernel that have
    higher priority than user threads
  • Real Time - Priority is based on getting a
    well-defined fraction of total clock cycles

9
  • Task priority can move up or down but only within
    a priority band
  • Computation heavy tasks given low priority to
    improve response time of interactive tasks
  • Still run frequently as most high priority I/O
    tasks do a small amount of processing then block,
    allowing low priority tasks to run again

10
Real Time Threads
  • Real time threads are treated differently by
    scheduler.
  • Must tell scheduler how many cycles it needs a
    of next b cycles
  • Soft real time so kernel tries to honor request
  • If thread uses too many cycles it may be demoted
    to normal priority

11
Memory Management
  • handled by Mach 3.0

12
Kernel Abstractions
  • Address space -  populated by memory objects
  • Memory objects -  units of memory management

13
Virtual Addresses
  • Demand Paging

14
Pagers
  • pager - owner of a memory object
  • default pager - handles non-persistent memory,
    known as anonymous memory
  • vnode pager - maps files into memory objects

15
Default Pager
  • anonymous memory - zero-initialized, exists only
    during the life of a task

16
vnode Pager
  • maps files into memory objects
  • EMMI - External Memory Management Interface

17
Memory Management
  • named memory entries - virtual memory handles,
    denoted by ports

18
Direct Allocation
  • vm_allocate

19
Shared Ranges
  • shared memory window - named entry mapped in two
    tasks
  • inheritance - new tasks cloned from parent
  • copy-on-write - delayed copy

20
Another Form of Sharing
  • named region - a form of a named entry, backed by
    a virtual map fragment instead of a virtual
    memory object
  • virtual map fragment - hold mappings to numerous
    virtual memory objects

21
Darwin Virtual File System
  • Layer between operations and storage devices
  • Uses Access Control Lists
  • Simplifies User Experience

22
HFS plus
  • Volume Header
  • Allocation File
  • Catalog File
  • Extent Overflow File
  • Startup File
  • Forks
  • data fork
  • resource fork

23
Journaling
  • log operations before taking action
  • data recovery
  • built in support in HFS
  • supported by VFS other FS
  • transaction
  • commit
  • replay

24
(No Transcript)
25
Symbolic Links Aliases
  • symbolic links rely on pathname
  • Apples aliases store pathname and unique
    identifier
  • Aliases update as changes are made in file system

26
Device Drivers
  • I/O Kit Completely redesigned to support OO
  • Implemented as a subset of C to support code
    reuse
  • Provides an abstract view of hardware to the
    upper layers of OS X

27
Families
  • Collection of abstractions for a specific type of
    device
  • Example SCSI, USB, Firewire, Disk, HCI
  • Devices of the same type share many operations
  • Developers only have to code for quirks of
    individual devices
  • Resultant drivers are up to 75 smaller than Mac
    OS 9 counterparts

28
Drivers
  • I/O Kit object that manages a specific device or
    bus
  • Upon loading, its dependent families are loaded
    to provide common functionality
  • Drivers maintain list of all dependent families
    in a property list

29
Nubs
  • I/O Kit object that represents a connection to a
    device
  • Loaded as a part of the family that instantiates
    it
  • Provides access to the device and services such
    as arbitration and power management

30
References
  • Golub, David Operating System Support for
    Coexistence of Real-Time and Conventional
    Scheduling School of Computer Science Carnegie
    Mellon University
  • Apple Kernel Programming Guide http//developer.ap
    ple.com/documentation/Darwin/Conceptual/KernelProg
    ramming/index.
  • HFS Plus Volume Formathttp//developer.apple.com/
    technotes/tn/tn1150.html
  • The home of Hexley the Platypus The Darwin-OS
    Mascot http//www.hexley.com/
Write a Comment
User Comments (0)
About PowerShow.com