QUIZ Ch.6. The EAT for a two-level memory is given by:

Similar documents
Announcement. Computer Architecture (CSC-3501) Lecture 23 (17 April 2008) Chapter 7 Objectives. 7.1 Introduction. 7.2 I/O and Performance

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

Modes of Transfer. Interface. Data Register. Status Register. F= Flag Bit. Fig. (1) Data transfer from I/O to CPU

Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture

a number of pencil-and-paper(-and-calculator) questions two Intel assembly programming questions

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

Organisasi Sistem Komputer

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

Chapter 6 Objectives

INPUT-OUTPUT ORGANIZATION

Module 6: INPUT - OUTPUT (I/O)

I/O - input/output. system components: CPU, memory, and bus -- now add I/O controllers and peripheral devices. CPU Cache

[08] IO SUBSYSTEM 1. 1

Computer Organization

Topics. Interfacing chips


6 Direct Memory Access (DMA)

Digital System Design

Today: I/O Systems. Architecture of I/O Systems

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Unit 5. Memory and I/O System

Digital Design Laboratory Lecture 6 I/O

Section I Section Real Time Systems. Processes. 1.6 Input/Output Management. (Textbook: A. S. Tanenbaum Modern OS - ch. 5)

I/O Management Intro. Chapter 5

Eastern Mediterranean University School of Computing and Technology INPUT / OUTPUT

3. Controtlto specify the mode of transfer such as read or write 4. A control to start the DMA transfer

Computer Organization

Computer Systems Laboratory Sungkyunkwan University

STANDARD I/O INTERFACES

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION

INPUT-OUTPUT ORGANIZATION

MICROPROCESSOR MEMORY ORGANIZATION

CS330: Operating System and Lab. (Spring 2006) I/O Systems

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09

Input/Output Systems

Computers Are Your Future

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

Homeschool Enrichment. The System Unit: Processing & Memory

Readings. Storage Hierarchy III: I/O System. I/O (Disk) Performance. I/O Device Characteristics. often boring, but still quite important

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals.

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.

PC I/O. May 7, Howard Huang 1

PC Interrupt Structure and 8259 DMA Controllers

I/O Systems. Jo, Heeseung

Input / Output. School of Computer Science G51CSA

INPUT/OUTPUT ORGANIZATION

Advanced Parallel Architecture Lesson 4 bis. Annalisa Massini /2015

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.

ECE331: Hardware Organization and Design

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

Interconnecting Components

Storage Systems. Storage Systems

Operating system Dr. Shroouq J.

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Input / Output

Key Points. Rotational delay vs seek delay Disks are slow. Techniques for making disks faster. Flash and SSDs

,e-pg PATHSHALA- Computer Science Computer Architecture Module 25 Memory Hierarchy Design - Basics

I/O Management and Disk Scheduling. Chapter 11

操作系统概念 13. I/O Systems

I/O Devices. I/O Management Intro. Sample Data Rates. I/O Device Handling. Categories of I/O Devices (by usage)

Introduction to Microprocessor

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Architectural Differences nc. DRAM devices are accessed with a multiplexed address scheme. Each unit of data is accessed by first selecting its row ad

Chapter 11: Input/Output Organisation. Lesson 02: Accessing the I/O devices and Interface circuit

Summary of Computer Architecture

Module 11: I/O Systems

Computer Overview. A computer item you can physically see or touch. A computer program that tells computer hardware how to operate.

INPUT/OUTPUT ORGANIZATION

Chapter 13: I/O Systems

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

OPERATING SYSTEMS CS136

Chapter Seven Morgan Kaufmann Publishers

CSCI-GA Operating Systems I/O. Hubertus Franke

Chapter 3. Top Level View of Computer Function and Interconnection. Yonsei University

Replacement Policy: Which block to replace from the set?

ECE 341. Lecture # 19

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Microprocessor & Interfacing Lecture DMA Controller--1

Input/Output Systems

CS370 Operating Systems


Final Lecture. A few minutes to wrap up and add some perspective

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture Input/Output (I/O) Copyright 2012 Daniel J. Sorin Duke University

Chapter 5 - Input / Output

Computer-System Organization (cont.)

Introduction I/O 1. I/O devices can be characterized by Behavior: input, output, storage Partner: human or machine Data rate: bytes/sec, transfers/sec

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

