Principles of Operating Systems CS 446/646



Similar documents
Operating Systems 4 th Class

Chapter 1: Introduction. What is an Operating System?

Operating System Components

3 - Introduction to Operating Systems

Overview of Operating Systems Instructor: Dr. Tongping Liu

Contents. Chapter 1. Introduction

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Types Of Operating Systems

Operating Systems Overview

Operating System Structures

Chapter 3: Operating-System Structures. Common System Components

Operating System Tutorial

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

OS Concepts and structure

4.1 Introduction 4.2 Explain the purpose of an operating system Describe characteristics of modern operating systems Control Hardware Access

A Comparison of Distributed Systems: ChorusOS and Amoeba

Chapter 2: OS Overview

Overview and History of Operating Systems

Chapter 3 Operating-System Structures

Components of a Computer System

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

Operating Systems Prof. Ashok K Agrawala

CHAPTER 15: Operating Systems: An Overview

Computers: Tools for an Information Age

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

Operating Systems. Notice that, before you can run programs that you write in JavaScript, you need to jump through a few hoops first

Common Operating-System Components

Principles and characteristics of distributed systems and environments

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Chapter 2 System Structures

Chapter 1: Introduction. Chapter 1: Introduction. Operating System Concepts, 7th Edition. Objectives

How To Understand The History Of An Operating System

How To Understand And Understand An Operating System In C Programming

Example of Standard API

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

ELEC 377. Operating Systems. Week 1 Class 3

Introduction. What is an Operating System?

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Programming for GCSE Topic H: Operating Systems

2.1 What are distributed systems? What are systems? Different kind of systems How to distribute systems? 2.2 Communication concepts

Operating system Dr. Shroouq J.

Chapter 5: System Software: Operating Systems and Utility Programs

OPERATING SYSTEMS STRUCTURES

This tutorial will take you through step by step approach while learning Operating System concepts.

Operating Systems. Rafael Ramirez (T, S)

Operating Systems PART -A

COURSE OUTLINE Survey of Operating Systems

High Performance Computing. Course Notes HPC Fundamentals

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Introduction to Cloud Computing

Chapter 3. Operating Systems

Distributed Systems LEEC (2005/06 2º Sem.)

Operatin g Systems: Internals and Design Principle s. Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings

Chapter 1 Computer System Overview

Chapter 6, The Operating System Machine Level

CPU Scheduling. Core Definitions

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

UNIT 2 CLASSIFICATION OF PARALLEL COMPUTERS

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Client/Server and Distributed Computing

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Operating System Structures

Middleware and Distributed Systems. Introduction. Dr. Martin v. Löwis

Lecture 1 Operating System Overview

Lecture 23: Multiprocessors

Operating Systems: Basic Concepts and History

Distributed Operating Systems

Chapter 11 I/O Management and Disk Scheduling

International Engineering Journal For Research & Development

Undergraduate Course Syllabus

Operating System Software

Introduction. System Calls

Software: Systems and Application Software

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Components of a Computing System. What is an Operating System? Resources. Abstract Resources. Goals of an OS. System Software

Computer Organisation Operating Systems

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Operating System Components and Services

Chapter 18: Database System Architectures. Centralized Systems

PARALLELS SERVER 4 BARE METAL README

How To Virtualize A Storage Area Network (San) With Virtualization

Introduction to Cloud Computing

OPERATING SYSTEMS Internais and Design Principles

Distributed Systems. REK s adaptation of Prof. Claypool s adaptation of Tanenbaum s Distributed Systems Chapter 1

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Virtualization. Dr. Yingwu Zhu

Upon completion of this chapter, you will able to answer the following questions:

CS0206 OPERATING SYSTEMS Prerequisite CS0201, CS0203

OpenMosix Presented by Dr. Moshe Bar and MAASK [01]

Virtual machine interface. Operating system. Physical machine interface

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Operating Systems Introduction

