CSE Opera+ng System Principles

Similar documents
To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

CS370 Operating Systems

Chapter 1: Introduction

CS370 Operating Systems

Lecture 1 Introduction (Chapter 1 of Textbook)

Chapter 1: Introduction. Operating System Concepts 8th Edition,

European University of Lefke. Instructor: Dr. Arif SARI

DM510 Operating Systems. Jacob Aae Mikkelsen

Chapter 1: Introduction

7/20/2008. What Operating Systems Do Computer-System Organization

Chapter 1: Introduction. Chapter 1: Introduction

CS420: Operating Systems

Chapter 1: Introduction

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Chapter 1: Introduction. Operating System Concepts 8 th Edition,

Course Details. Operating Systems with C/C++ Course Details. What is an Operating System?

Operating Systems. Lecture Course in Autumn Term 2015 University of Birmingham. Eike Ritter. September 22, 2015

CS420: Operating Systems

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Chapter 1: Introduction Dr. Ali Fanian. Operating System Concepts 9 th Edit9on

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

Four Components of a Computer System

Introduction. TDDI04, K. Arvidsson, IDA, Linköpings universitet Contents. What is an Operating System (OS)?

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Introduction to Operating Systems (Part II)

Chapter 1: Introduction. Operating System Concepts 8th Edition,

Operating System Services

Introduction. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

Operating System Concepts 9 th Edit9on

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

Introduction to Operating Systems

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Part I Overview Chapter 1: Introduction

CS3600 SYSTEMS AND NETWORKS

Four Components of a Computer System. Operating System Concepts 7 th Edition, Jan 12, 2005

Operating Systems. studykorner.org

OPERATING SYSTEMS UNIT - 1

Module 2: Computer-System Structures. Computer-System Architecture

Computer-System Organization (cont.)

The Lesson Plan of OS. The syllabus of OS. Access the lesson plan and syllabus at

Introduction. Chapter Prof. Amr El-Kadi

CHAPTER 1 - INTRODUCTION. Jacob Aae Mikk elsen

CSC Operating Systems Spring Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. January 17 th, 2007.

Announcements. Operating System Structure. Roadmap. Operating System Structure. Multitasking Example. Tevfik Ko!ar

Operating System Review

Chapter 2: Operating-System Structures. Operating System Concepts 8 th Edition

Instruction Cycle. Computer-System Architecture. Computer-System Operation. Common Functions of Interrupts. Chapter 2: Computer-System Structures

Lecture 1 - Operating System Overview

Dinosaurs? & Dinosaur Wars. Outline & Questions. Evolution of our Textbook. Poll? Questions?

Computer-System Architecture

Computer-System Architecture. Common Functions of Interrupts. Computer-System Operation. Interrupt Handling. Chapter 2: Computer-System Structures

OPERATING SYSTEMS Lecture Notes. Prepared by K.Rohini, Assistant Professor, CSE Department, GVPCEW.

Operating Systems. Overview. Dr Alun Moon. Computing, Engineering and Information Sciences. 27th September 2011

SRIMAAN COACHING CENTRE-TRB-COMPUTER INSTRUCTORS STUDY MATERIAL CONTACT: III

Computer-System Structures

Operating Systems Spring 2013, Ort Braude College Electrical Engineering Department

Operating Systems Fundamentals. What is an Operating System? Focus. Computer System Components. Chapter 1: Introduction

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

System Call System Program Linker/Loader with Examples Types of computing Environment

Module 1: Introduction

Introduction. Chapter Prof. Amr El-Kadi

Computer Organization

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

Dinosaurs? & Dinosaur Wars. CSCI 6730 / 4730 Operating Systems. Questions? Outline & Questions. Poll? Popularity: The OS Market Share

Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction

SAZ4B/SAE5A Operating System Unit : I - V

Chapter 1 Computer System Overview

Chapter 1: Introduction

Computer Architecture and OS. EECS678 Lecture 2

Chapter 2: Computer-System Structures. Hmm this looks like a Computer System?

Uniprocessor Computer Architecture Example: Cray T3E

Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - II OS Structures. University at Buffalo. OS Design and Implementation

OS Design Approaches. Roadmap. System Calls. Tevfik Koşar. Operating System Design and Implementation. CSE 421/521 - Operating Systems Fall 2013

Chapter 1 Introduction

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Operating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1

L-1! Silberschatz, Galvin and Gagne 2013! Operating System Concepts 9th Edition! Silberschatz, Galvin and Gagne 2013!

Introduction to Computer Systems and Operating Systems


Operating Systems: Internals and Design Principles, 7/E William Stallings. Chapter 1 Computer System Overview

Overview of Operating Systems

Part I Introduction Hardware and OS Review

Frederick P. Brooks tar dinosaurs tar tar tar pit

