COMP2120 Computer Organization Assignment 3

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

Department of Computer Science

COMP2120 Computer Organization

Assignment 3

Due Date: 11pm April 14, 2025.

1. 2-way Set Associative Cache Memory

Consider a hypothetical machine with 1K words of cache memory. They are in two-way set associative organization, with cache block size of 128 words, using LRU replacement algorithm. Suppose the cache hit time is 10ns, the time to transfer the first word from main memory to cache is 60ns, while subsequent words require 12ns/word.

Consider the following read pattern (in blocks of 128 words, and block id starts from 0):

1 2 3 5 6 2 3 4 9 10 11 6 3 6 1 7 8 4 5 9 11 1 2 4 5 12 13 14 15

13 14

and assume each block contains an average of 48 references.

(a) What is the cache miss penalty (i.e., time to transfer one block of data from main memory to cache memory)?

(b) Write down the content of the cache memory (for all the blocks) at the end of the memory references, assuming that the cache is empty at the beginning.

(c) Write down the number of cache misses (the first reading of a block is also considered a miss), and the cache hit rate.

(d) Calculate the average memory access time.

2. Direct-Mapped Cache Memory

Redo Question 1 if the cache size is the same, but in direct-mapped organization, and the cache hit time is 9ns instead.

3. Hard Disks access

Consider a Hard Disk with an average seek time of 12ms and rotation speed of 7200rpm, and an average number of 500 sectors per track. Assume negligible transfer time.

(a) What is the average rotation latency?

(b) What is the average time to rotate for 1 sector?

(c) Consider the access of 5 sectors. Caculate the time required (ignoring tranfer time, but including rotation time for reading a sector) if

(i) The sectors are consecutive in the same track.

(ii) The sectors are scattered in various places in the HDD.

发表评论

电子邮件地址不会被公开。 必填项已用*标注