1 Lecture 2: Overview of Operating System Operating System Fall 2006.

Slides:



Advertisements
Similar presentations
Operating System Overview
Advertisements

Chapter 2 Operating System Overview
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
CEFRIEL Consorzio per la Formazione e la Ricerca in Ingegneria dell’Informazione Politecnico di Milano © 2002 William Fornaciari Operating System Overview.
CS 345 Computer System Overview
Lecture 1: History of Operating System
Operating System (O.S.) Objectives & Functions
Operating System Overview
Operating System Overview Chapter 2. Announcements Homework 0 will be posted today, due next Wednesday (September 17) at noon Project requires the following.
Operating System Overview
Chapter 1 and 2 Computer System and Operating System Overview
Figure 1.1 Interaction between applications and the operating system.
Chapter 1 and 2 Computer System and Operating System Overview
Operating System Objectives & Functions An operating system is a program that controls the execution of application programs and acts as an interface between.
By Mr. Abdalla A. Shaame.  An operating system is a software component that acts as the core of a computer system.  It performs various functions and.
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 Overview
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Operating System Overview Dr. Sunny Jeong & Mr. M.H. Park Operating Systems: Internals and Design Principles, 6/E William Stallings.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
9/14/2015B.Ramamurthy1 Operating Systems : Overview Bina Ramamurthy CSE421/521.
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and.
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 Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
1 Operating System Overview Chapter 2 Advanced Operating System.
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
Operating System 2 Overview. OPERATING SYSTEM OBJECTIVES AND FUNCTIONS.
1 Operating System Overview Chapter 2. 2 Operating System A program that controls the execution of application programs An interface between applications.
1 Operating System Overview Chapter 2. 2 Operating System A program that controls the execution of application programs An interface between applications.
1 Operating System Overview Chapter 2. 2 Operating System A program that controls the execution of application programs An interface between applications.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 Operating System Overview Chapter 2. 2 Operating System A program that controls the execution of application programs An interface between applications.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 From: Operating Systems Internals and Design Principles by William Stallings Chapter 2 Operating System Overview.
Faculty of Sciences and Social Sciences HOPE Chapter 2 Operating System Overview Stewart Blakeway FML
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
1 Operating System Overview Chapter 2. 2 Operating System A program that controls the execution of application programs An interface between applications.
Copyright Prentice Hall, Inc. 1 Operating System Overview.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Principles of Operating Systems Abhishek Dubey Daniel Balasubramanian Fall 2014 Slides Based On Power points and book material from William Stallings.
Operating System Overview
Operating System Overview
Introducción a los Sistemas Operativos
Operating System Overview
Operating Systems : Overview
Introduction to Operating System (OS)
Operating System Overview
Operating Systems : Overview
Operating Systems.
Operating System Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Chapter 2 Operating System Overview
Chapter 2 Operating System Overview
Presentation transcript:

1 Lecture 2: Overview of Operating System Operating System Fall 2006

2 Outline What is Operating System OS as User/Computer Interface Services provided by OS OS as Resource Manager Evolution of OS Major Achievements of OS

3 What is Operating System? An operating system is a program that controls the execution of application programs and acts as an interface between applications and the computer hardware. Three objectives of operating systems: Convenience Makes a computer more convenient to use Efficiency Allows the computer system resources to be used in an efficient manner Ability to evolve Permit the effective development, testing, and introduction of new system functions without interfering with service

4 OS as User/Computer Interface End User Programmer Operating- System Designer Computer Hardware Operating-System Utilities Application Programs

5 Services provided by the operating systems Program Development OS provides a variety of facilities and services, such as editors and debuggers, to assist the programmer in creating programs. Typically, these services are in the form of utility programs that, while not strictly part of the core of the OS, are supplied with the OS and are referred to as application program development tools. Program Execution A number of tasks need to be performed before we can execute a program. Instructions and data must be loaded into main memory. I/O devices and files must be initialized, and other resources must be prepared. The OS handles these duties for the user.

6 Services provided by the operating systems (cont.) Access to I/O Devices Each I/O devices requires its own peculiar set of instructions or control signals for operating. The OS provides a uniform interface that hides these details so that the programmer can access such devices using simple reads and writes. Controlled Access to File The OS must provide protection mechanisms to control access to the files for different users. Certain files can read only, or write only, or execute only. The OS must enforce the access mechanism. System Access In the case of a shared or public system, the OS control access to the system as a whole and to specific system resources.

