Operating System Organization Chapter 3 Michelle Grieco.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Threads, SMP, and Microkernels
Operating System Structures
Distributed Systems Major Design Issues Presented by: Christopher Hector CS8320 – Advanced Operating Systems Spring 2007 – Section 2.6 Presentation Dr.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computer Systems/Operating Systems - Class 8
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
© 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.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
1: Operating Systems Overview
Figure 1.1 Interaction between applications and the operating system.
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
OS Organization. OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Concurrency Thread abstraction of.
Operating System Organization
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
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.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
 Create an abstract machine environment  A nicer environment than bare hardware  Consists of multiple, autonomous abstract components  Components.
April 2000Dr Milan Simic1 Network Operating Systems Windows NT.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Windows NT Operating System. Windows NT Models Layered Model Client/Server Model Object Model Symmetric Multiprocessing.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
CE Operating Systems Lecture 3 Overview of OS functions and structure.
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.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Processes Introduction to Operating Systems: Module 3.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Operating System Principles And Multitasking
Chapter 3 Operating System Organization
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
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.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Introduction to Operating Systems Concepts
Computer System Structures
Operating System Structure
Introduction to Operating System (OS)
Chapter 1: Introduction
OS Organization.
Threads, SMP, and Microkernels
Lecture 4- Threads, SMP, and Microkernels
Chapter 2: Operating-System Structures
Outline Chapter 2 (cont) OS Design OS structure
Operating Systems: A Modern Perspective, Chapter 3
OS Organization.
Outline Operating System Organization Operating System Examples
System calls….. C-program->POSIX call
Chapter 2 Operating System Overview
Chapter 2: Operating-System Structures
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Operating System Organization Chapter 3 Michelle Grieco

Outline Basic Functions of an OS Basic Functions of an OS Defining Requirements Defining Requirements Implementation Considerations Implementation Considerations OS Kernels of Today OS Kernels of Today Research in OS Research in OS

Purpose of an OS Creates abstractions Creates abstractions Multiple processes compete for use of processor Multiple processes compete for use of processor Coordination Coordination

Responsibilities of an OS Create an abstract machine environment with multiple, autonomous, abstract components (that can be in use concurrently) Create an abstract machine environment with multiple, autonomous, abstract components (that can be in use concurrently) Multiprogramming is used to create an abstract machine for each process Multiprogramming is used to create an abstract machine for each process Coordinate the use of the components according to the policies of the machine’s administrator Coordinate the use of the components according to the policies of the machine’s administrator Scheduler decides when and which processes get to use the processor Scheduler decides when and which processes get to use the processor

Basic Requirements an OS Must Satisfy Device Management Device Management Process, Thread and Resource Management Process, Thread and Resource Management Memory Management Memory Management File Management File Management

Device Management OS manages the allocation, isolation and sharing of devices according to policies chosen by the designer or system administrator. OS manages the allocation, isolation and sharing of devices according to policies chosen by the designer or system administrator. Devices treated in a general manner Devices treated in a general manner Special approaches for memory and processor Special approaches for memory and processor

Device Management Device-Independent Part Device-Dependent Part Device

Process, Thread and Resource Management Basic units of computation Basic units of computation Elements of the computing environment needed by a process so that its threads can execute. Elements of the computing environment needed by a process so that its threads can execute.

Process Management Unix Style Unix Style Includes management facilities to create, destroy, block, and run a process. Includes management facilities to create, destroy, block, and run a process. Thread Based Approach Thread Based Approach More complicated since it has to manage processes and threads as separate entities More complicated since it has to manage processes and threads as separate entities

Resource Manager Allocates resources to processes Allocates resources to processes Handles requests for resources from threads Handles requests for resources from threads Changes in status/changes in resource needs Changes in status/changes in resource needs

Memory Management Cooperates with process manager to allocate primary memory (executable or main) to each process Cooperates with process manager to allocate primary memory (executable or main) to each process Enforces isolation, methods to allow sharing of blocks of memory Enforces isolation, methods to allow sharing of blocks of memory Virtual Memory – allows processes to reference information stored on a storage device as if it were stored in primary memory. Virtual Memory – allows processes to reference information stored on a storage device as if it were stored in primary memory.

Memory Management Isolation and Sharing Virtual Memory Block Allocation Process Manager Memory Manager Primary Memory Storage Devices

