 Create an abstract machine environment  A nicer environment than bare hardware  Consists of multiple, autonomous abstract components  Components.

Slides:



Advertisements
Similar presentations
Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Advertisements

Threads, SMP, and Microkernels
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Chap 2 System Structures.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
1 OS Structure, Processes & Process Management. 2 Recap OS functions  Coordinator  Protection  Communication  Resource management  Service provider.
Computer Systems/Operating Systems - Class 8
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6 Implementing Processes, Threads, and Resources.
© 2004, D. J. Foreman 1 O/S Organization. © 2004, D. J. Foreman 2 Topics  Basic functions of an OS ■ Dev mgmt ■ Process & resource mgmt ■ Memory mgmt.
Course Overview Introduction Computer System Structures
Chapter 2: Operating-System Structures
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
Process Management. External View of the OS Hardware fork() CreateProcess() CreateThread() close() CloseHandle() sleep() semctl() signal() SetWaitableTimer()
Chapter 6 Implementing Processes, Threads, and Resources.
Silberschatz, Galvin and Gagne  Operating System Concepts Common OS Components Process Management Memory Management File Management I/O System.
OS Organization. OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Concurrency Thread abstraction of.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Operating System Organization
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Ceng Operating Systems
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Protection and the Kernel: Mode, Space, and Context.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
April 2000Dr Milan Simic1 Network Operating Systems Windows NT.
Windows XP. History Windows XP is based on the NT kernel developed in 1988 Windows XP is based on the NT kernel developed in 1988 XP was originally sold.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Windows NT Operating System. Windows NT Models Layered Model Client/Server Model Object Model Symmetric Multiprocessing.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Processes Introduction to Operating Systems: Module 3.
Operating System Organization Chapter 3 Michelle Grieco.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
2 Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Introduction to Operating Systems Concepts
Computer System Structures
Chapter 3: Windows7 Part 1.
OS Organization.
Threads, SMP, and Microkernels
Lecture Topics: 11/1 General Operating System Concepts Processes
B.Ramamurthy Chapter 2 : Appendix
Operating Systems: A Modern Perspective, Chapter 3
OS Organization.
Implementing Processes, Threads, and Resources
Outline Operating System Organization Operating System Examples
O/S Organization © 2004, D. J. Foreman.
Operating Systems Structure
O/S Organization © 2004, D. J. Foreman.
Presentation transcript:

 Create an abstract machine environment  A nicer environment than bare hardware  Consists of multiple, autonomous abstract components  Components may be in use concurrently  Coordinate the use of the components  Resource manager  Manage according to the policies of the machine’s administrator 2

Exact set of functions required depends on engineering and marketing choices but each function falls in one of these categories:  Device management  Process, thread, and resource management  Memory management  File management 3

4 Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager

 OS uses policies chosen by designer or system administrator to manage  Allocation  Isolation  Sharing  Device manager in two parts  Device independent – provides unified interface  Device dependent – device driver: handles those aspects unique to a device 5

6 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

7 Application Process Application Process File Manager File Manager Device Controller Command Status Data Hardware Interface System Interface Device-Independent Device-Dependent

8 read(device, …); Data Device Controller Command Status Data read driver write driver Hardware Interface System Interface Device Status Table Device Handler Device Handler Interrupt Handler Interrupt Handler 6 7 8a 8b 9 3

9

10

11 Protection Deadlock Synchronization Process Description Process Description Resource Manager Resource Manager Resource Manager Resource Manager Resource Manager Resource Manager Process Mgr Scheduler CPU Other H/W

12 … Processor Primary Memory Abstract Resources Multiprogramming Thread Abstraction Thread Abstraction Process Abstraction Process Abstraction Generic Resource Manager Generic Resource Manager Other

13 Primary Memory Process Manager Process Manager Block Allocation Block Allocation Virtual Memory Virtual Memory Isolation & Sharing Isolation & Sharing Storage Devices

14

15

16

17

18 Scheduler IPC Process/Thread Admin Synchronization Memory Allocation Virtual Memory File Management Device Management Resource Management Deadlock Management Protection Mechanisms Interrupt Handler

19 Application Software Application Software Other System Software Other System Software Other OS Functions Kernel Functions Application Software Application Software Other System Software Other System Software Other OS Functions Nucleus Functions Application Software Application Software Other System Software Other System Software Other OS Functions Nucleus Functions Application Software Application Software Other System Software Other System Software Other OS Functions Skeletal Nucleus Nucleus Functions (a) Monolithic (b) Modular (microkernel) (c) Extensible(d) Layered

 Two recurring issues in design  Performance  Exclusive use of resources  Three basic implementation mechanisms  Processor modes  Kernels  Method of invoking system service 20

 Must be as efficient as possible in use of resources (especially processor and memory)  Every design issue MUST be evaluated wrt its contribution to functionality of system AND its impact on performance  Seek to minimize “overhead” of the system wrt the applications running on the system  Increased hardware performance does allow added functionality in spite of inefficiency 21

