



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is a computer architecture exam covering various topics such as cpu performance with caches, processor caches, virtual memory, memory organization, and quick answers. It includes five questions with subquestions, and all questions are weighted the same, 20 points each. The exam is closed book and requires students to show all work and turn in any extra pages used. The topics covered include instruction cache miss rate, data cache miss rate, effective cpi, level-one data cache, level-two cache, miss rate, direct mapped cache, set associative cache, lru replacement, page size, virtual pages, physical pages, page table, tlb, dram memory cells, memory hierarchy, and access latency.
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Directions : This exam is closed book—put all books and notes under your desk on the floor. There are five questions with several subquestions. All questions are marked with their point values. There should be plenty of workspace provided in the exam booklet, but if you need extra pages, you may use a blank piece of paper.
Be sure to show all work and turn in any extra pages that you use. If you do not show your work or your work is illegible, you will not receive any partial credit for a wrong answer.
All questions are weighted the same—20 points each. The point value for each subquestion is indi- cated.
Write your name on each exam page!
Topics covered by each question:
Question 1 - CPU performance with caches Question 2 - Processor caches Question 3 - Virtual memory Question 4 - Memory organization Question 5 - Quick answer
Question 1 - CPU performance with caches
For the following questions, consider a program in which 20% of the instructions are memory load or store instructions. Assume that there is a main memory access time of 50 n.sec., a 500 MHz pro- cessor clock rate, and a CPI of 2 for a machine with a perfect cache (i.e., the data and instructions are always found in the first level cache).
(a) 10 points. Consider a machine with an instruction cache miss rate of 3% and a data cache miss rate of 10%. What is the effective CPI of this machine?
(b) 10 points. Assume that we have two cache hierarchies: one in machine 1 and one in machine 2.
Assuming that the I-cache miss rate is 0%, what is the effective CPI of machine 1 and 2? Which machine has better performance?
Question 3 - Virtual memory
A virtual memory system has a page size of 4,096 bytes, eight virtual pages, four physical pages, and uses the LRU page replacement policy (with a reference bit). Suppose that we have the page table (all fields in the page table are shown in binary notation):
(a) How many bits are there in a virtual address for this memory system?
(b) Suppose a page fault occurs on virtual page 6. Which physical page will be replaced?
(c) What is the main memory address for virtual address 5F38(hex)?
Suppose we add a two entry, fully associative TLB to the virtual memory system above. The TLB uses the LRU replacement policy to select a TLB entry to replace on a miss. The contents of the TLB are (all fields in the TLB are shown in binary notation):
(d) Using the page table above and the TLB, what are the contents of the TLB after the references: a Write to address 113F(hex) and a Read to address 4F0A(hex).
You can write your answer in the table below:
Entry Valid Reference Dirty Physical Page 0 0 0 0 -- 1 1 1 0 11 2 0 0 0 -- 3 0 0 0 -- 4 1 1 0 01 5 1 0 1 10 6 0 0 0 -- 7 1 1 1 00
Entry Valid Reference Dirty Virtual Page Physical Page 0 0 0 0 -- -- 1 1 1 0 001 11
Entry Valid Reference Dirty Virtual Page Physical Page 0 1
Question 4 - Memory organization
(a) 6 points. For DRAM memory cells, answer the following questions:
(b) 14 points. Draw all connections and components needed to build a 16x16 memory module using 8x8 memory chips.
Blank page for work space