File Management Why do we need a file manager? Why do we need a file manager? Provides an abstraction layer Provides an abstraction layer Distribution of information across networks Distribution of information across networks

OS Implementation Considerations & Mechanisms Considerations Considerations Performance Performance Exclusive Use of Resources Exclusive Use of Resources Mechanisms Mechanisms Processor Modes Processor Modes Kernels Kernels Methods of Invoking Service Methods of Invoking Service

Performance OS provides simplified programming interfaces OS provides simplified programming interfaces Manage resource allocation & sharing Manage resource allocation & sharing OS designers need to keep in mind… OS designers need to keep in mind… What is the cost? Efficiency vs. Convenience How much do these abstractions slow down the execution of a program? How much do these abstractions slow down the execution of a program? What is the performance cost of using files rather than commands to directly manipulate storage devices? What is the performance cost of using files rather than commands to directly manipulate storage devices? How much contribution to functionality of the system is derived versus the impact to performance? How much contribution to functionality of the system is derived versus the impact to performance?

Exclusive Use of Resources Multiprogrammed systems support multiple processes and threads that need to share resources. Multiprogrammed systems support multiple processes and threads that need to share resources. Design Principles: Design Principles: Do not to interfere with other processes Do not to interfere with other processes Cannot use a resource unless it is specifically authorized to Cannot use a resource unless it is specifically authorized to Allow both exclusive control to a process / or shared among a set of processes Allow both exclusive control to a process / or shared among a set of processes

Exclusive Use of Resources Implementation of Design Principles includes: Implementation of Design Principles includes: Protection Mechanisms via security policies Protection Mechanisms via security policies Defines strategies for managing resources Defines strategies for managing resources File Protection Policy Example File Protection Policy Example If OS enforces a policy, how do we prevent application software from overriding this policy? If OS enforces a policy, how do we prevent application software from overriding this policy? Trusted vs. Untrusted software and access barriers Trusted vs. Untrusted software and access barriers The kernel of the OS is trusted software The kernel of the OS is trusted software All other software is untrusted All other software is untrusted

Processor Modes The key hardware element for implementation of trusted software The key hardware element for implementation of trusted software Mode Bit (supervisor or user) Mode Bit (supervisor or user) Supervisor (privileged, protected) Supervisor (privileged, protected) Processor can execute every instruction Processor can execute every instruction User User Processor can execute only a subset of all instructions Processor can execute only a subset of all instructions

Kernels What is a kernel? What is a kernel? Design Decisions for what goes into the kernel? Design Decisions for what goes into the kernel? Everything but the kitchen sink? Everything but the kitchen sink? If it is in the kernel, it will have access to other parts of the kernel. If it is in the kernel, it will have access to other parts of the kernel. If it is executed in user mode, it won’t have access to kernel data structures. If it is executed in user mode, it won’t have access to kernel data structures.

Requesting Services from the OS Techniques to request service Techniques to request service System Call System Call User invokes a trap instruction User invokes a trap instruction Message Passing Message Passing User constructs a message that requests service User constructs a message that requests service

System Call User invokes trap instruction when application calls stub program (uses reference to trap table) User invokes trap instruction when application calls stub program (uses reference to trap table) Processor is switched to supervisor mode Processor is switched to supervisor mode Branches through trap table Branches through trap table Executes function to be invoked Executes function to be invoked OS finishes work and returns to user mode and returns control to user process. OS finishes work and returns to user mode and returns control to user process. Call (…); return (…); trap

Message Passing Message constructed that requests service (message A) Message constructed that requests service (message A) OS send() system call passes the message to trusted OS process (kernel). OS send() system call passes the message to trusted OS process (kernel). Executes trap Executes trap Kernel executes function while user waits for result of service request. (message receive A) Kernel executes function while user waits for result of service request. (message receive A) Kernel completes request it sends message B back to user process (send and receive B). Kernel completes request it sends message B back to user process (send and receive B). send (…, A, …); receive (…, B, …); send/receive receive (…, A, …); send (…, B, …);

Logical Organization of OS Process, Thread and Resource Manager Memory Manager File Manager Device Manager Processor(s)Main MemoryDevice(s)

Kernels of Today UNIX UNIX Windows NT Windows NT