Interfacing. Introduction. Introduction Addressing Interrupt DMA Arbitration Advanced communication architectures. Vahid, Givargis

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

EEM336 Microprocessors I. I/O Interface

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

Operating Systems (CS1022) Input/Output. Yagiz Özbek Evren

1 PC Hardware Basics Microprocessors (A) PC Hardware Basics Fal 2004 Hadassah College Dr. Martin Land

Operating Systems 2010/2011

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University

Storage. Hwansoo Han

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

Chapter 6. Storage and Other I/O Topics

Computer Organization

Transcription:

QUIZ Ch.6 The EAT for a two-level memory is given by: EAT = H Access C + (1-H) Access MM. Derive a similar formula for three-level memory: L1, L2 and RAM. Hint: Instead of H, we now have H 1 and H 2. Source: http://stackoverflow.com/questions/4087280/approximate-cost-toaccess-various-caches-and-main-memory

QUIZ Ch.6 Use the formula for three-level memory to compute the EAT, assuming: H 1 = 0.93 H 2 = 0.97 Local DRAM f = 2.5 GHz Source: http://stackoverflow.com/questions/4087280/approximate-cost-toaccess-various-caches-and-main-memory

Chapter 7 Input/Output and Storage Systems

7.1 Introduction Data storage and retrieval is one of the primary functions of computer systems. One could easily make the argument that computers are more useful to us as data storage and retrieval devices than they are as computational machines. All computers have I/O devices connected to them, and to achieve good performance I/O should be kept to a minimum! In studying I/O, we seek to understand the different types of I/O devices as well as how they work. 4

7.2 I/O and Performance Sluggish I/O throughput can have a ripple effect, dragging down overall system performance. This is especially true when virtual memory is involved! The fastest processor in the world is of little use if it spends most of its time waiting for data. If we really understand what s happening in a computer system we can make the best possible use of its resources. 5

Remember the lesson of Caches (Ch.6) Not in text As the x86 microprocessors reached clock rates of 20 MHz and above in the Intel 386, small amounts of fast cache memory began to be featured in systems to improve performance (1985). This was because the DRAM used for main memory had significant latency, up to 120 ns, as well as refresh cycles. Source: http://en.wikipedia.org/wiki/cpu_cache#in_x86_microprocessors In other words, the memory became a bottleneck. We need a way to quantify the impact of various improvements on the overall performance of the computer system we re designing! 6

7.3 Amdahl s Law The overall performance of a system is a result of the interaction of all of its components. System performance is most effectively improved when the performance of the most heavily used components is improved. This idea is quantified by Amdahl s Law (1967): S is the overall speedup; f is the fraction of work performed by a faster component; k is the speedup of the faster component. 7

QUIZ: Amdahl s Law Assume the component we plan to upgrade is responsible for half (f = 0.5) of the running time of a program. Plug the following values for k in the formula: k = 1 (i.e. no speedup) k = 2 (i.e. the component works twice as fast) k =10 k = 10,000 What do we notice? 8

Silly QUIZ: Amdahl s Law Assume the component we plan to upgrade is responsible for half (f = 0.5) of the running time of a program. Plug the following values for k in the formula: k = 0.5 (i.e.???) k = 0.25 (i.e.???) k = 0.0 (i.e.???) What do we notice? 9

On a large system, suppose we can: upgrade a CPU to make it 50% faster for $10,000 or upgrade its disk drives for $7,000 to make them 150% faster. Processes spend: QUIZ: Amdahl s Law 70% of their time running in the CPU 30% of their time waiting for disk service. An upgrade of which component would offer the greater benefit for the lesser cost? (solve half-and-half) 10

QUIZ: Amdahl s Law The processor option offers a 30% speedup: And the disk drive option gives a 22% speedup: 11

QUIZ: Amdahl s Law The processor option offers a 30% speedup: And the disk drive option gives a 22% speedup: Problem: There are two variables: speedup and cost. How can we compare them meaningfully? 12

QUIZ: Amdahl s Law The processor option offers a 30% speedup: And the disk drive option gives a 22% speedup: Each 1% of improvement: for the processor costs $333 for the disk costs $318. 13

QUIZ: Amdahl s Law The processor option offers a 30% speedup: And the disk drive option gives a 22% speedup: Each 1% of improvement: for the processor costs $333 for the disk costs $318. 14 Should price/performance be our only concern?

