Replacement Policy: Which block to replace from the set?

Similar documents
Interconnecting Components

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

Chapter 6. Storage and Other I/O Topics

Storage. Hwansoo Han

Computer Systems Laboratory Sungkyunkwan University

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

Example Networks on chip Freescale: MPC Telematics chip

Chapter 6. Storage and Other I/O Topics. ICE3003: Computer Architecture Fall 2012 Euiseong Seo

Computer Architecture Computer Science & Engineering. Chapter 6. Storage and Other I/O Topics BK TP.HCM

L12: I/O Systems. Name: ID:

Chapter 6. Storage and Other I/O Topics

Chapter 6. Storage and Other I/O Topics. ICE3003: Computer Architecture Spring 2014 Euiseong Seo

Main Memory Supporting Caches

CS 341l Fall 2008 Test #4 NAME: Key

EN1640: Design of Computing Systems Topic 07: I/O

Chapter 6. Storage & Other I/O

Chapter 6. Storage and Other I/O Topics. Jiang Jiang

12 Cache-Organization 1

Cache Optimization. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Chapter 6. Storage and Other I/O Topics

Chapter Seven Morgan Kaufmann Publishers

Improving Cache Performance

Memory Hierarchy. Slides contents from:

CS252 Graduate Computer Architecture Spring 2014 Lecture 17: I/O

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

Memory Technology. Caches 1. Static RAM (SRAM) Dynamic RAM (DRAM) Magnetic disk. Ideal memory. 0.5ns 2.5ns, $2000 $5000 per GB

Module 6: INPUT - OUTPUT (I/O)

A Cache Hierarchy in a Computer System

ECE 30 Introduction to Computer Engineering

LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY

Memory Hierarchy Computing Systems & Performance MSc Informatics Eng. Memory Hierarchy (most slides are borrowed)

Improving Cache Performance

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

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.

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

Lecture 13. Storage, Network and Other Peripherals

Bus System. Bus Lines. Bus Systems. Chapter 8. Common connection between the CPU, the memory, and the peripheral devices.

Systems Architecture II

The Memory Hierarchy. Cache, Main Memory, and Virtual Memory (Part 2)

Computer Architecture CS 355 Busses & I/O System

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

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

Chapter 6. I/O issues

MEMORY HIERARCHY BASICS. B649 Parallel Architectures and Programming

Thomas Polzer Institut für Technische Informatik

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

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Cache Memory COE 403. Computer Architecture Prof. Muhamed Mudawar. Computer Engineering Department King Fahd University of Petroleum and Minerals

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Memory Hierarchy Computing Systems & Performance MSc Informatics Eng. Memory Hierarchy (most slides are borrowed)

Buses. Disks PCI RDRAM RDRAM LAN. Some slides adapted from lecture by David Culler. Pentium 4 Processor. Memory Controller Hub.

CS152 Computer Architecture and Engineering Lecture 20: Busses and OS s Responsibilities. Recap: IO Benchmarks and I/O Devices

ECE 551 System on Chip Design

Computer Architecture Computer Science & Engineering. Chapter 5. Memory Hierachy BK TP.HCM

Module Outline. CPU Memory interaction Organization of memory modules Cache memory Mapping and replacement policies.

SEMICON Solutions. Bus Structure. Created by: Duong Dang Date: 20 th Oct,2010

Cache Performance (H&P 5.3; 5.5; 5.6)

Memory Technology. Chapter 5. Principle of Locality. Chapter 5 Large and Fast: Exploiting Memory Hierarchy 1

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Chap. 4 Multiprocessors and Thread-Level Parallelism

Common Computer-System and OS Structures

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

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

Memory Hierarchy. Slides contents from:

COSC3330 Computer Architecture Lecture 20. Virtual Memory

Multilevel Memories. Joel Emer Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology

Physical Design of Snoop-Based Cache Coherence on Multiprocessors

ECEC 355: Cache Design

Cache Memory and Performance

registers data 1 registers MEMORY ADDRESS on-chip cache off-chip cache main memory: real address space part of virtual addr. sp.

Input/Output Introduction

Introduction. Motivation Performance metrics Processor interface issues Buses

EITF20: Computer Architecture Part 5.2.1: IO and MultiProcessor

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs

I/O CANNOT BE IGNORED

CS510 Operating System Foundations. Jonathan Walpole

CSCI-GA Operating Systems I/O. Hubertus Franke

Chapter 5A. Large and Fast: Exploiting Memory Hierarchy

INPUT/OUTPUT ORGANIZATION

Computer Architecture

Lecture 21: Virtual Memory. Spring 2018 Jason Tang

Computer Systems Architecture

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Buses. Maurizio Palesi. Maurizio Palesi 1

UNIT I (Two Marks Questions & Answers)

I/O. Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University. See: P&H Chapter 6.5-6

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections )

Cycle Time for Non-pipelined & Pipelined processors

lecture 22 Input / Output (I/O) 4

IO System. CP-226: Computer Architecture. Lecture 25 (24 April 2013) CADSL

CS 136: Advanced Architecture. Review of Caches

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

