Computer Organization and Design: The Hardware/Software Interface

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
CS152 Fall ’99 Midterm II Page 1 University of California, Berkeley College of Engineering Computer Science Division EECS Fall 1999 John Kubiatowicz Midterm II SOLUTIONS November 17, 1999 CS152 Computer Architecture and Engineering Your Name: SID Number: Discussion Section: Problem Possible Score 1 25 2 25 3 25 4 25 Total
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS152 Fall ’99 Midterm II Page 2 [ This page left for π ] 3.141592653589793238462643383279502884197169399375105820974944
Background image of page 2
CS152 Fall ’99 Midterm II Page 3 Problem 1: Memory Hierarchy Problem 1a: Assume that we have a 32-bit processor (with 32-bit words) and that this processor is byte-addressed (i.e. addresses specify bytes). Suppose that it has a 512-byte cache that is two- way set-associative, has 4-word cache lines, and uses LRU replacement. Split the 32-bit address into “tag”, “index”, and “cache-line offset” pieces. Which address bits comprise each piece? tag: bits 31-8 index: bits 7-4 cache-line offset: bits 3-0 Problem 1b: How many sets does this cache have? Explain. 4 bits in the index 16 sets Problem 1c: Draw a block diagram for this cache. Show a 32-bit address coming into the diagram and a 32-bit data result and “Hit” signal coming out. Include, all of the comparators in the system and any muxes as well. Include the data storage memories (indexed by the “Index”), the tag matching logic, and any muxes. You can indicate RAM with a simple block, but make sure to label address widths and data widths. Make sure to label the function of various blocks and the width of any buses. Address[7:4] TAG<24bits> DATA<128bits> 0 1 2 3 13 14 15 Valid TAG<24bits> DATA<128bits> 0 1 2 3 13 14 15 =? =? Address[31:8] MUX (2-1) 128 128 1 0 24 24 24 MUX (4-1) 128 Address[3:2] 32 SEL HIT 24
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS152 Fall ’99 Midterm II Page 4 [ This page left for scratch ]
Background image of page 4
CS152 Fall ’99 Midterm II Page 5 Problem 1d: Below is a series of memory read references set to the cache from part (a). Assume that the cache is initially empty and classify each memory references as a hit or a miss. Identify each miss as either compulsory, conflict, or capacity. One example is shown. Hint: start by splitting the address into components. Show your work. Address Hit/Miss? Miss Type? 0x300 Miss Compulsory 0x1BC Miss Compulsory 0x206 Miss Compulsory 0x109 Miss Compulsory 0x308 Miss Conflict 0x1A1 Miss Compulsory 0x1B1 Hit 0x2AE Miss Compulsory 0x3B2 Miss Compulsory 0x10C Hit 0x205 Miss Conflict 0x301 Miss Conflict 0x3AE Miss Compulsory 0x1A8 Miss Conflict 0x3A1 Hit 0x1BA Hit Problem 1e: Calculate the miss rate and hit rate. Hit Rate = 25 . 0 16 4 = Miss Rate =1 – Hit Rate = 75 . 0 16 12 =
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS152 Fall ’99 Midterm II Page 6 [This page intentionally left blank]
Background image of page 6
CS152 Fall ’99 Midterm II Page 7 Problem 1f: You have a 500 MHz processor with 2-levels of cache, 1 level of DRAM, and a DISK for virtual memory. Assume that it has a Harvard architecture (separate instruction and data cache at level 1). Assume that the memory system has the following parameters:
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

fa99 midterm2 solution - CS152 Fall '99 Midterm II Page 1...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online