Computer-System Architecture. Computer-System Operation. Common Functions of Interrupts. Interrupt Handling

Similar documents
Computer-System Architecture

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

Operating Systems. Lecture 03. February 11, 2013

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

1. Computer System Structure and Components

Operating Systems 4 th Class

Operating Systems Overview

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

Introduction. System Calls

Lecture 1 Operating System Overview

Devices and Device Controllers

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

Chapter 1 Computer System Overview

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Operating Systems Prof. Ashok K Agrawala

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Overview of Operating Systems Instructor: Dr. Tongping Liu

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

Data Storage - I: Memory Hierarchies & Disks

Virtual Machines. COMP 3361: Operating Systems I Winter

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

CSC 2405: Computer Systems II

Introduction. What is an Operating System?

Process Description and Control william stallings, maurizio pizzonia - sistemi operativi

Buffer Management 5. Buffer Management

CS161: Operating Systems

Chapter 3 Operating-System Structures

Chapter 6, The Operating System Machine Level

SYSTEM ecos Embedded Configurable Operating System

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

Virtualization for Cloud Computing

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

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

OPERATING SYSTEM - VIRTUAL MEMORY

Computer Systems Structure Input/Output

Frontiers in Cyber Security: Beyond the OS

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

Chapter 11 I/O Management and Disk Scheduling

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Computer Organization. and Instruction Execution. August 22

CHAPTER 7: The CPU and Memory

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

Virtualization. Pradipta De

Why Computers Are Getting Slower (and what we can do about it) Rik van Riel Sr. Software Engineer, Red Hat

Have both hardware and software. Want to hide the details from the programmer (user).

Operating System Structures

Operating System Tutorial

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

Read this before starting!

Chapter 3: Operating-System Structures. Common System Components

Hypervisor: Requirement Document (Version 3)

OPERATING SYSTEMS STRUCTURES

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Presentation of Diagnosing performance overheads in the Xen virtual machine environment

Chapter 12: Secondary-Storage Structure

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Price/performance Modern Memory Hierarchy

Operating system Dr. Shroouq J.

Traditional IBM Mainframe Operating Principles

Central Processing Unit

Virtual vs Physical Addresses

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

Chapter 11: File System Implementation. Operating System Concepts with Java 8 th Edition

Operating Systems CSE 410, Spring File Management. Stephen Wagner Michigan State University

Hello and welcome to this presentation of the STM32L4 Firewall. It covers the main features of this system IP used to secure sensitive code and data.

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Lesson-16: Real time clock DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Exception and Interrupt Handling in ARM

Operating Systems. Virtual Memory

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management.

Virtualization. Clothing the Wolf in Wool. Wednesday, April 17, 13

Chapter 11: File System Implementation. Chapter 11: File System Implementation. Objectives. File-System Structure

Enabling Technologies for Distributed and Cloud Computing

Chapter 2: OS Overview

How To Understand And Understand An Operating System In C Programming

Low Profile Ultra ATA-133 RAID PCI Host

Chapter 12 File Management. Roadmap

Chapter 12 File Management

CS0206 OPERATING SYSTEMS Prerequisite CS0201, CS0203

University of Dublin Trinity College. Storage Hardware.

ELEC 377. Operating Systems. Week 1 Class 3

Enabling Technologies for Distributed Computing

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Keil C51 Cross Compiler

Hardware accelerated Virtualization in the ARM Cortex Processors

Rackspace Cloud Databases and Container-based Virtualization

Distributed Systems. Virtualization. Paul Krzyzanowski

I/O. Input/Output. Types of devices. Interface. Computer hardware

Raid storage. Raid 0: Striping. Raid 1: Mirrored

The PC Boot Process - Windows XP.

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

OSes. Arvind Seshadri Mark Luk Ning Qu Adrian Perrig SOSP2007. CyLab of CMU. SecVisor: A Tiny Hypervisor to Provide

Common Operating-System Components

find model parameters, to validate models, and to develop inputs for models. c 1994 Raj Jain 7.1