ECE331: Hardware Organization and Design

MARTHANDAM COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY TWO MARK QUESTIONS AND ANSWERS

Adapted from instructor s supplementary material from Computer. Patterson & Hennessy, 2008, MK]

EN1640: Design of Computing Systems Topic 06: Memory System

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

Midterm #2 Solutions April 23, 1997

HY225 Lecture 12: DRAM and Virtual Memory

CS370 Operating Systems

Transcription:

Replacement Policy: Which block to replace from the set? Direct mapped: no choice Associative: evict least recently used (LRU) difficult/costly with increasing associativity Alternative: random replacement simple and fast, not too much worse than LRU Combination LRU+Random CS 230 - Spring 2018 3-1

Multilevel Caches primary (level-1) cache attached to CPU small, but fast (usually instruction speed) level-2 cache services misses from L1 cache larger, slower, but still faster than main memory main memory services L2 cache misses some high-end systems have even more levels on-chip vs. off-chip placement of cache If L2 contains the requested data item, Miss penalty for L1 will be the access time for L2. The Miss Penalty will be higher if data not in L2 either. CS 230 - Spring 2018 3-2

assume Multilevel Cache Example CPU base CPI = 1, clock rate = 4GHz miss rate = 2% main memory access time = 100ns with just primary cache miss penalty = 100ns/0.25ns = 400 cycles effective CPI = 1 + 0.02 * 400 = 9 CS 230 - Spring 2018 3-3

Multilevel Cache Example now add L2 cache access time = 5ns global miss rate to main memory = 0.5% primary miss with L2 hit penalty = 5ns/0.25ns = 20 cycles primary miss with L2 miss extra penalty = 400 cycles CPI = 1 + 0.02 * 20 + 0.005 * 400 = 3.4 Processor with L2 cache is 9/3.4 = 2.6 times faster! CS 230 - Spring 2018 3-4

I/O Devices I/O devices can be characterized by behaviour: input, output, storage partner: human or machine data rate: bytes/sec, transfers/sec I/O device vs. I/O controller controller: processor that controls device CS 230 - Spring 2018 3-5

I/O System Characteristics dependability important especially for storage performance latency (response time) throughput (bandwidth) desktops & embedded systems mainly interested in response time & device diversity servers mainly interested in throughput & expandability CS 230 - Spring 2018 3-6

Interconnecting Components need interconnection between CPU, memory, I/O controllers Bus: shared communication channel parallel set of wires for data and synchronization performance limited by physical factors wire length, number of connections CS 230 - Spring 2018 3-7

I/O Bus CS 230 - Spring 2018 3-8

Bus Types processor-memory bus Connects processor to main-memory short, high-speed design matches memory organization I/O bus: connect different devices together longer, multiple connections interoperability standards I/O Bus does not directly connect to Memory. Bridge connects memory & I/O bus CS 230 - Spring 2018 3-9

Bus Signals data lines carry addresses and data Multiplexed (shared) or separate control lines: carries info about the data being carried indicate data types, synchronize transactions Serial Communication: One bit at a time on one line Parallel Comm: Multiple bits at a time, sent on many parallel lines (still one bit on one line at a time) CS 230 - Spring 2018 3-10

Bus Synchronization The information being sent back and forth on a bus needs to be synchronized so that the component making a request knows when it is receiving the response. Synchronous buses include a clock in the control lines, and follow a fixed protocol for communicating. For example: Memory will receive the address and read on the first clock cycle, then memory is required to respond with the data word in question on the sixth cycle. Every device on the bus must run at the same clock rate Clock skew is an issue, limits our buses length Asynchronous Buses are not clocked, instead agree upon some kind of a handshaking protocol: Send out signal, wait for acknowledgement before sending next Can support any device that follows protocol, doesn't need CS 230 - Spring 2018 3-11 clocks, Can be lengthened as needed

I/O Management I/O access mediated by operating system multiple programs share resources need protection and scheduling I/O causes asynchronous interrupts I/O programming is fiddly OS provides simpler abstractions CS 230 - Spring 2018 3-12

memory mapped I/O I/O Programming I/O registers are mapped into memory address decoder distinguishes between them OS uses memory protection to protect from direct user access I/O instructions special instructions to access I/O operations can only be executed in privileged mode CS 230 - Spring 2018 3-13

I/O Interaction polling: periodically check I/O status register if device ready, perform operation if error, take action interrupts: I/O controller interrupts main CPU asynchronous instruction execution interrupt handler must preserve state costly can give priorities to interrupts at certain times: mask low-priority interrupts CS 230 - Spring 2018 3-14

I/O Data Transfer Traditional CPU transfers data from/to memory time consuming for high-speed devices Direct Memory Access (DMA) OS provides memory address to device I/O controller autonomously transfers data interrupt/polling signal on completion or error CS 230 - Spring 2018 3-15

DMA/Cache Interaction DMA writing to cached memory block cached copy becomes stale write-back cache with dirty block DMA would read stale data need to ensure cache coherence flush blocks from cache if they will be used for DMA or use non-cacheable memory locations for I/O CS 230 - Spring 2018 3-16