1 / 25

Mac OS X

Mac OS X. CS-351 (Operating Systems), Spring 2001) Section 1 Term Project by Jonathan Chapin - chapinjs@jmu.edu - x7785 Brian Jones - jonesba@jmu.edu 442-9251 Frank Machnick - machnife@jmu.edu 435-7922 Paul Veraa - veraapr@jmu.edu - 438-4064. Mac OS X: Overview & System Fundamentals.

amos-mcleod
Download Presentation

Mac OS X

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mac OS X CS-351 (Operating Systems), Spring 2001) Section 1 Term Project by Jonathan Chapin - chapinjs@jmu.edu - x7785 Brian Jones - jonesba@jmu.edu 442-9251 Frank Machnick - machnife@jmu.edu 435-7922 Paul Veraa - veraapr@jmu.edu - 438-4064

  2. Mac OS X: Overview & System Fundamentals • Integrated desktop and server OS • Full replacement of OS 9 • Combines reliability and performance with simple and refined user interface expected of Mac • New, so not commercially successful

  3. Mac OS X: Overview & System Fundamentals (cont.) • A few problems - speed of GUI rendering sluggish • Mac 9 applications are emulated slowly

  4. Rebuilt from the ground up • Mach micro-kernel architecture • manages cpu usage and memory • handles scheduling • provides memory protection • provides a messaging infrastructure

  5. To provide more efficiency • FreeBSD • file system management, • networking, • security policies, • the standard BSD process model with process IDs and signals. • It also provides the standard POSIX threads implementation which many applications (such as MySQL) find very useful.

  6. Improvements • Enhancements have been added to the file system buffer cache and file I/O clustering. • adaptive and speculative read ahead, • user process controlled read ahead, • and time aging of the file system buffer cache • Additions to file system: • HFS, HFS+, and Apple extensions to the ISO9660 CD file system standard.

  7. Enhanced state of the Art? • Quartz graphics subsystem • PDF for all graphics • dynamic resizing • vectors instead of bitmap • Reliability and functionality are a reality • Supports symmetric multiprocessing

  8. Allowable process states

  9. Process Management • Getting Process Information • GetCurrentProcess: Gets information about the current process, if any. • GetFrontProcess: Gets the process serial number of the front process. • GetNextProcess: Gets information about the next process, if any, in the Process Manager's internal list of open processes. • GetProcessInformation: Get information about a specific process. • SameProcess: Determines whether two process serial numbers specify the same process. • SetFrontProcess: Sets the front process. • WakeUpProcess: Makes a process suspended by WaitNextEvent eligible to receive CPU time.

  10. Process Management • Launching Applications and Desk Accessories • LaunchApplication: Launches an application. • LaunchDeskAccessory: Launches desk accessories. Use this function only when your application needs to launch a desk accessory for some reason other than the user's choosing one from the Apple menu.

  11. Process Management • Terminating Processes • ExitToShell: Terminates your application directly.

  12. Memory Management • Accessing Heap Zones • ApplicationZone: Returns a pointer to the original application heap zone. • GetZone: Returns a pointer to the current heap zone. • HandleZone: Returns a pointer to the heap zone containing a specified handle. • PtrZone: Returns a pointer to the heap zone containing a specified pointer. • SetZone: Changes the current heap zone. • SystemZone: Returns a pointer to the system heap zone.

  13. Memory Management • Allocating Temporary Memory • TempFreeMem: Returns the total amount of memory available for temporary allocation. • TempMaxMem: Compacts the current heap zone and returns the size of the largest contiguous block available for temporary allocation. • TempNewHandle: Allocates a new relocatable block of temporary memory.

  14. Memory Management • Allocating and Releasing Nonrelocatable Blocks of Memory • DisposePtr: Releases memory occupied by a nonrelocatable block. • NewPtr: Allocates a nonrelocatable block of memory of a specified size. • NewPtrClear: Allocates a nonrelocatable block of memory of a specified size with all its bytes set to 0. • NewPtrSys: Allocates a nonrelocatable block of memory of a specified size in the system heap. • NewPtrSysClear: Allocates a nonrelocatable block of a specified size in the system heap with all its bytes set to 0.

  15. File Management • Accessing Information About Files and Directories on HFS Volumes • FSGetCatalogInfo: Returns catalog information about a file or directory. You can use this function to map an FSRef to an FSSpec. • FSSetCatalogInfo: Sets catalog information about a file or directory. • FSpGetFInfo: Obtains the Finder information for a file. • FSpSetFInfo: Sets the Finder information about a file. • HGetFInfo: Obtains the Finder information for a file. • HSetFInfo: Sets the Finder information for a file.

  16. File Management • Allocating Storage for Forks on HFS Plus Volumes • FSAllocateFork: Allocates space on a volume to an open fork. • PBAllocateForkAsync: Allocates space on a volume to an open fork. • PBAllocateForkSync : Allocates space on a volume to an open fork.

  17. File Management • Comparing File System References • FSCompareFSRefs: Determines whether two FSRef structures refer to the same file or directory. • PBCompareFSRefsAsync: Determines whether two FSRef structures refer to the same file or directory. • PBCompareFSRefsSync: Determines whether two FSRef structures refer to the same file or directory.

  18. File Management • Controlling Directory Access • PBHGetDirAccessAsync: Returns the access control information for a directory. • PBHGetDirAccessSync: Returns the access control information for a directory. • PBHSetDirAccessAsync: Changes the access control information for a directory. • PBHSetDirAccessSync: Changes the access control information for a directory.

  19. Threads • Multiple threads per process • Processes are called “tasks” • tasks are a collection of resource and contain threads • Threads are point of control inside of tasks • potentially execute in parallel (SMP) • minimal state and low overhead

  20. Types of threads • High priority real time - fixed priority • execute for certain quantum • Timesharing threads • piority is raised and lowered to balance its resource consumption against other threads

  21. Tasks • Expensive entities • cannot share resources with another task • All threads share task’s resources • Traps are requests for services to the Kernel on behalf of the thread • create, delete and state change

  22. Mutual Exclusion and Synchronization • Use of ports for unidirectional communication • Resources are referred to in object oriented fashion • Objects can have multiple ports • name and control ports

  23. Mutual Exclusion and Synchronization • Message queues - A message may consist of pure data, copies of memory ranges, port rights, kernel and implicit attributes, such as the sender s security token. • Semaphores - Counting semaphores supporting wait, post, and post all operations, but contain no data. • Notifications - support the post and wait methods, but with the addition of a state field. Each post overwrites the previous state. \ • Locksets - During the transaction, the thread holds the lock. When it returns from the transaction, the lock is released. • Remote procedure calls (RPC) - RPCs are designed to facilitate and optimize remote procedure calls.

  24. Scheduling • Mac OS 9 was Cooperative Multitasking • Depends on honest processe • Max OS X - preemptive multitasking with dynamic priority adjustment • Darwin assigns priorities • Mach swapps processes • Preemption: time-sharing, round robin, and through first in first out (FIFO) fixed priority.

  25. File Management • Supports several systems • Mac OS Extended Format, BSD standard file system format, the industry standard for networking file systems (NFS), and ISO 9660 • Third party file systems mounted through virtual file system

More Related