7 Services provided by the operating systems (cont.) Error Detection and Response A variety of errors can occur while a computer system is running Internal and External hardware errors such as memory error, device failure, or malfunctions. Software error such as arithmetic overflow or underflow, attempt to access forbidden memory locations Operating system cannot grant request of application Accounting Collect usage statistic Monitor performance Used to anticipate future enhancement prepare billing information

8 OS as Resource Manager OS Software processor I/O controller Programs and data I/O controller processor … Memory Computer System I/O devices printers Keyboards etc. Auxiliary storage devices, disks, tapes

9 OS as Resource Manager (cont.) The OS is responsible for controlling and managing the various resources of a computer system. The OS functions in the same way as an ordinary computer software, i.e., it is a program or suite of programs executed by the processor The OS frequently relinquishes control of the processor and must depend on the processor to allow it to regain control The OS itself doesn’t do any “useful” work.

10 Ease of Evolution of an OS A major OS will evolve over time for a number of reasons: Hardware upgrades plus new types of hardware New services demanded by users Fixer – fix holes in OS

11 Evolution of OS (1) No operating system Run as an open shop User signs up for certain time to use it

12 Evolution of OS (2) - Simple Batch Systems Interrupt Processing Device Drivers Job Sequencing Control Language Interpreter User Program Area Monitor mid 1950s - mid 1960s User no longer has direct access to the machine Submit the job to an operator who batches the jobs together sequentially and places the entire batch on the input device Often jobs of a similar nature can be bundled together to further increase economy

13 Evolution of OS (2) - Simple Batch Systems (cont.) Job Control Language (JCL) Special type of programming language Provide instruction to the monitor $JOB user_spec ; identify the user for accounting purposes $FORTRAN ; load the FORTRAN compiler source program cards $LOAD ; load the compiled program $RUN ; run the program data cards $EOJ ; end of job $JOB user_spec ; identify a new user $LOAD application $RUN data $EOJ

14 Evolution of OS (2) - Simple Batch Systems (cont.) Need additional hardware features to support the batch OS: Memory Protection – protect the OS from being wiped out Timer – prevent the job run infinitely Privileged Instruction certain instruction can only be executed by OS, and not by user. I/O could only be performed in monitor (supervisor) mode, CPU runs in supervisor mode or user mode Interrupts early models did not have this capability. Later models have. Make more efficient use of resources Note: Some memory is given to OS and some processor time is given to OS. But we are still better off because machine is a lot faster than human operation.

15 Evolution of OS (3) - Multiprogrammed Batch Systems 1960s - present Several users are in memory at the same time Match I/O intensive job with CPU intensive job Important to have Interrupt-Driven I/O or DMA to support multiprogrammed batch system. Monitor (more like a operating system) User program 1 User program 2 User program 3 User program 4

16 Uniprogramming Processor must wait for I/O instruction to complete before preceding

17 Multiprogramming When one job needs to wait for I/O, the processor can switch to the other job

18 Multiprogramming

19 Evolution of OS (4) - Time-Sharing Systems 1970s - present To support interactive computing In a time-sharing system, multiple users simultaneously access the system through terminals, with the OS interleaving the execution of each user program in a short burst or quantum of computation. Context Switching A job (now often called process) can get “switched in” or “switched out”. OS should give the illusion for the process as if it exists in the CPU continuously

20 Batch Multiprogramming versus Time Sharing Batch MultiprogrammingTime Sharing Principal objectiveMaximize processor use Minimize response time Source of directives to operating system Job control language commands provided with the job Commands entered at the terminal

21 Evolution of OS (5) Real-time computer Execute programs that are guaranteed to have an upper bound on tasks that they carry out. e.g. guided missile systems, medical monitoring equipment Multiprocessor – have more than one CPU Shared memory multiprocessors Access the same memory - memory access must be synchronized Distributed memory multiprocessors Each CPU has its own associated memory – communication between processors is often slow and complicated Networked/Distributed Systems – consist of multiple computers Networked systems: users are aware of the different computers that make up the system Distributed systems: multiple computers are transparent to the user.