UNIX Goals Goals Implement process, memory, file and device management in the kernel but only with minimal functionality to support a broad range of policies (bare essentials to read and write byte streams) Implement process, memory, file and device management in the kernel but only with minimal functionality to support a broad range of policies (bare essentials to read and write byte streams) Wanted to keep kernel as small as possible to improve efficiency Wanted to keep kernel as small as possible to improve efficiency Tailored further by use of application domains and application software to solve problems Tailored further by use of application domains and application software to solve problems Result Result Very large software module including all managers (process, memory, file and device) Very large software module including all managers (process, memory, file and device) Separate device drivers from kernel Separate device drivers from kernel Evolved from swapping systems to paging Evolved from swapping systems to paging Processing now addresses multiprocessor and distributed hardware configurations Processing now addresses multiprocessor and distributed hardware configurations Implementations are difficult to modify Implementations are difficult to modify IEEE POSIX.1 open systems standard IEEE POSIX.1 open systems standard No cost implementation LINUX No cost implementation LINUX

WINDOWS Goals Goals Extensible Extensible Portable Portable Reliable Reliable Secure Secure

Summary Value of functionality built into the OS must justify the performance cost Value of functionality built into the OS must justify the performance cost Modern OS includes managers for processes and resources including managers for memory, files, and devices Modern OS includes managers for processes and resources including managers for memory, files, and devices Implementation techniques include: the mode bit (supervisor/user) to ensure exclusive use of resources and to operate as trusted, system call interfaces and message passing mechanisms Implementation techniques include: the mode bit (supervisor/user) to ensure exclusive use of resources and to operate as trusted, system call interfaces and message passing mechanisms

Research Here are some sites of interest on new and innovative advances in Operating Systems: Here are some sites of interest on new and innovative advances in Operating Systems: PalmOS Cobalt 6.1 is the next generation of Palm OS. It will enable the creation of new categories of devices for the communications, enterprise, education and entertainment markets. Palm OS Cobalt 6.1 provides integrated telephony features, support for WiFi and Bluetooth, and enhancements to the user interface. PalmOS Cobalt 6.1 is the next generation of Palm OS. It will enable the creation of new categories of devices for the communications, enterprise, education and entertainment markets. Palm OS Cobalt 6.1 provides integrated telephony features, support for WiFi and Bluetooth, and enhancements to the user interface. MIT’s AEGIS – no runtime kernel, extreme performance gain MIT’s AEGIS – no runtime kernel, extreme performance gainhttp:// Flux Project at University of Utah – build your own OS using OS bricks (an OS toolkit) Flux Project at University of Utah – build your own OS using OS bricks (an OS toolkit) 2K (formerly known as SPINE) is a distributed, reflective, component-based, adaptable operating system being built by researchers at the Systems Software Research Group from the University of Illinois at Urbana- Champaign and the Systems and Communications Group from the Universidad Carlos III - Madrid. 2K (formerly known as SPINE) is a distributed, reflective, component-based, adaptable operating system being built by researchers at the Systems Software Research Group from the University of Illinois at Urbana- Champaign and the Systems and Communications Group from the Universidad Carlos III - Madrid write your own OS write your own OS

Questions You should be able to answer the following questions about this chapter: You should be able to answer the following questions about this chapter: 1. What is multiprogramming? 1. What is multiprogramming? 2. What are the four main managers in an OS and how do they interact? 2. What are the four main managers in an OS and how do they interact? 3. What are the benefits to having an independent and dependent part of the device manager? 3. What are the benefits to having an independent and dependent part of the device manager? 4. What is a process? What is a thread? 4. What is a process? What is a thread? 5. What are important considerations of a process manager? 5. What are important considerations of a process manager? 6. What is virtual memory? 6. What is virtual memory? 7. Why do we need a file manager? How is it useful? 7. Why do we need a file manager? How is it useful? 8. What are OS implementation considerations? What are the mechanisms we can use to implement these considerations? 8. What are OS implementation considerations? What are the mechanisms we can use to implement these considerations? 9. If OS enforces a policy, how do we prevent application software from overriding this policy? 9. If OS enforces a policy, how do we prevent application software from overriding this policy? 10. What are the two techniques to request service? How do they work? 10. What are the two techniques to request service? How do they work?

Sources Nutt, G. Operating Systems, 3 rd Edition. Addison Wesley Nutt, G. Operating Systems, 3 rd Edition. Addison Wesley