CMSC Computer Architecture Lecture 18: Exam 2 Review Session. Prof. Yanjing Li University of Chicago

Similar documents
Precise Exceptions and Out-of-Order Execution. Samira Khan

15-740/ Computer Architecture Lecture 5: Precise Exceptions. Prof. Onur Mutlu Carnegie Mellon University

Computer Architecture Lecture 13: State Maintenance and Recovery. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/15/2013

EECS 470. Branches: Address prediction and recovery (And interrupt recovery too.) Lecture 7 Winter 2018

Chapter. Out of order Execution

Last lecture. Some misc. stuff An older real processor Class review/overview.

CMSC Computer Architecture Lecture 12: Multi-Core. Prof. Yanjing Li University of Chicago

EECS 470 Lecture 7. Branches: Address prediction and recovery (And interrupt recovery too.)

EECS 470 Lecture 6. Branches: Address prediction and recovery (And interrupt recovery too.)

CMSC22200 Computer Architecture Lecture 8: Out-of-Order Execution. Prof. Yanjing Li University of Chicago

CMSC Computer Architecture Lecture 15: Memory Consistency and Synchronization. Prof. Yanjing Li University of Chicago

Computer Architecture Lecture 15: Load/Store Handling and Data Flow. Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 2/21/2014

Computer Architecture Lecture 12: Out-of-Order Execution (Dynamic Instruction Scheduling)

CS 2410 Mid term (fall 2015) Indicate which of the following statements is true and which is false.

ECE 552 / CPS 550 Advanced Computer Architecture I. Lecture 9 Instruction-Level Parallelism Part 2

Computer Architecture: Out-of-Order Execution II. Prof. Onur Mutlu Carnegie Mellon University

15-740/ Computer Architecture Lecture 10: Out-of-Order Execution. Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 10/3/2011

EECS 470. Branches: Address prediction and recovery (And interrupt recovery too.) Lecture 6 Winter 2018

MIPS Pipelining. Computer Organization Architectures for Embedded Computing. Wednesday 8 October 14

Multiple Issue ILP Processors. Summary of discussions

Dynamic Scheduling. CSE471 Susan Eggers 1

CS 654 Computer Architecture Summary. Peter Kemper

CS 252 Graduate Computer Architecture. Lecture 4: Instruction-Level Parallelism

EN164: Design of Computing Systems Topic 06.b: Superscalar Processor Design

ROB: head/tail. exercise: result of processing rest? 2. rename map (for next rename) log. phys. free list: X11, X3. PC log. reg prev.

Announcements. ECE4750/CS4420 Computer Architecture L11: Speculative Execution I. Edward Suh Computer Systems Laboratory

Computer Architecture Spring 2016

CSE 820 Graduate Computer Architecture. week 6 Instruction Level Parallelism. Review from Last Time #1

Pipelining to Superscalar

Handout 2 ILP: Part B

exam length Exam Review 1 exam focus exam format

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

EE 4980 Modern Electronic Systems. Processor Advanced

Multithreaded Processors. Department of Electrical Engineering Stanford University

The Processor: Instruction-Level Parallelism

Computer Systems Architecture I. CSE 560M Lecture 10 Prof. Patrick Crowley

CS 61C: Great Ideas in Computer Architecture. Multiple Instruction Issue, Virtual Memory Introduction

EITF20: Computer Architecture Part3.2.1: Pipeline - 3

ROEVER ENGINEERING COLLEGE DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago

Tutorial 11. Final Exam Review

Computer Architecture Lecture 14: Out-of-Order Execution. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/18/2013

CS 152 Computer Architecture and Engineering. Lecture 13 - Out-of-Order Issue and Register Renaming

CS 152 Computer Architecture and Engineering

EECS 470 Midterm Exam Winter 2008 answers

Spring 2010 Prof. Hyesoon Kim. Thanks to Prof. Loh & Prof. Prvulovic

COMPUTER ORGANIZATION AND DESI

EITF20: Computer Architecture Part2.2.1: Pipeline-1

Reorder Buffer Implementation (Pentium Pro) Reorder Buffer Implementation (Pentium Pro)

ECE/CS 552: Pipelining to Superscalar Prof. Mikko Lipasti

ECE 505 Computer Architecture

Computer Architecture 计算机体系结构. Lecture 4. Instruction-Level Parallelism II 第四讲 指令级并行 II. Chao Li, PhD. 李超博士

Advanced Computer Architectures

CSE502: Computer Architecture CSE 502: Computer Architecture

Instruction Level Parallelism

