计算机架构代写|ECE 2500 Test III

本次美国作业是一个计算机架构代写相关的限时测试

Consider a memory design where the virtual address space is partitioned into four virtual pages (i.e., each page table has four entries). Assume that the physical memory can hold at most two physical pages at any time (in physical page numbers 0 and 1; physical page numbers greater than 1 refer to disk). The design uses a fully-associative placement scheme with LRU replacement and write-back policy for the pages. The “reference” field in the page table below gives the most recent time a particular page was used.

Suppose at time t=5, the page table has the following information.

(a) Suppose the processor wants to read from virtual page # 2 at time t=6. Will there be a page fault? If not, why? If yes, which existing virtual page will be replaced and why?

(b) After the above operation in (a), suppose the processor wants to write to virtual page # 1 next at time t=7. Will there be a page fault? If not, why? If yes, which existing page will be replaced in physical memory and why?

(c) Fill in the page table to reflect how it would look after completing (a) and (b) above.

Write “unknown” if not enough information is available or “X” if the answer is don’t care.

Explain the role of the Translation-Lookaside Buffer (TLB) in a memory hierarchy.

Specifically, describe (a) what does the TLB store; (b) the need for having a TLB; (c) where is the TLB typically located in a computer (memory, on the processor, disk); and (d) what do TLB hits and misses indicate?

(a) Explain briefly, why increasing the associativity of a cache (while keeping the cache and block size the same) would increase the hit rate. (8 points)

(b) Why is a fully-associative scheme preferred over direct mapped placement scheme in placing pages in the main memory? (8 points)

(c) Write the number of tag comparisons required to determine a cache hit for each of the cache designs given below: (4 points)

• 8-way set associative cache with 2 words per block
• Fully associative cache with a total of 4 blocks and 4 words per block