A system has a main memory with 16 MB of addressable locations and a 32 KB of di
ID: 3711895 • Letter: A
Question
A system has a main memory with 16 MB of addressable locations and a 32 KB of direct-mapped cache with 8 bytes per block. The minimum addressable unit is 1 byte.
a) How many blocks are in cache?
b) What is the address breakdown for main memory?
---------------------------------
2)
Suppose that a virtual memory system has the following properties: 40-bit virtual byte-address
16 KB pages
32-bit physical address
TLB has 8-entries with fully associative structure
Valid, dirty, and use bits take a total of 3 bits (both TLB and page table have these bits)
Compute the following quantities:
a) Total size of TLB (in bits)
b) Total size of page table (in bits)
---------------
3)
Set-Associative: Parameters:
Main Memory: 1 GB
Block/line size: 64 Byte
Cache: 1 MB 8-way set-associative
Questions:
How many main memory blocks are there
How many cache lines are there?
How many cache lines per set are there?
How many cache sets are there?
How many blocks are map to a single cache set?
What is the address breakdown for cache?
4)
Fully Associative: Parameters:
• • •
Questions:
• • • •
Main Memory: 1 GB Block/line size: 64 Byte Cache: 1 MB fully associative
How many main memory blocks are there How many cache lines are there?
How many blocks map to a single cache line? What is the address breakdown for cache?
---------
5)
Cache design: Direct-Mapped Parameters:
Main memory: 1 GB
Block/line size: 64 Byte
Cache: 1 MB direct-mapped
Questions:
a) How many main memory blocks are there?
b) How many cache lines are there?
c) How many blocks map to a single cache line?
d) What is the address breakdown for cache?
Explanation / Answer
As per Chegg policy I am doing the first question. Please post the rest parts as separate question.
a) How many blocks are in cache?
cache is 8 bytes per block
Total size of cache is 32 KB i.e. 215 bytes per cache
(1 block / 23 bytes) x (215 bytes / cache) = 212 blocks / cache
So we have 212 blocks per cache available and we need 12 bits for indexing
b) What is the address breakdown for main memory?
We have 16 MB of addressable locations i.e.224 bytes. So to address it we need 24 bits.
We have 8 bytes per block i.e. 23 bytes. So we need 3 bits for that.
As solved in previous question we need 12 bits for index.
So memory breakdown is as follows
3 bits as offset, 12 bits for index and 9 bits for tag
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.