22 Major Achievements of OS OS are the most complex software ever developed In the last several decades, we have made several theoretical advances in the development of OS: Processes Memory management Information protection and security Scheduling and resources management Systems structures

23 Processes - Definition The concept of process is fundamental to the structure of OS. Many definitions have been given: A program in execution An instance of a program running on a computer The entity that can be assigned to and executed by a processor A unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources.

24 Processes In a multiprogrammed systems, many jobs are in progress at the same time. It became impossible to analyze their interactions. Therefore, there are many source of errors: Improper Synchronization It is often the case that a routine must be suspended awaiting an event that occurs elsewhere Failed Mutual Exclusion Certain shared resources can only be used by one user at a time Nondeterminate Program Execution The results of a particular program should depend only on the input and not on the activities of other programs in a shared system Deadlocks It is possible for two or more programs to be hung up waiting for each other We need to tackle these problems in a systematic way. The concept of the process provides the foundation.

25 Processes - Components We can think of a process as consisting of three components: An executable program The associated data needed by the program The execution context of the program All information the operating system needs to manage the process

26 Processes Context Data Instructions Context Data Instructions OS process list process A process B PSW PC b h … other registers Base Limit CPU registers

27 Memory management Process isolation The OS must prevent independent processes from interfering with the data and memory of each other Automatic allocation and management Programs should be dynamically allocated across the memory hierarchy as required. Support for modular programming Protection and access control Sometimes it is desirable to share data. Sometimes it is not. The OS must enforce them Long-term storage

28 Virtual Memory Allows programmers to address memory from a logical point of view While one process is written out to secondary store and the successor process read in there in no hiatus

29 File System Implements long-term store Information stored in named objects called files

30 Paging Allows process to be comprised of a number of fixed-size blocks, called pages Virtual address is a page number and an offset within the page Each page may be located any where in main memory Real address or physical address in main memory

31

32 Virtual Memory Addressing Processor Memory Management Unit Main Memory Virtual Address Real Address Secondary Memory Disk Address

33 Information Protection and Security Access control Regulate user access to the system Information flow control Regulate flow of data within the system and its delivery to users Certification Providing that access and flow control perform according to specifications

34 Scheduling and Resources Management A key task of an OS is to manage the various resources available to it and to schedule their use by the various active processes. Any scheduling policy must consider three factors: Fairness Give equal and fair access to all processes Differential Responsiveness – priorities Discriminate between different classes of jobs Efficiency maximize throughput, minimize response time, and accommodate as many uses as possible etc.

35 System Structure Early OS are monolithic Later OS are modular View the system as a series of levels Each level performs a related subset of functions Each level relies on the next lower level to perform more primitive functions This decomposes a problem into a number of more manageable subproblems

36 System Structure (cont.) Microkernel architecture assigns only a few essential functions to the kernel address space interprocess communication (IPC) basic scheduling

37 System Structure (cont.) Modules Most modern operating systems implement kernel modules Uses object-oriented approach Each core component is separate Each talks to the others over known interfaces Each is loadable as needed within the kernel Overall, similar to layers but with more flexible

38 Solaris Modular Approach

39 Operating System Design Hierarchy LevelNameObjectsExample operations 13ShellUser programming environment Statements in shell language 12User processes Quit, kill, suspend, resume 11Directories Create, destroy, attach, detach, search, list 10DevicesExternal devices, such as printer, displays and keyboards Open, close, read, write 9File systemFilesCreate, destroy, open, close, read, write 8CommunicationsPipesCreate, destroy, open, close, read, write

40 Operating System Design Hierarvichy (cont.) LevelNameObjectsExample operations 7Virtual MemorySegments, pagesRead, write, fetch 6Local secondary store Blocks of data, device channels Read, write, allocate, free 5Primitive processes Primitive process, semaphores, ready list Suspend, resume, wait, signal

41 Operating System Design Hierarvichy (cont.) LevelNameObjectsExample operations 4InterruptsInterrupt-handlerInvoke, enable, disable interrupt 3ProceduresProcedures, call stack, display Mark stack, call, return 2Instruction SetEvaluation stack, microprogram interpreter, scalar and array data Load, store, add, subtract branch 1Electronic circuits Registers, gates, buses, etc. Clear, transfer, activate, complement

42 End of Lecture 2 Thank you!