Operating System Overview Chapter 2. Announcements Homework 0 will be posted today, due next Wednesday (September 17) at noon Project requires the following.

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
What is a Process? n A process is a program in execution. A process needs certain resources: CPU time, memory (address space), files, and I/O devices,
University of Maryland, CMSC 412, Fall CMSC 412 Operating Systems Fall 2002 Liviu Iftode
Operating System Overview
Operating System Overview
Chapter 1 and 2 Computer System and Operating System Overview
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.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
Computer System Overview Chapter 1. Interrupts An interruption of the normal sequence of execution Improves processing efficiency Allows the processor.
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 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.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
1 Lecture 2: Overview of Operating System Operating System Fall 2006.
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.
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 : Overview
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
Chapter 2 Operating System Overview
Operating System Overview
Chapter 2 Operating System Overview
Presentation transcript:

Operating System Overview Chapter 2

Announcements Homework 0 will be posted today, due next Wednesday (September 17) at noon Project requires the following book –OSP An Environment for Operating System Project by Kifer and Smolka, Addison Wesley, 1991 –first project assignment will be posted next week

Basic computer structure CPU Memory memory bus I/O bus diskNet interface

Memory caches motivated by the mismatch between processor and memory speed closer to the processor than the main memory smaller and faster than the main memory act as “attraction memory”: contains the value of main memory locations which were recently accessed (temporal locality) transfer between caches and main memory is performed in units called cache blocks/lines caches contain also the value of memory locations which are close to locations which were recently accessed (spatial locality)

Cache design issues cache size and cache block size mapping: physical/virtual caches, associativity replacement algorithm: LRU write policy: write through/write back cpu cache main memory word transfer block transfer

Memory Hierarchy cpu cache main memory word transfer block transfer disks page transfer decrease cost per bit decrease frequency of access increase capacity increase access time increase size of transfer unit

Data transfer on the bus CPU Memory memory bus I/O bus diskNet interface cache cache-memory: cache misses, write-through/write-back memory-disk: swapping, paging, file accesses memory-Network Interface : packet send/receive I/O devices to the processor: interrupts

Direct Memory Access (DMA) bulk data transfer between memory and an I/O device (disk, network interface) initiated by the processor address of the I/O device starting location in memory number of bytes direction of transfer (read/write from/to memory) processor interrupted when the operation completes bus arbitration between cache-memory and DMA transfers memory cache must be consistent with DMA

Multiprocessors CPU Memory memory bus I/O bus diskNet interface cache simple scheme: more than one processor on the same bus memory is shared among processors-- cache consistency bus contention increases -- does not scale alternative (non-bus) system interconnect -- expensive single-image operating systems CPU cache

Multicomputers network of computers: “share-nothing” -- cheap communication through message-passing: difficult to program challenge: build efficient shared memory abstraction in software each system runs its own operating system CPU Memory memory bus I/O bus diskNet interface cache CPU Memory memory bus I/O bus disk Net interface cache network

Operating System A program that controls the execution of application programs An interface between applications and hardware

Operating System Objectives Convenience –Makes the computer more convenient to use Efficiency –Allows computer system resources to be used in an efficient manner Ability to evolve –Permit effective development, testing, and introduction of new system functions without interfering with service

Layers of Computer System

Services Provided by the Operating System Program development –Editors and debuggers Program execution Access to I/O devices Protected access to files

Services Provided by the Operating System Error detection and response –internal and external hardware errors memory error device failure –software errors arithmetic overflow access forbidden memory locations –error recovery

Services Provided by the Operating System Accounting –collect statistics –monitor performance –used to anticipate future enhancements –used for billing users

Operating System Functions same way as ordinary computer software –It is a program that is executed to service requests coming from applications: system calls from the hardware: interrupts Operating system services the request, then relinquishes control of the processor to execute other programs

Kernel Portion of operating system that is resident in main memory Contains a machine-independent part (code for system calls) and a machine- dependent part (device drivers) Maintains the OS state Executes in privileged/supervisor mode

Evolution of Operating Systems Serial Processing –No operating system –Machines run from a console with display lights and toggle switches, input device, and printer –Schedule tome –Setup included loading the compiler, source program, saving compiled program, and loading and linking

