CS 351 Exam 3, Fall 2011

Similar documents
CS 351 Exam 3, Fall 2013

CS 351 Exam 1, Fall 2010

CS 351 Exam 2, Fall 2012

CS 351 Exam 4, Fall 2010

CS 351 Exam 3 Mon. 5/11/2015

CS 351 Exam 2 Mon. 11/2/2015

CS399 New Beginnings. Jonathan Walpole

Portland State University ECE 587/687. Virtual Memory and Virtualization

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015

OPEN BOOK, OPEN NOTES. NO COMPUTERS, OR SOLVING PROBLEMS DIRECTLY USING CALCULATORS.

Computer Architecture CS372 Exam 3

CS 450 Exam 2 Mon. 11/7/2016

CS 450 Exam 2 Mon. 4/11/2016

ECE 3055: Final Exam

CDA 3103 Computer Organization Exam 1 (Sep. 22th, 2014)

CS 433 Homework 5. Assigned on 11/7/2017 Due in class on 11/30/2017

Memory Management (2)

COS 318: Operating Systems. Virtual Machine Monitors

CSE 378 Final 3/18/10

Question Points Score Total 100

lecture 18 cache 2 TLB miss TLB - TLB (hit and miss) - instruction or data cache - cache (hit and miss)

Second Midterm Exam March 21, 2017 CS162 Operating Systems

Agenda. CS 61C: Great Ideas in Computer Architecture. Virtual Memory II. Goals of Virtual Memory. Memory Hierarchy Requirements

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

NAME: Problem Points Score. 7 (bonus) 15. Total

Lecture 21. Monday, February 28 CS 470 Operating Systems - Lecture 21 1

CS152 Exam #2 Fall Professor Dave Patterson

CS-537: Midterm Exam (Fall 2008) Hard Questions, Simple Answers

Stanford University Computer Science Department CS 140 Midterm Exam Dawson Engler Winter 1999

ECE 411 Exam 1. This exam has 5 problems. Make sure you have a complete exam before you begin.

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

Topic 18: Virtual Memory

Disco: Running Commodity Operating Systems on Scalable Multiprocessors

Introduction to Computer Science Midterm 3 Fall, Points

Computer Architecture and Engineering CS152 Quiz #2 March 7th, 2016 Professor George Michelogiannakis Name: <ANSWER KEY>

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

Virtualization and memory hierarchy

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

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

24-vm.txt Mon Nov 21 22:13: Notes on Virtual Machines , Fall 2011 Carnegie Mellon University Randal E. Bryant.

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names

CSE 378 Final Exam 3/14/11 Sample Solution

Do not open this exam until instructed to do so. CS/ECE 354 Final Exam May 19, CS Login: QUESTION MAXIMUM SCORE TOTAL 115

CSE Computer Architecture I Fall 2011 Homework 07 Memory Hierarchies Assigned: November 8, 2011, Due: November 22, 2011, Total Points: 100

ISA Instruction Operation

Translation Buffers (TLB s)

CSE 141 Computer Architecture Spring Lectures 17 Virtual Memory. Announcements Office Hour

Alexandria University

Virtual Memory Review. Page faults. Paging system summary (so far)

ELE 375 / COS 471 Final Exam Fall, 2001 Prof. Martonosi

Operating Systems. 09. Memory Management Part 1. Paul Krzyzanowski. Rutgers University. Spring 2015

ADDRESS TRANSLATION AND TLB

Transla'on, Protec'on, and Virtual Memory. 2/25/16 CS 152 Sec'on 6 Colin Schmidt

ADDRESS TRANSLATION AND TLB

CAM Content Addressable Memory. For TAG look-up in a Fully-Associative Cache

CS533 Concepts of Operating Systems. Jonathan Walpole

COMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager

ECE 411 Exam 1. Name:

ee457_mt_sp2013.fm 3 ( 48 points) 30 min. Virtual Memory: 6 pts 9 pts 6 pts 6 pts 6 pts 7 pts 3.1 PTBR stands for. It is initiated by (hardware / oper

HY225 Lecture 12: DRAM and Virtual Memory

CS 115 Exam 2 (Section 1) Spring 2017 Thu. 03/31/2017

CSE 120 Principles of Operating Systems

UW CSE 351, Winter 2013 Final Exam

15-740/ Computer Architecture, Fall 2011 Midterm Exam II

CS 333 Introduction to Operating Systems. Class 1 - Introduction to OS-related Hardware and Software

Problem Max Points Score Total 100

EXAM 1 SOLUTIONS. Midterm Exam. ECE 741 Advanced Computer Architecture, Spring Instructor: Onur Mutlu

Virtual Memory, Address Translation

Introduction to C. Why C? Difference between Python and C C compiler stages Basic syntax in C

Computer Architecture and Engineering. CS152 Quiz #3. March 18th, Professor Krste Asanovic. Name:

ELE 375 Final Exam Fall, 2000 Prof. Martonosi

Administrative Details. CS 140 Final Review Session. Pre-Midterm. Plan For Today. Disks + I/O. Pre-Midterm, cont.

CS 351 Exam 2, Section 1 Wed. 11/2/2016

CS 2506 Computer Organization II Test 2. Do not start the test until instructed to do so! printed

Introduction to Computer Systems

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1

ECE232: Hardware Organization and Design

Read this before starting!

CS 61C: Great Ideas in Computer Architecture. Virtual Memory

Topic 18 (updated): Virtual Memory

Faculty of Science FINAL EXAMINATION

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization

CS 537: Introduction to Operating Systems Fall 2016: Midterm Exam #1. All cell phones must be turned off and put away.

SOLUTION. Midterm #1 February 26th, 2018 Professor Krste Asanovic Name:

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 24

CS 115 Exam 2 (Section 1) Fall 2017 Thu. 11/09/2017

CMSC411 Fall 2013 Midterm 1

CS 2506 Computer Organization II Test 2. Do not start the test until instructed to do so! printed

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 3 for Fall Semester, 2005

ELEC3441: Computer Architecture Second Semester, Homework 3 (r1.1) SOLUTION. r1.1 Page 1 of 12

CS162 Operating Systems and Systems Programming Lecture 14. Caching and Demand Paging

This exam is worth 60 points, or 30% of your total course grade. The exam contains eight

Virtual Memory, Address Translation

CS 333 Introduction to Operating Systems. Class 1 - Introduction to OS-related Hardware and Software

CS 261 Fall Mike Lam, Professor. Virtual Memory

CIS Operating Systems Memory Management Cache Replacement & Review. Professor Qiang Zeng Fall 2017

College Algebra Extra Credit Worksheet

CS232 Final Exam May 5, 2001

CPSC 330 Computer Organization

Transcription:

CS 351 Exam 3, Fall 2011 Your name: Rules You may use one handwritten 8.5 x 11 cheat sheet (front and back). This is the only resource you may consult during this exam. Include explanations and comments in your answers in order to maximize your partial credit. However, you will be penalized for giving extraneous incorrect information. You may use the backs of these pages if you need more space, but make it clear where to find your answer to each question. Unless otherwise specified, you do not need to work out the arithmetic on math problems. Just do enough algebra to set up an answer of the form: Answer = [arithmetic expression] [units] Grade (muxen use only) Your Score Max Score Problem 1 20 Problem 2 20 Problem 3 25 Problem 4 15 Problem 5 2- Total 100

Problem 1: Average memory access time (20 points) Assume a program with the following instruction mix: 40% integer instructions, 30% load and store instructions, 20% branches and jumps, and 10% floatingpoint instructions. Assume that the program is executed on a system with the following memory hierarchy and hit rates. This system does NOT have virtual memory. Level 1 instruction cache: 98% hit rate, 1-cycle access time. Level 1 data cache: 95% hit rate, 1-cycle access time. Level 2 combined cache: 90% hit rate, 4-cycle access time. Main memory: 100% hit rate, 80-cycle access time. a) How many cycles does the average instruction spend accessing the memory subsystem? b) For this program (and most others), the instruction cache has a higher hit rate than the Level 1 data cache. Why do you think this is? c) If this system had virtual memory and no TLB, how would your answer from part (a) change? (Be quantitative give an exact increase or decrease.) Page 2 of 7

Problem 2: Cache sizing (20 points) A byte-addressable machine with 32-bit memory addresses has a cache with the following properties: 8-byte cache blocks 32 KB of data in the cache 2-way set-associative Write-back A. How many blocks are in this cache? B. On average, how many bits of metadata are required per block? Explain. C. How many BYTES is the entire cache (data and metadata)? D. 1 KB = 2^X B. What is X? (+1 if everyone gets this right) Page 3 of 7

Problem 3: Page table sizing (25 points) A byte-addressable memory system has: 3 protection bits A 32-entry TLB 32-bit virtual addresses 48-bit physical addresses 4 KB pages The system can run up to 512 processes at once. A. How many virtual pages does each process have? B. How many physical pages does the system have? C. How many bits are needed for each page table entry (data and metadata)? Explain. D. If the TLB is NOT flushed on a context switch, how many bits are needed for each TLB entry? Explain. E. How many PAGES will each processʼs page table occupy? Page 4 of 7

Problem 4: Cache mappings (15 points) For each of the following caches, show the cache contents after memory references to addresses 01010110 and 10110001. Include any necessary metadata. The main memory has 8-bit addresses. Be sure you show at LEAST the valid bit and tag of each block. A. The cache has: 8B of data (total) 1-byte blocks Direct mapping Page 5 of 7

B. [5 points] The cache has: 4-byte blocks Direct mapping 16B of data (total) C. [5 points] The cache has: 2-byte blocks 2-way set associativity 16B of data (total) Page 6 of 7

Problem 5: Virtualization (20 points) A. Give an example of a machine code instruction that would be virtualized using each of the following techniques. Your instruction does not have to exactly match an instruction on a real architecture, but you should explain how your instruction works and why the given virtualization technique is the right one. 1. Directly execute the instruction on the hardware 2. Trap-and-emulate; when the instruction causes a fault, it will trap, and the VMM can execute code that simulates its effect. 3. Binary translation; the instruction cannot be safely executed on the hardware and must be translated into one or more safer instructions. B. Although running on a VMM should not affect the correctness of guest OS code, it will often affect the performance. Explain how the performance of a memory reference might be dramatically different if an OS is running as a virtualized guest. Page 7 of 7