Advanced Instruction-Level Parallelism

ECE 587 Advanced Computer Architecture I

Lecture-13 (ROB and Multi-threading) CS422-Spring

Instruction Level Parallelism. Appendix C and Chapter 3, HP5e

Hardware-based Speculation

Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University. P & H Chapter 4.10, 1.7, 1.8, 5.10, 6

Donn Morrison Department of Computer Science. TDT4255 ILP and speculation

EITF20: Computer Architecture Part2.2.1: Pipeline-1

RECAP. B649 Parallel Architectures and Programming

Real Processors. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

CS 152 Computer Architecture and Engineering

Design of Digital Circuits Lecture 17: Pipelining Issues. Prof. Onur Mutlu ETH Zurich Spring April 2017

04 - DSP Architecture and Microarchitecture

15-740/ Computer Architecture Lecture 4: Pipelining. Prof. Onur Mutlu Carnegie Mellon University

Hardware-based speculation (2.6) Multiple-issue plus static scheduling = VLIW (2.7) Multiple-issue, dynamic scheduling, and speculation (2.

CS433 Homework 2 (Chapter 3)

EECS 470 Midterm Exam Fall 2014

Performance of Computer Systems. CSE 586 Computer Architecture. Review. ISA s (RISC, CISC, EPIC) Basic Pipeline Model.

Course on Advanced Computer Architectures

Full Datapath. Chapter 4 The Processor 2

This Set. Scheduling and Dynamic Execution Definitions From various parts of Chapter 4. Description of Three Dynamic Scheduling Methods

Advanced d Instruction Level Parallelism. Computer Systems Laboratory Sungkyunkwan University

15-740/ Computer Architecture Lecture 14: Runahead Execution. Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 10/12/2011

CS252 Graduate Computer Architecture Lecture 8. Review: Scoreboard (CDC 6600) Explicit Renaming Precise Interrupts February 13 th, 2010

15-740/ Computer Architecture

NOW Handout Page 1. Review from Last Time #1. CSE 820 Graduate Computer Architecture. Lec 8 Instruction Level Parallelism. Outline

EC 513 Computer Architecture

15-740/ Computer Architecture Lecture 8: Issues in Out-of-order Execution. Prof. Onur Mutlu Carnegie Mellon University

CS3350B Computer Architecture. Introduction

CS433 Midterm. Prof Josep Torrellas. October 19, Time: 1 hour + 15 minutes

15-740/ Computer Architecture Lecture 7: Pipelining. Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 9/26/2011

Chapter 4 The Processor 1. Chapter 4D. The Processor

Instr. execution impl. view

POLITECNICO DI MILANO. Exception handling. Donatella Sciuto:

CS433 Homework 2 (Chapter 3)

CS433 Midterm. Prof Josep Torrellas. October 16, Time: 1 hour + 15 minutes

Keywords and Review Questions

The University of Texas at Austin

CMSC Computer Architecture Lecture 4: Single-Cycle uarch and Pipelining. Prof. Yanjing Li University of Chicago

Advanced issues in pipelining

CS 152 Computer Architecture and Engineering

Homework 5. Start date: March 24 Due date: 11:59PM on April 10, Monday night. CSCI 402: Computer Architectures

CMSC411 Fall 2013 Midterm 2 Solutions

Outline. Exploiting Program Parallelism. The Hydra Approach. Data Speculation Support for a Chip Multiprocessor (Hydra CMP) HYDRA

References EE457. Out of Order (OoO) Execution. Instruction Scheduling (Re-ordering of instructions)

Transcription:

CMSC 22200 Computer Architecture Lecture 18: Exam 2 Review Session Prof. Yanjing Li University of Chicago

Administrative Stuff! Lab 5 (multi-core) " Due: 11:59pm, Dec. 1 st, Thursday " Two late days with penalty " TAs are holding Labs tomorrow! Exam 2, Wednesday, 11/30, 7-9pm, Kent 107 " Open book, open notes, close electronic device " A calculator can be handy 2

Administrative Stuff! My office hours this week " Additional office hours! Tuesday(11/29): 1-3pm! Wednesday(11/30): 10:30-11:30am, 1-3pm " Office hours on Thursday moved to 9:30am-10:30am! All TAs are holding their normal office hours 3

Where Are We in the Lecture Schedule?! ISA! Uarch " Datapath, control " Single cycle, multi cycle! Pipelining: basic, dependency handling, branch prediction! Advanced uarch: OOO, SIMD, VLIW, superscalar! Caches and advanced caches! Multi-core! Virtual memory, main memory (DRAM)! Last lecture " Exceptions/interrupts, I/O, wrap-up 4

Exam 2 Topics! Microarcthiecture techniques to improve ILP " OOO: Tomasulo s algorithm, register renaming, reservation stations, memory disambiguation " SIMD and VLIW! Caches " Basics, design considerations and tradeoffs, advanced techniques! Multi-core " Benefits, parallel programs, Amdahl s law (speedup), cache coherence, memory consistency, synchronization! Virtual memory " How it works, page tables, page fault, TLB, interaction with L1 caches! Main memory (DRAM)! Everything covered in Exam 1 5

We did not cover the following topics. The slides are posted for your benefit.

Lecture Outline! Exceptions and interrupts! I/O 7

Exceptions and Interrupts! Unscheduled change of the normal instruction flow! Exceptions " Internal to the running thread " Associated with a particular instruction " Examples: divide-by-0, undefined machine code, page fault! Interrupts " External to the running thread " Not associated with any instruction " Examples: I/O device request, system reset 8

When to Handle?! Exceptions " When detected (and known to be non-speculative) " In the 5-stage ARMv8 pipeline processor, in which stage can we detect the following exceptions?! Divide-by-0, undefined machine code, page fault! Interrupts " When convenient " Except for very high priority ones! Power failure! Machine check (error)! Priorities and timing behavior defined in ISA 9

Precise Exceptions! The architectural state should be consistent when the exception/interrupt is ready to be handled 1. All previous instructions should be completely retired. 2. No later instruction should be retired. Retire = commit = finish execution and update arch. state 10

Why Do We Want Precise Exceptions?! Semantics of the von Neumann model ISA specifies it! Aids software debugging " Think about breakpoints; how useful are they if we don t have precise exceptions?! Enables (easy) recovery from exceptions " e.g. page faults; restart from the faulting instruction after it s handled 11

Providing Precise Exceptions! In-order 5-stage pipeline t 0 t 1 t 2 t 3 t 4 t 5 Inst h IF PC ID EX killed Inst i Inst j IF PC+4 ID IF PC+8 killed killed Inst k Inst l IF ID IF EX ID IF WB EX ID IF Inst k is the first instrucaon of the excepaon handling rouane 12

Providing Precise Exceptions! How about out-of-order execution?! Or, in-order dispatch/execution, out-of-order completion? FMUL R4 # R1, R2 ADD R3 # R1, R2 FMUL R2 # R5, R6 ADD R7 # R5, R6 F D E E E E E E E E W F D E W F D E W F D E W F D E E E E E E E E W F D E W F D E W! Use a reorder buffer! 13

Reorder Buffer (ROB)! Idea: Complete instructions out-of-order, but reorder them before making results visible to architectural state! When instruction is decoded it reserves an entry in the ROB! When instruction completes, it writes result into ROB entry! When instruction oldest in ROB and it has completed without exceptions, its result moved to reg. file or memory Func Unit Instruction Cache Register File Func Unit Reorder Buffer Func Unit 14

What s in a ROB Entry? V DestRegID DestRegVal StoreAddr StoreData PC Valid bits for reg/data + control bits Exc? 15

Exception/Interrupt Handling Mechanism! Hardware and software work together! Hardware " Provide precise exception semantics " Record relevant information (e.g., PC of the faulting instruction, cause of the exception/interrupt, etc.) " Jump to exception/interrupt handling routine! Software (OS) " Implement & install exception/interrupt handling routine " i.e., OS determines how to handle exceptions/interrupts 16

Example: ARMv8! Address of the unlucky instruction saved in a register " ELR, exception link register! Reason of exception/interrupt saved in a register " ESR, exception syndrome register! Processor jumps to a predefined address " Single entry point for all exceptions/interrupts! OS takes appropriate actions based on ESR, and restarts execution by jumping back to ELR if needed 17

Example: x86! Vectored interrupt! Key data structure: interrupt descriptor table (IDT) " Each IDT entry: entry point of an exception/interrupt routine " The type of the exception determines the index to the table " OS fills the IDT entries 18

I/O Many I/O controllers (highlighted) 19

What Instructions to Use for I/O operations?! Special I/O instructions " E.g., in and out in x86! Regular load/store instructions " Memory-mapped I/O 20

Two I/O Mechanisms! Programmed I/O (PIO) " CPU issues instruction to perform I/O operations! Direct Memory Access (DMA) " CPU specifies what I/O operations need to be performed, an a dedicated hardware controller (the DMA controller) performs the operation to free up the CPU so that it can perform other tasks 21