Evolution of Operating Systems Simple Batch Systems –Monitors Software that controls the running programs Batch jobs together Program branches back to monitor when finished Resident monitor is in main memory and available for execution

Job Control Language (JCL) Special type of programming language Provides instruction to the monitor –what compiler to use –what data to use

Hardware Features Memory protection –do not allow the memory area containing the monitor to be altered Timer –prevents a job from monopolizing the system

Hardware Features Memory protection –do not allow the memory area containing the monitor to be altered Timer –prevents a job from monopolizing the system

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

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

Multiprogramming

Time Sharing Using multiprogramming to handle multiple interactive jobs Processor’s time is shared among multiple users Multiple users simultaneously access the system through terminals

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

Main OS Concepts Processes Memory Management Information protection and security Scheduling and resource management System structure

Processes A program in execution An instance of a program running on a computer The entity that can be assigned to and executed on a processor A unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources

Difficulties with Designing System Software Improper synchronization –ensure a process waiting for an I/O device receives the signal Failed mutual exclusion Nondeterminate program operation –program should only depend on input to it, not relying on common memory areas Deadlocks

Process Consists of three components –An executable program –Associated data needed by the program –Execution context of the program All information the operating system needs to manage the process

Process

Memory Management Process isolation Automatic allocation and management Support for modular programming Protection and access control Long-term storage

Virtual Memory Allows programmers to address memory from a logical point of view

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

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

Virtual Memory Addressing

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 –proving that access and flow control perform according to specifications

Scheduling and Resource Management Fairness –give equal and fair access to all processes Differential responsiveness –discriminate between different classes of jobs/users Efficiency –maximize throughput, minimize response time, and accommodate as many uses as possible

Major Elements of Operating System

System Structure 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

Operating System Design Hierarchy LevelNameObjectsExample Operations 4InterruptsInterrupt-handlingInvoke, mask, unmask, retry programs 3ProceduresProcedures, call stack, Mark stack, call, return display 2Instruction SetEvaluation stack, micro-Load, store, add, subtract program interpreter,branch scalar and array data 1Electronic circuitsRegisters, gates, buses,Clear, transfer, activate, etc.complement

Operating System Design Hierarchy LevelNameObjectsExample Operations 7Virtual MemorySegments, pagesRead, write, fetch 6Local secondaryBlocks of data, deviceRead, write, allocate, free storechannels 5Primitive processesPrimitive process,Suspend, resume, wait, signal semaphores, ready list

Operating System Design Hierarchy LevelNameObjectsExample Operations 13ShellUser programmingStatements in shell language environment 12User processesUser processesQuit, kill, suspend, resume 11DirectoriesDirectoriesCreate, destroy, attach, detach, search, list 10DevicesExternal devices, suchOpen, close, as printer, displaysread, write and keyboards 9File systemFilesCreate, destroy, open, close read, write 8CommunicationsPipesCreate, destroy, open. close, read, write

Traditional OS structure monolithic/layered systems one/N layers all executed in “kernel-mode” good performance but rigid OS kernel hardware user process file system memory system user system calls

Characteristics of Modern Operating Systems Microkernel architecture –assigns only a few essential functions to the kernel address space interprocess communication (IPC) basic scheduling

Micro-kernel OS micro-kernel hardware client process file server memory server IPC user mode client-server model, IPC between clients and servers the micro-kernel provides protected communication OS functions implemented as user-level servers flexible but efficiency is the problem easy to extend for distributed systems

Extensible OS kernel extensible kernel hardware process default memory service user mode process my memory service user processes can load customized OS services into the kernel good performance but protection and scalability become problems

Characteristics of Modern Operating Systems Multithreading –process is divided into threads that can run simultaneously Thread –dispatchable unit of work –executes sequentially and is interruptable Process is a collection of one or more threads and associated system resources

Characteristics of Modern Operating Systems Symmetric multiprocessing –there are multiple processors –these processors share same main memory and I/O facilities –All processors can perform the same functions

Characteristics of Modern Operating Systems Distributed operating systems –provides the illusion of a single main memory and single secondary memory space –used for distributed file system

UNIX Hardware is surrounded by the operating-system Operating system is called the kernel Comes with a number of user services and interfaces –shell –C compiler

UNIX

Modern UNIX Systems System V Release 4 (SVR4) Solaris 2.x 4.4BSD Linux