Sri Vidya College of Engineering and Technology Department of Computer Science & Engineering II CSE / II IT

CS30002: Operating Systems. Arobinda Gupta Spring 2017

QUESTION BANK UNIT I

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Chapter 1: Introduction

Principles of Operating Systems CS 446/646

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

Lecture 9: MIMD Architectures

CSC 553 Operating Systems

Operating Systemss and Multicore Programming (1DT089)

Operating Systems (2INC0) 2017/18

CS370 Operating Systems

Introduction to Operating Systems. Chapter Chapter

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

Transcription:

CSE 30341 Opera+ng System Principles Lecture 2 Introduc5on Con5nued Recap Last Lecture What is an opera+ng system & kernel? What is an interrupt? CSE 30341 Opera+ng System Principles 2 1

OS - Kernel CSE 30341 Opera+ng System Principles 3 OS - Kernel CSE 30341 Opera+ng System Principles 4 2

System Architecture CSE 30341 Opera+ng System Principles 5 Interrupt CSE 30341 Opera+ng System Principles 6 3

Interrupt CSE 30341 Opera+ng System Principles 7 Interrupt CSE 30341 Opera+ng System Principles 8 4

Input/Output I/O Communica+on between CPU and outside world : Storage Network Keyboard/mouse Display Printer CSE 30341 Opera+ng System Principles 9 Input/Output I/O CSE 30341 Opera+ng System Principles 10 5

Interac+ng with I/O System-controlled: Write this chunk of data to block 8,783,486 Please give me the data from blocks 7,345,286 7,345,289 External events (system reacts): The user is pressing the shi_ key Block 3,285,001 appears to be bad Data arrived over a network connec+on CSE 30341 Opera+ng System Principles 11 Interac+ng with I/O Responsibili+es of OS: Hide peculiarities of hardware devices from the user Manage hardware devices ( resources ) efficiently Prevent intentional/unintentional misuse CSE 30341 Opera+ng System Principles 12 6

Interac+ng with I/O Application requests I/O from OS Uses specific interface: system calls Blocking: application will wait until I/O complete Non-blocking: application will do something else in the meantime (and receive notification from OS when I/O complete) CSE 30341 Opera+ng System Principles 13 Direct Memory Access (DMA) CPU responsible for data moving to/from I/O devices Alterna+ve: let a separate controller do it (DMA) CSE 30341 Opera+ng System Principles 14 7

DMA Controller Memory I/O Device D 6 CPU Please copy 500 bytes of data from D 6 to memory loca+on 0x8570000 and interrupt me when you are done DMA Controller vs. Read from D6 Write to Memory Read from D6 Write to Memory. CSE 30341 Opera+ng System Principles 15 Storage Structure Main memory only large storage media that the CPU can access directly Random access memory Volatile Secondary storage extension of main memory that provides large nonvolatile storage capacity Magnetic disks rigid metal or glass platters covered with magnetic recording material Disk surface - tracks, subdivided into sectors The disk controller determines the logical interaction between the device and the computer Solid-state disks faster than magnetic disks, nonvolatile Various technologies Becoming more popular CSE 30341 Opera+ng System Principles 16 8

Storage-Device Hierarchy registers cache main memory solid-state disk magnetic disk optical disk magnetic tapes CSE 30341 Opera+ng System Principles 17 Storage Hierarchy Storage systems organized in hierarchy Size Speed Cost Volatility Caching leverage faster storage system; higher layer can be cache for lower layer CSE 30341 Opera+ng System Principles 18 9

Caching One of the most important principles in systems Information in use copied from slower to faster storage temporarily Faster storage (cache) checked first to determine if information is there If it is, information used directly from the cache (fast) If not, data copied to cache and used there Cache smaller than storage being cached Cache management important design problem Cache size and replacement policy CSE 30341 Opera+ng System Principles 19 Computer-System Architecture General-purpose processors (CPU) versus special-purpose processors (controllers) Multiprocessor systems are now typical Parallel systems, tightly-coupled systems Advantages include: 1. Increased throughput 2. Economy of scale 3. Increased reliability graceful degradation or fault tolerance CSE 30341 Opera+ng System Principles 20 10

Symmetric Multiprocessing (SMP) Architecture UMA Uniform Memory Access All share the same memory on the same machine, same cost to access. May have a private cache NUMA Non-uniform Memory Access Each processor has its own memory CSE 30341 Opera+ng System Principles 21 Multi-Core Design Multiple cores on same chip On-chip communication is fast Power consumption can be reduced CSE 30341 Opera+ng System Principles 22 11