Republic Polytechnic School of Information and Communications Technology C226 Operating System Concepts. Module Curriculum

Operating Systems, 6 th ed. Test Bank Chapter 7

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

Transcription:

Principles of Operating Systems CS 446/646 1. Introduction to Operating Systems a. Role of an O/S b. O/S History and Features c. Types of O/S Mainframe systems Desktop & laptop systems Parallel systems Real-time systems d. Major O/S Components e. System Calls f. O/S Software Architecture g. Examples of O/S 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 65

1.c Types of Operating Systems Note: The historical evolution of computers have left us with a great variety of O/S types, not all of which widely known. In this section, we briefly touch upon a few of them. Some aspects of these systems will be addressed more specifically later in the course. 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 66

1.c Types of Operating Systems Mainframe systems Mainframes have a centralized architecture one big computer connected to many terminals, generally pure I/O keyboard-display devices without CPU ( dumb terminals ) terminal mainframe 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 67

1.c Types of Operating Systems Mainframe systems Characteristics of mainframe systems the first computers used to tackle various applications and still found today in corporate data centers room-sized, high I/O capacity, reliability, security, tech support mainframes focus on I/O-bound business data applications ( supercomputers focus on CPU-bound scientific calculations: see parallel systems) Mainframes provide three main functions batch processing: insurance claims, store sales reporting, etc. transaction processing: credit card, bank account, etc. time-sharing (sessions): multiple users querying a database 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 68

1.c Types of Operating Systems Desktop & laptop systems Personal computers (see 1.b) IBM PC XT (1981) Apple Macintosh (1984) Dell Dimension XPS (2005) Dell Latitude D410 (2005) 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 69

1.c Types of Operating Systems Desktop & laptop systems A very brief overview of the PC operating system zoo Linux Distributions BSD Family Apple & Mac History Windows History Debian 4.3BSD Reno Apple DOS MS-DOS Fedora Core (Red Hat) 4.4BSD ProDOS Windows 3.0 Gentoo BSD/OS Lisa OS Windows 95 (4.0) Knoppix FreeBSD Mac OS Windows 98 (4.1) Linspire DragonFlyBSD Darwin Windows Me (4.2) Mandrakelinux NetBSD Mac OS X Windows NT 4.0 Slackware OpenBSD Windows 2000 (NT 5.0) SUSE Windows XP (NT 5.1) Yellow Dog Windows Vista (2006) 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 70

1.c Types of Operating Systems Parallel systems Flynn s 1972 taxonomy (crude, but often used) SISD = Single Instruction stream, Single Data stream classical sequential von Neumann machine your regular PC with a single (pipelined) scalar processor SIMD = Single Instruction stream, Multiple Data streams a single control unit issues 1 instruction at a time; multiple ALUs carry it out on multiple data sets simultaneously characterizes the vector supercomputers or array processors used in scientific computing MIMD = Multiple Instruction streams, Multiple Data streams multiple independent CPUs operating within larger system 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 71

1.c Types of Operating Systems Parallel systems Subclassification of MIMD architectures multiprocessors = shared memory all CPUs access the same physical address space multicomputers = private individual memory each CPU has a direct connection to its own local memory homogeneous (clusters) vs. heterogeneous (LAN, WAN) Tanenbaum, A. S. (2002) Distributed Systems. Shared memory and private memory organization in distributed computer systems 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 72

1.c Types of Operating Systems Parallel systems Parallel architectures form a diverse and complex field Stallings, W. (2004) Operating Systems: Internals and Design Principles (5th Edition). A possible (simplified) taxonomy of parallel computers 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 73

1.c Types of Operating Systems Parallel systems Parallel architectures form a diverse and complex field Tanenbaum, A. S. (1999) Structured Computer Organization (4th Edition). A possible (refined) taxonomy of parallel computers 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 74