22

 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 23

 Security depends on correct operation of software  trusted vs. untrusted software  Need to insure that untrusted software cannot change trusted software  Can limit the function of the OS  Guiding a manned spaceship  Managing a nuclear reactor 24

 Mode bit: Supervisor or User mode  Some processors may have more than one mode  Supervisor mode (privileged, protected)  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 25

 Ensures proper operation of a computer system  Protect the operating system and all other programs and their data from any malfunctioning program  Protection is needed for any shared resource  Trusted OS software runs in supervisor mode  All other software runs in user mode 26

 Supervisor mode  all instructions are legal  all addresses are absolute physical addresses (base and bound are not used)  User mode  instructions that modify control registers are illegal  all addresses must be less than bound and have base added to them 27

 Instructions that can only be executed in the supervisor mode are called supervisor, privileged, or protected instructions  I/O instructions are privileged instructions  A user program in user mode cannot perform its own I/O  Instruction to change the mode is a privileged instruction  Instruction to set the halt flag is a privileged instruction 28

 When A is using processor, register points to its object  When B is using processor, register does not point to A’s object 29 Process A Supervisor Program Supervisor Program A’s Protected Object A’s Protected Object Processor Process B

 Kernels  Critical parts of OS that run in supervisor mode  Have access to other parts of the kernel  Trusted software  Extensions to the OS execute in user mode  The trap instruction is used to switch from user to supervisor mode, entering the OS 30

31 S Mode Trusted Code trap UserSupervisor Branch Table 2 31

32 … fork(); … fork() { … trapN_SYS_FORK() … } sys_fork() sys_fork() { /* system function */ … return; } Kernel Trap Table

 Two techniques  System call  Message passing 33 call(…); trap return;

 For the system  through a trap instruction which causes an interrupt  Hardware saves PC and current status information  Hardware changes mode to system mode  Hardware loads PC from system call interrupt vector location.  Execute the system call interrupt handler  return from the handler, restores PC and other saved status information  User process continues. 34

35 … fork(); … fork() { … trapN_SYS_FORK() … } sys_fork() sys_fork() { /* system function */ … return; } Kernel Trap Table

 Parameter passing  Through registers  System call number passed through register  Parameters are passed through registers  Returned value is also passed through a register to C/C++  Through a table in memory  Pass the address of the table in a register  Through the stack  Push the parameters on the stack by the user program  Pop the parameters off the stack by the O.S. 36

37 User SpaceKernel Space fork(); sys_fork() { } Thread

 Two techniques  System call  Message passing 38 send(…, A, …); receive(…, B, …); receive(…A, …); … send(…, B, …); send/receive

39 Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager

 UNIX  MACH  MS-DOS  Windows NT  OS/2  MacOS 40

 One of the most popular operating systems  First version released in 1969  By Ken Thompson & Dennis Ritchie at Bell Labs  ACM Turing Award – 1983  National Medal of Technology – 1999  Japan Prize for Information and Communications – 2011  Widely used in universities and research organizations  Time-sharing system  Supports multiple processes  Disk files and I/O devices are treated similarly 41

42

 Written in a high-level language.  Distributed in source form.  Provided powerful operating-system primitives on an inexpensive platform.  Small size, modular, clean design. 43

 Designed to be a time-sharing system  Has a simple standard user interface that can be replaced.  File system with multilevel tree-structured directories.  Files are supported by the kernel as unstructured sequences of bytes.  Supports multiple processes; a process can easily create new processes.  High priority given to making system interactive, and providing facilities for program development. 44

45 Libraries Commands Device Driver 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 …

 UNIX is copyrighted – now supported by SCO  long litigious story there!  Open source variations  freebsd   Linux  many distributions 46

 32-bit preemptive multitasking operating system for modern microprocessors.  Key goals for the system:  portability  security  POSIX compliance  multiprocessor support  extensibility  international support  compatibility with MS-DOS and MS-Windows applications.  Uses a micro-kernel architecture.  Available in two versions, Windows NT Workstation and Windows NT Server.  In 1996, more NT server licenses were sold than UNIX licenses 47

48 Processor(s)Main MemoryDevices Libraries Process Subsystem User 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

 In 1988, Microsoft decided to develop a “new technology” (NT) portable operating system that supported both the OS/2 and POSIX APIs.  Originally, NT was supposed to use the OS/2 API as its native environment but during development NT was changed to use the Win32 API, reflecting the popularity of Windows

 Extensibility — layered architecture.  NT executive, which runs in protected mode, provides the basic system services.  On top of the executive, several server subsystems operate in user mode.  Modular structure allows additional environmental subsystems to be added without affecting the executive. 50

 Portability — NT can be moved from one hardware architecture to another with relatively few changes.  Written in C and C++.  Processor-dependent code is isolated in a dynamic link library (DLL) called the “hardware abstraction layer” (HAL).  Reliability — NT uses hardware protection for virtual memory, and software protection mechanisms for operating system resources. 51

 Compatibility — applications that follow the IEEE (POSIX) standard can be complied to run on NT without changing the source code.  Performance — NT subsystems can communicate with one another via high- performance message passing.  Preemption of low priority threads enables the system to respond quickly to external events.  Designed for symmetrical multiprocessing.  International support — supports different locales via the national language support (NLS) API. 52

 Layered system of modules.  Protected mode — HAL, kernel, executive.  User mode — collection of subsystems  Environmental subsystems emulate different operating systems.  Protection subsystems provide security functions. 53