Docsity

Computer Organization and Design - Study Guide Questions | ECE 411, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
ECE411 Exam 1 Study Questions
1. ISA Classes
Consider the high-level code:
A = X*Y + X*Z
where A, X, and Y refer to locations in memory.
Write the instructions needed to implement this operation for each of the following machines:
a) stack-based
b) accumulator-based
c) register-memory based
d) load-store based
2. Caches
Consider a system with a 32-bit address space and a cache. The system has 128-byte cache lines and a
capacity of 64 KB.
Specify the bit lengths for the tag, set, and offset fields for each of the following cache
implementations:
a) a direct-mapped cache
b) a two-way set-associative cache
c) a four-way set-associative cache
d) a fully-associative cache
3. Virtual Memory
Consider a system with a 32-bit virtual address space, a 16-bit physical address space, and 2KB pages.
a) How many bits long are each virtual page number?
b) How many bits long are each physical page number?
c) If the page table entries have valid, dirty, and PPN fields, how many bits long are each PTE?
4. More caches
Modern x86 computers use caches with writeback and write-allocate policies for main memory, but
pf2

Partial preview of the text

Download Computer Organization and Design - Study Guide Questions | ECE 411 and more Study notes Computer Architecture and Organization in PDF only on Docsity!

ECE411 Exam 1 Study Questions

1. ISA Classes Consider the high-level code: A = XY + XZ where A, X, and Y refer to locations in memory. Write the instructions needed to implement this operation for each of the following machines: a) stack-based b) accumulator-based c) register-memory based d) load-store based 2. Caches Consider a system with a 32-bit address space and a cache. The system has 128-byte cache lines and a capacity of 64 KB. Specify the bit lengths for the tag, set, and offset fields for each of the following cache implementations: a) a direct-mapped cache b) a two-way set-associative cache c) a four-way set-associative cache d) a fully-associative cache 3. Virtual Memory Consider a system with a 32-bit virtual address space, a 16-bit physical address space, and 2KB pages. a) How many bits long are each virtual page number? b) How many bits long are each physical page number? c) If the page table entries have valid, dirty, and PPN fields, how many bits long are each PTE? 4. More caches Modern x86 computers use caches with writeback and write-allocate policies for main memory, but

include support for "write combining" regions of memory. When a region of memory is marked as a candidate for write-combining, individual writes are buffered until an entire cache line is assembled (success), or until the buffer overflows (failure). When the write combining buffer succeeds the assembled cache line is placed into the cache without ever having been loaded from main memory, avoiding a bus transaction. This functionality is especially useful for graphics operations, such as clearing a framebuffer to all zeros, where loading the cache line from memory would be a waste, since it will be completely overwritten. Assuming a processor with 4MiB of cache, a 1MiB frame buffer that is initially not in the cache, a 128 bit DRAM interface, a 64 byte line size, and that the program clears the frame buffer using a 32 bit store instruction in a tight loop: A) How many DRAM transactions does it take to clear the frame buffer with a write-back cache? B) How many DRAM transactions does it take to clear the frame buffer with a write-through cache? C) How many DRAM transactions does it take to clear the frame buffer with a write-combining cache? D) Given that the hardware supports it, why might write combining not be used for all memory?

5. Even more caches A novice engineer is designing a microprocessor on paper, and asks you to review it. His design calls for a fully associative 1024 byte L1 cache split into 32 lines, and a 64KiB 4-way set associative L cache. His reasoning for this design is that he wants to minimize the L1 cache miss rate, while keeping his L2 cache from getting too complex given its large size. A) Given that the CPU is intended to have a fast clock rate what drawbacks does this design have? B) Is minimizing the L1 cache miss rate the correct design objective? If not what is? C) Can you suggest a better cache design for a high frequency microprocessor? 6. Virtual Memory again Below is the memory map of "grep" running on a 32 bit x86 Linux system. A) When none of the program is swapped out how many pages are consumed by user data, and how many are used by the 2-level page tables? B) Given a computer with 128MiB of RAM available how many instances of grep can run at the same time without swapping? C) Modify your answer to B to take into acount that the program and library data can be shared amongst all running copies. address-range protection segment size 08048000-08060000 rw-p /bin/grep 0x 08060000-08081000 rw-p [heap] 0x f7d00000-f7ffe000 rw-p [libraries] 0x2fe ffab5000-ffaca000 rw-p [stack] 0x