1.c Types of Operating Systems Parallel systems Software level: distributed O/S much like traditional O/S O/S acts as a resource manager for the underlying hardware O/S attempts to hide the underlying intricacies and heterogeneity by providing a virtual machine Two types of O/S for parallel architectures tightly-coupled O/S a.k.a. Distributed Operating System (DOS) in multiprocessors and homogeneous multicomputers: tries to maintain a single, global view of the resources loosely-coupled O/S a.k.a. Network Operating System (NOS) in heterogeneous multicomputers: collection of independent operating systems working together 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 75

1.c Types of Operating Systems Parallel systems Subtypes of tightly coupled operating systems SMP = Symmetric MultiProcessing all CPUs are peers and concurrently run the same copy of O/S in memory asymmetric or master-slave multiprocessing one CPU runs the O/S, the others ask for tasks to do Tanenbaum, A. S. (2001) Modern Operating Systems (2nd Edition). 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 76

1.c Types of Operating Systems Real-time systems Real-time systems satisfy specific time requirements systems controlling scientific experiments, medical imaging systems, industrial control systems, some display systems Hard real-time: critical tasks are guaranteed on time secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM) conflicts with time-sharing systems and virtual memory delays Soft real-time: critical tasks just get higher priority ok with time-sharing; not used in industrial robotics more useful in applications requiring tight but not strict response times (multimedia, virtual reality, robotic exploration) 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 77

Principles of Operating Systems CS 446/646 1. Introduction to Operating Systems a. Role of an O/S b. O/S History and Features c. Types of O/S Mainframe systems Desktop & laptop systems Parallel systems Real-time systems d. Major O/S Components e. System Calls f. O/S Software Architecture g. Examples of O/S 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 78

Principles of Operating Systems CS 446/646 1. Introduction to Operating Systems a. Role of an O/S b. O/S History and Features c. Types of O/S d. Major O/S Components Processes Memory management CPU scheduling Input/output File system e. System Calls f. O/S Software Architecture g. Examples of O/S 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 79

Note: There is no definitive list of the components of an O/S. We give here only a brief overview of the most common subdivisions of an O/S and the services they are responsible for. Also, the components functions often intersect so there is no one-toone match between components and O/S software modules. 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 80

Processes A process is the activity of executing a program Pasta for six boil 1 quart salty water thread of execution stir in the pasta CPU cook on medium until al dente serve input data Program Process 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 81

Processes It can be interrupted to let the CPU execute a higherpriority process Pasta for six boil 1 quart salty water Get the first aid kit thread of execution stir in Check the pasta pulse cook on medium until al alcohol dente serve First aid Clean wound with Apply band aid CPU (changes hat to doctor ) input data Program Process 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 82

Processes... and then resumed exactly where the CPU left off Pasta for six boil 1 quart salty water thread of execution stir in the pasta hm... now where was I? CPU (back to chef ) cook on medium until al dente serve input data Program Process 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 83

Processes Multitasking gives the illusion of parallel processing (independent virtual program counters) on one CPU...... job 1 job 2 job 3 job 1 job 2 job 4 (a) Multitasking from the CPU s viewpoint job 3 job 1...... job 1 job 1 job 1 process 1 job 2 job 2 process 2 job 3 job 3 process 3 job 4 process 4 (b) Multitasking from the processes viewpoint = 4 virtual program counters Pseudoparallelism in multitasking 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 84

Processes A process is an encapsulated unit of activity containing a sequential thread of execution a current state an associated set of system resources (CPU time, memory, files, I/O devices), needed to accomplish its task The concept of process is a unifying abstraction multiprogramming, resource-sharing, time-sharing and real-time systems raised complex coordination problems thus, a higher-level model than jobs and interrupts was needed the concept of process was first introduced in MULTICS in the 1960 s and is now the most important component of modern O/S 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 85