Clustered Systems Like multiprocessor systems, but multiple systems working together Connected via LAN (local-area network) Storage often shared via SAN (storage-area network) Main reasons: High availability Asymmetric clustering (one machine in hot-standby mode) Symmetric clustering (multiple machines running and monitoring each other) High performance (HPC) Applications must be written to exploit parallelization CSE 30341 Opera+ng System Principles 23 Clustered Systems computer interconnect computer interconnect computer storage area network CSE 30341 Opera+ng System Principles 24 12

Operating Systems Concepts A von Neumann architecture CSE 30341 Opera+ng System Principles 25 Opera+ng Systems Concepts Mul5programming (efficiency) Single user cannot keep CPU and I/O devices busy at all +mes Jobs (code & data) organized s.t. CPU always has at least one to execute Subset of jobs kept in memory When a job has to wait (e.g., for I/O), the OS switches to another job CSE 30341 Opera+ng System Principles 26 13

Memory Layout for Multiprogrammed System CSE 30341 Opera+ng System Principles 27 Opera+ng Systems Concepts Timesharing (mul5tasking): Switching between jobs happens so frequently that users can interact with each job while it is running: interac5ve compu5ng Response 5me (e.g., < 1 second) Each user has at least 1 program execu+ng in memory (process) If several jobs ready to run at the same +me: CPU scheduling If processes don t fit into memory: swapping Virtual memory allows of execu+on of par+ally loaded processes CSE 30341 Opera+ng System Principles 28 14

Opera+ng Systems Concepts Access to resources needs to be controlled: Simultaneous access Unauthorized access Improper access (e.g., too long) Dual-mode opera5ng systems User mode (applica+on) Kernel mode (OS and privileged instruc+ons) Mode bit indicates current mode (0 = kernel) Transi+on via system calls CSE 30341 Opera+ng System Principles 29 From User to Kernel Mode Timer to prevent infinite loop / process hogging resources Set interrupt after specific period Operating system decrements counter When counter zero generate an interrupt Set up before scheduling process to regain control or terminate program that exceeds allotted time CSE 30341 Opera+ng System Principles 30 15

Process Management Process = program in execu+on! Program = passive Process = ac+ve Process needs resources (CPU, memory, I/O, ini+aliza+on data, files, etc.) Single-threaded process: one program counter (PC) Mul5-threaded process: one program counter per thread CSE 30341 Opera+ng System Principles 31 Process Management Activities The operating system is responsible for the following activities in connection with process management: Creating and deleting both user and system processes Suspending and resuming processes Providing mechanisms for process synchronization Providing mechanisms for process communication Providing mechanisms for deadlock handling CSE 30341 Opera+ng System Principles 32 16

Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is in memory and when Optimizing CPU utilization and computer response to users Memory management activities Keeping track of which parts of memory are currently being used and by whom Deciding which processes (or parts thereof) and data to move into and out of memory Allocating and de-allocating memory space as needed CSE 30341 Opera+ng System Principles 33 Storage Management OS provides uniform, logical view of information storage Abstracts physical properties to logical storage unit - file Each medium is controlled by device (i.e., disk drive, tape drive) Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random) File-System management Files usually organized into directories Access control on most systems to determine who can access what OS activities include Creating and deleting files and directories Primitives to manipulate files and directories Mapping files onto secondary storage Backup files onto stable (non-volatile) storage media CSE 30341 Opera+ng System Principles 34 17

Mass-Storage Management Usually disks used to store data that does not fit in main memory or data that must be kept for a long period of time Proper management is of central importance Entire speed of computer operation hinges on disk subsystem and its algorithms OS activities Free-space management Storage allocation Disk scheduling Some storage need not be fast Tertiary storage includes optical storage, magnetic tape Still must be managed by OS or applications Varies between WORM (write-once, read-many-times) and RW (read-write) CSE 30341 Opera+ng System Principles 35 Performance of Various Levels of Storage Level 1 2 3 4 5 Name registers cache main memory solid state disk magnetic disk Typical size < 1 KB < 16MB < 64GB < 1 TB < 10 TB Implementation technology custom memory with multiple ports CMOS on-chip or off-chip CMOS SRAM CMOS SRAM flash memory magnetic disk Access time (ns) 0.25-0.5 0.5-25 80-250 25,000-50,000 5,000,000 Bandwidth (MB/sec) 20,000-100,000 5,000-10,000 1,000-5,000 500 20-150 Managed by compiler hardware operating system operating system operating system Backed by cache main memory disk disk disk or tape Movement between levels of storage hierarchy can be explicit or implicit CSE 30341 Opera+ng System Principles 36 18

Protection and Security Protection any mechanism for controlling access of processes or users to resources defined by the OS Security defense of the system against internal and external attacks CSE 30341 Opera+ng System Principles 37 Recap Key Points What is DMA? What is the memory hierarchy? What is caching? What is virtual memory? What is a SAN? What is the difference between kernel and user mode? CSE 30341 Opera+ng System Principles 38 19