Common Computer-System and OS Structures

Similar documents
Computer-System Architecture

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

Computer-System Structures

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

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

Operating System Review

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

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

Uniprocessor Computer Architecture Example: Cray T3E

OS And Hardware. Computer Hardware Review PROCESSORS. CPU Registers. CPU Registers 02/04/2013

Computer System Architecture. CMPT 300 Operating Systems I. Summer Segment 3: Computer System Architecture. Melissa O Neill

Architectural Support for Operating Systems

Lecture 2 - Fundamental Concepts

2.5 Hardware Protection

CS3600 SYSTEMS AND NETWORKS

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

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

OPERATING SYSTEMS UNIT - 1

Chapter 1: Introduction

CS370 Operating Systems

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

Chapter 1: Introduction. Chapter 1: Introduction

Chapter 1: Introduction

What Operating Systems Do An operating system is a program hardware that manages the computer provides a basis for application programs acts as an int

Chapter 1: Introduction

Lecture 1 Introduction (Chapter 1 of Textbook)

Lecture 2: September 9

5.b Principles of I/O Hardware CPU-I/O communication

CSC 2405: Computer Systems II

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

CSCI-GA Operating Systems I/O. Hubertus Franke

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

European University of Lefke. Instructor: Dr. Arif SARI

EECS 3221 Operating System Fundamentals

CS370 Operating Systems

EECS 3221 Operating System Fundamentals

Four Components of a Computer System

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

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

Computer System Overview

Input-Output (I/O) Input - Output. I/O Devices. I/O Devices. I/O Devices. I/O Devices. operating system must control all I/O devices.

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Chapter 13: I/O Systems

Computer Systems Overview

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

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

Introduction to Computer Systems and Operating Systems

OPERATING SYSTEMS OVERVIEW. Operating Systems 2015 Spring by Euiseong Seo

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

DM510 Operating Systems. Jacob Aae Mikkelsen

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

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

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Introduction to Operating Systems. Chapter Chapter

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

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

Introduction to Operating Systems. Chapter Chapter

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

Introduction to Operating. Chapter Chapter

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

Hardware OS & OS- Application interface

for Operating Systems Computer Systems Laboratory Sungkyunkwan University

OPERATING SYSTEMS CS136

Interconnecting Components

MODERN OPERATING SYSTEMS. Chapter 3 Memory Management

Computer Organization ECE514. Chapter 5 Input/Output (9hrs)

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

Unit 2 : Computer and Operating System Structure

Architectural Support for OS

Chapter 1 Computer System Overview

OPERATING SYSTEMS & Network OVERVIEW. 1: OS & Network Overview

Part I Introduction Hardware and OS Review

ECE 485/585 Microprocessor System Design

Process Description and Control

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

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

Today: Computer System Overview (Stallings, chapter ) Next: Operating System Overview (Stallings, chapter ,

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

CS 537 Lecture 2 Computer Architecture and Operating Systems. OS Tasks

Architectural Support for Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Operating system Dr. Shroouq J.

Lecture 15: I/O Devices & Drivers

Chapter 13: I/O Systems

-Device. -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, device)

Chapter 5 Input/Output. I/O Devices

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

I/O Systems (3): Clocks and Timers. CSE 2431: Introduction to Operating Systems

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION

CSE398: Network Systems Design

Generic Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals

Operating Systems CS 571

Introduction. CS3026 Operating Systems Lecture 01

Chapter 13: I/O Systems

The control of I/O devices is a major concern for OS designers

Even coarse architectural trends impact tremendously the design of systems

Even coarse architectural trends impact tremendously the design of systems. Even coarse architectural trends impact tremendously the design of systems

Chapter 2 Computer-System Structure

Chapter 13: I/O Systems

Transcription:

Common Computer-System and OS Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection General System Architecture Oct-03 1

Computer-System Architecture Oct-03 2

Computer-System Operation I/O devices and the CPU can execute concurrently. Each device controller is in charge of a particular device type. Each device controller has a local buffer. CPU moves data from/to main memory to/from local buffers I/O is from the device to local buffer of controller. Device controller informs CPU that it has finished its operation by causing an interrupt. Oct-03 3

Common Functions of Interrupts Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines. Interrupt architecture must save the address of the interrupted instruction. Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt. Most operating systems are interrupt driven. Interrupt Vector Interrupt No. 0xde Oct-03 4 1 2 3 4 5 Service Routine for Interrupt 1 Service Routine Address 0x45 0x78 0x9e 0xa6

Interrupt Handling The operating system preserves the state of the CPU by storing registers and the program counter. This information is normally stored on the stack, a special portion of memory which has a register called a stack pointer pointing to it. When the service routine ends, it pops the original address into the program counter again. The OS determines which type of interrupt has occurred by either: Polling through all possible interrupts or using a Vectored interrupt system where we have the originating interrupt number and an interrupt vector base address. Depends on CPU support. Oct-03 5

I/O Structure There are two modes of handling I/O Synchronous: after I/O starts, control returns to user program only upon I/O completion. At most one I/O request is outstanding at a time, no simultaneous I/O processing. Asynchronous: after I/O starts, control returns to user program without waiting for I/O completion. A System call makes the request to the operating system to allow user to wait for I/O completion. A Device-status table contains entry for each I/O device indicating its type, address, and state. Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt. Oct-03 6

Two I/O Methods Synchronous Asynchronous Oct-03 7

Device-Status Table Oct-03 8

Direct Memory Access Structure This is a fairly new dedicated chipset on modern motherboards (DMA chips) Used for high-speed I/O devices able to transmit information at close to memory speeds. DMA controller transfers blocks of data from buffer storage directly to main memory without CPU intervention. Only one interrupt is generated per block, rather than the one interrupt per byte. Oct-03 9

Storage Hierarchy Storage systems organized in hierarchy. Speed Cost Volatility Caching copying information into faster storage system CPU cache is normally small but allows very fast access to data. The locality principle says that same area of memory will be used for a long period of time. Cache has to be consistent and consistency policies must be maintained. Oct-03 10

Storage-Device Hierarchy Oct-03 11

Dual-mode Operation CPU can execute in 2 different modes. Provide hardware support to differentiate between at least two modes of operations. 1. User mode execution done on behalf of a user. 2. Kernel mode execution done on behalf of operating system. This is known as the privileged mode since no protection occurs in this mode. Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1). When an interrupt or fault occurs hardware switches to monitor mode. monitor set user mode user Oct-03 12

I/O Protection All I/O instructions are privileged instructions. OS must ensure that a user program could never gain control of the computer in monitor mode (i.e., a user program that, as part of its execution, stores a new address in the interrupt vector). Oct-03 13

Memory Protection OS must ensure that no job is allowed access to the memory area of another job. In order to have memory protection, two registers exists (hardware normally) that determine the range of legal addresses a program may access: Base register holds the smallest legal physical memory address. Limit register contains the size of the range Memory outside the defined range is protected. OS ensures that on scheduling, these registers are set up accordingly. When access is made outside the base + limit area, an interrupt occurs. Oct-03 14

Use of a Base and Limit Register Oct-03 15

Hardware Address Protection Oct-03 16

Hardware Protection When executing in monitor mode, the operating system has unrestricted access to both monitor and user s memory. The load instructions for the base and limit registers are privileged instructions. Oct-03 17

CPU Protection Timer interrupts computer after specified period to ensure operating system maintains control. Timer is decremented every clock tick. When timer reaches the value 0, an interrupt occurs. Timer commonly used to implement time sharing. Time also used to compute the current time. Load-timer is a privileged instruction. Oct-03 18

End of Section Oct-03 19