Processes user address space Quick preview: a process image consists of three components 1. an executable program 2. the associated data needed by the program 3. the execution context of the process, which contains all information the O/S needs to manage the process (id, state, CPU registers, stack, etc.) Stallings, W. (2004) Operating Systems: Internals and Design Principles (5th Edition). Typical process implementation 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 86

Processes Chart of Operating System Responsibilities A The O/S is responsible for managing processes the O/S creates & deletes processes the O/S suspends & resumes processes the O/S provides mechanisms for process synchronization the O/S provides mechanisms for interprocess communication the O/S provides mechanisms for deadlock handling 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 87

Memory management Main memory large array of words or bytes, each with its own address repository of quickly accessible data shared by the CPU and I/O devices volatile storage that loses its contents in case of system failure The memory hierarchy Stallings, W. (2004) Operating Systems: Internals and Design Principles (5th Edition). 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 88

Memory management Chart of Operating System Responsibilities B The O/S is responsible for an efficient and orderly control of storage allocation the O/S ensures process isolation: it keeps track of which parts of memory are currently being used and by whom the O/S allocates and deallocates memory space as needed: it decides which processes to load or swap out the O/S regulates how different processes and users can sometimes share the same portions of memory the O/S transfers data between main memory and disk and ensures long-term storage 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 89

Quick preview: virtual memory is the way another abstraction allows memory access by logical instead of physical addressing programs are divided into pages that are swapped in and out when needed not all program pages are loaded at all times Memory management Virtual memory concepts Stallings, W. (2004) Operating Systems: Internals and Design Principles (5th Edition). 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 90

CPU scheduling Long-term scheduling the decision to add a program to the pool of processes to be executed Medium-term scheduling the decision to add to the number of processes that are partially or fully in main memory ( swapping ) Short-term scheduling = CPU scheduling the decision as to which available processes in memory are to be executed by the processor ( dispatching ) I/O scheduling the decision to handle a process s pending I/O request fine- to coarse-grain level frequency of intervention 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 91

CPU scheduling Chart of Operating System Responsibilities C The O/S is responsible for efficiently using the CPU and providing the user with short response times the O/S decides which available processes in memory are to be executed by the processor the O/S decides what process is executed when and for how long, also reacting to external events such as I/O interrupts the O/S relies on a scheduling algorithm that attempts to optimize CPU utilization, throughput, latency, and/or response time, depending on the system requirements 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 92

CPU scheduling Quick preview: A sample of CPU scheduling algorithms Stallings, W. (2004) Operating Systems: Internals and Design Principles (5th Edition). A comparison of scheduling policies 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 93

Input/output Device-independent software Tanenbaum, A. S. (2001) Modern Operating Systems (2nd Edition). Layers of the I/O subsystem 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 94

Input/output Chart of Operating System Responsibilities D The O/S is responsible for controlling access to all the I/O devices the O/S hides the peculiarities of specific hardware devices from the user the O/S issues the low-level commands to the devices, catches interrupts and handles errors the O/S relies on software modules called device drivers the O/S provides a device-independent API to the user programs, which includes buffering 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 95

File system Tanenbaum, A. S. (2001) Modern Operating Systems (2nd Edition). A file system for a university department 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 96

File system Chart of Operating System Responsibilities E The O/S is responsible for providing a uniform logical view of information storage the O/S defines a logical unit of storage, the file, and groups files in a hierarchy of directories the O/S supports primitives for manipulating files and directories (create, delete, rename, read, write, etc.) the O/S ensures data confidentiality and integrity the O/S keeps a mapping of the logical files onto the physical secondary storage the O/S backs up files on stable (nonvolatile) storage media 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 97

Principles of Operating Systems CS 446/646 1. Introduction to Operating Systems a. Role of an O/S b. O/S History and Features c. Types of O/S d. Major O/S Components Processes Memory management CPU scheduling Input/output File system e. System Calls f. O/S Software Architecture g. Examples of O/S 1/31/2006 CS 446/646 - Principles of Operating Systems - 1. Introduction 98