Operating System Overview. Otto J. Anshus

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Input / Output and I/O Strategies

Transcription:

Computer-System Architecture 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. 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. 2.1 Silberschatz and Galvin 2004 revised by Wiseman 2.2 Silberschatz and Galvin 2004 revised by Wiseman Common Functions of Interrupts Interrupt Handling 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. A trap is a software-generated interrupt caused either by an error or a user request. An operating system is interrupt driven. The operating system preserves the state of the CPU by storing registers and the program counter. Separate segments of code determine what action should be taken for each type of interrupt 2.3 Silberschatz and Galvin 2004 revised by Wiseman 2.4 Silberschatz and Galvin 2004 revised by Wiseman

Device-Status Table Direct Memory Access (DMA) Structure Used for high-speed I/O devices able to transmit information at close to memory speeds. Device 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. 2.5 Silberschatz and Galvin 2004 revised by Wiseman 2.6 Silberschatz and Galvin 2004 revised by Wiseman Storage Structure Moving-Head Disk Mechanism Main memory only large storage media that the CPU can access directly. 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 is logically divided into tracks, which are subdivided into sectors. The disk controller determines the logical interaction between the device and the computer. 2.7 Silberschatz and Galvin 2004 revised by Wiseman 2.8 Silberschatz and Galvin 2004 revised by Wiseman

Storage Hierarchy Migration of A From Disk to Register Storage systems organized in hierarchy. Speed cost volatility Caching copying information into faster storage system; main memory can be viewed as a cache for secondary storage. Use of high-speed memory to hold recently-accessed data. Requires a cache management policy. Caching introduces another level in storage hierarchy. This requires data that is simultaneously stored in more than one level to be consistent. 2.9 Silberschatz and Galvin 2004 revised by Wiseman 2.10 Silberschatz and Galvin 2004 revised by Wiseman Dual-Mode Operation Dual-Mode Operation (Cont.) Sharing system resources requires operating system to ensure that an incorrect program cannot cause other programs to execute incorrectly. Provides hardware support to differentiate between at least two modes of operations. 1. User mode execution done on behalf of a user. 2. Kernel mode (also monitor mode, supervisor mode or system mode) execution done on behalf of operating system. Mode bit added to computer hardware to indicate the current mode: kernel (0) or user (1). When an interrupt or fault occurs hardware switches to kernel mode. kernel Interrupt/fault set user mode user Privileged instructions can be issued only in kernel mode. 2.11 Silberschatz and Galvin 2004 revised by Wiseman 2.12 Silberschatz and Galvin 2004 revised by Wiseman

I/O Protection Use of a System Call to Perform an I/O All I/O instructions are privileged instructions. Given the I/O instructions are privileged, how does the user program perform I/O? System call the method used by a process to request action by the operating system. Usually takes the form of a trap to a specific location in the interrupt vector. Control passes through the interrupt vector to a service routine in the OS, and the mode bit is set to kernel mode. The kernel verifies that the parameters are correct and legal, executes the request, and returns control to the instruction following the system call. Must ensure that a user program could never gain control of the computer in kernel mode. Otherwise, undesirable actions can be done e.g. a user program that, as part of its execution, stores a new address in the interrupt vector. 2.13 Silberschatz and Galvin 2004 revised by Wiseman 2.14 Silberschatz and Galvin 2004 revised by Wiseman Memory Protection A Base And A limit Register Define A Logical Address Space Must provide memory protection at least for the interrupt vector and the interrupt service routines. In order to have memory protection, add two registers 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. 2.15 Silberschatz and Galvin 2004 revised by Wiseman 2.16 Silberschatz and Galvin 2004 revised by Wiseman

Protection Hardware 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. When executing in kernel mode, the operating system has unrestricted access to both kernel and user s memory. The load instructions for the base and limit registers are privileged instructions. 2.17 Silberschatz and Galvin 2004 revised by Wiseman 2.18 Silberschatz and Galvin 2004 revised by Wiseman