Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.

Similar presentations


Presentation on theme: "Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3."— Presentation transcript:

1 Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3

2 Slide 3-2 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization

3 Slide 3-3 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Purpose of an OS The Abstractions Create the Abstractions Coordinate Use of the Abstractions Processes

4 Slide 3-4 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Thread abstraction of CPU within address space –Resource abstraction “Anything a process can request that can block the process if it is unavailable” NT uses “object abstraction” to reference resources –File abstraction of secondary storage use

5 Slide 3-5 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 DOS -- Resource Abstraction Only Processor(s)Main MemoryDevices Program OS Services Libraries ROM Routines

6 Slide 3-6 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 OS Requirements (cont) Provide resource abstractions Manage resource sharing –Time/space-multiplexing –Exclusive use of a resource –Isolation –Managed sharing

7 Slide 3-7 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Abstraction & Sharing Processor(s)Main MemoryDevices Libraries ROM Routines Program State Process Program State Process Program State Process OS Services Abstraction Manage sharing

8 Slide 3-8 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 OS Design Constraints Performance Protection and security Correctness Maintainability Commercial factors Standards and open systems

9 Slide 3-9 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Performance The OS is an overhead function  should not use too much of machine’s resources Minimum functionality is to implement abstractions Additional function must be traded off against performance –DOS: one process –UNIX: low level file system

10 Slide 3-10 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Protection & Security Multiprogramming  resource sharing Therefore, need software-controlled resource isolation Security policy: Sharing strategy chosen by computer’s owner Protection mechanism: Tool to implement a family of security policies

11 Slide 3-11 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Correctness & Maintainability Security depends on correct operation of software  trusted vs untrusted software Maintainability relates to ability of software to be changed If either is sufficiently important, can limit the function of the OS –Guiding a manned spaceship –Managing a nuclear reactor

12 Slide 3-12 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Device Management Device-Independent Part Device-Independent Part Device-Dependent Part Device-Dependent Part Device … Device-Dependent Part Device-Dependent Part Device-Dependent Part Device-Dependent Part

13 Slide 3-13 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Process, Thread, and Resource Management … Processor Primary Memory Abstract Resources Multiprogramming Thread Abstraction Thread Abstraction Process Abstraction Process Abstraction Generic Resource Manager Generic Resource Manager Other

14 Slide 3-14 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Memory Management Primary Memory Process Manager Process Manager Block Allocation Block Allocation Virtual Memory Virtual Memory Isolation & Sharing Isolation & Sharing Storage Devices

15 Slide 3-15 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Exclusive Access to a Resource Process A Supervisor Program Supervisor Program A’s Protected Object A’s Protected Object Processor Process B

16 Slide 3-16 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Processor Modes Mode bit: Supervisor or User mode Supervisor mode –Can execute all machine instructions –Can reference all memory locations User mode –Can only execute a subset of instructions –Can only reference a subset of memory locations

17 Slide 3-17 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Kernels The part of the OS critical to correct operation (trusted software) Executes in supervisor mode The trap instruction is used to switch from user to supervisor mode, entering the OS

18 Slide 3-18 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Supervisor and User Memory User Space User Space Supervisor Space Supervisor Space User Process User Process Supervisor Process Supervisor Process

19 Slide 3-19 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Procedure Call and Message Passing Operating Systems call(…); trap return; send(…, A, …); receive(…, B, …); receive(…A, …); … send(…, B, …); send/receive

20 Slide 3-20 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 System Call Using the trap Instruction … fork(); … fork() { … trapN_SYS_FORK() … } sys_fork() sys_fork() { /* system function */ … return; } Kernel Trap Table

21 Slide 3-21 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 A Thread Performing a System Call User SpaceKernel Space fork(); sys_fork() { } Thread

22 Slide 3-22 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Basic Operating System Organization Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager

23 Slide 3-23 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Libraries Commands Device Driver The UNIX Architecture Interactive User Application Programs Application Programs OS System Call Interface Device Driver Driver Interface … Monolithic Kernel Module Process Management Memory Management File Management Device Mgmt Infrastructure Trap Table …

24 Slide 3-24 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Microkernel Organization Device Drivers Microkernel Processor(s)Main MemoryDevices Libraries Process Server User Supervisor

25 Slide 3-25 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Windows NT Organization Processor(s)Main MemoryDevices Libraries Process Subsystem User Supervisor Subsystem Hardware Abstraction Layer NT Kernel NT Executive I/O Subsystem T T T T T T TT T Process Management Memory Management File Management Device Mgmt Infrastructure

26 Slide 3-26 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Monitoring the Kernel Processor(s)Main MemoryDevices Libraries Process Subsystem Hardware Abstraction Layer NT Kernel NT Executive I/O Subsystem T T T T T T TT T Task Manager pview pstat Supervisor User


Download ppt "Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3."

Similar presentations


Ads by Google