7.4 I/O Architectures? I/O = subsystem of components that moves coded data between external devices and a host system (CPU + MM, most likely the motherboard). I/O examples: Blocks of MM devoted to I/O functions. Buses that move data into and out of the system. Control modules in the host and in peripheral devices Interfaces to external components such as keyboards and disks. Cabling or communications links between the host system 15 and its peripherals (USB, SATA, SCSI, RS232 etc.).

16 Generic I/O diagram

Generic I/O diagram Interfaces Protocols Handshake Buffers Physical conversion Logical conversion 17

I/O can be controlled in five general ways. Programmed (a.k.a. polled) I/O reserves a register for each I/O device. CPU continually polls these registers ( new data bit) to detect data arrival. Interrupt-Driven I/O allows the CPU to do other things until I/O is requested. Memory-Mapped I/O shares memory address space between I/O devices and program memory. Direct Memory Access (DMA) offloads I/O processing to a special-purpose chip that takes care of the details. Channel I/O uses dedicated I/O processors. 18 7.4 I/O Architectures

Interrupt-driven I/O Each device connects its interrupt request line to the interrupt controller. Controller signals the CPU by activating INT When ready, CPU responds by activating INTA Controller deactivates INT and starts transferring data through D 0 D 1 19

Interrupt-driven I/O What is several Input devices place requests at the same time? 20

Interrupt-driven I/O What is several Input devices place requests at the same time? A: The interrupt controller handles priorities. 21

Remember Section 4.9 MARIE Instruction Processing Interrupt processing involves adding another step to the fetch-decode-get-execute cycle: ISR = Interrupt Service Routine The starting addresses of all ISRs are stored in an Interrupt Vector Table 22

Interrupt-driven I/O The status of the interrupt signal is checked at the top of the fetch-decode-get-execute cycle. The particular code that is executed whenever an interrupt occurs is determined by a set of addresses called interrupt vectors that are stored in low memory. The system state is saved before the interrupt service routine is executed and is restored afterward. 23

24 Interrupt-driven I/O

Memory-mapped I/O The I/O devices and the MM share the same address space. Each I/O device has its own reserved block of memory. To the CPU, memory-mapped I/O looks just like a regular MM access Thus the same instructions to move data to and from both I/O and MM, greatly simplifying system design. In small systems the low-level details of the data transfers are offloaded to the I/O controllers built into the I/O devices. 25

DMA DMA takes CPU out of the process of transferring data between MM and I/O devices but DMA and CPU still share the data bus! DMA has higher priority and steals memory cycles from CPU. 26 Why? I/O operations have to beware of timeouts.

DMA DMA transfers can either occur one byte at a time or all at once in burst mode. If they occur a byte at a time, this can allow the CPU to access memory on alternate bus cycles this is called cycle stealing since the DMA controller and CPU contend for memory access. In burst mode DMA, the CPU can be put on hold while the DMA transfer occurs and a full block of possibly hundreds or thousands of bytes can be moved. 27

DMA DMA is used by disk drive controllers, graphics cards, network cards, sound cards, etc. DMA is also used for transferring data between cores on the same CPU chip. 28

Channel I/O Used in large systems (mainframes, servers), where the many I/O requests would slow down CPU performance significantly. One or more I/O processors (IOP) control various channel paths. Slower devices such as terminals and printers are combined (multiplexed) into a single faster channel. Unlike DMA, there is a separate I/O bus! 29

30 Channel I/O configuration

Channel I/O Distinguished from DMA by the intelligence of IOPs: The IOP negotiates protocols, issues device commands, translates storage coding to memory coding, and can transfer entire files or groups of files independent of the host CPU. The host has only to create the program instructions for the I/O operation and tell the IOP where to find them. Example: Backup a large file from HDD to tape. 31

Character I/O vs. block I/O Character I/O devices process one byte (or character) at a time. Examples include modems, keyboards, and mice. Keyboards are usually connected through an interruptdriven I/O system. Block I/O devices handle bytes in groups. Most mass storage devices (disk and tape) are block I/O devices. Block I/O systems are most efficiently connected through DMA or channel I/O. 32

To do for Ch.7 review: Read text sections 7.1, 7.2, 7.3, 7.4 (stop before 7.4.3 I/O bus operation) Read What Do We Really Mean by Speedup? pp.403-5 and understand the 3 examples given there. Answer Review Questions 1-14 Solve in notebook Exercises 1 and 4 33