logo

Address Calculation in Memory

   

Added on  2023-04-10

3 Pages962 Words107 Views
Q1.
a. Number of blocks in main memory = 2 ^ 64 / 2 ^ 6 = 2 ^ 58 blocks
b. Byte Offset size bit = Log264 = 6 bits
Block Size Bits = Log22048 = 11 Bits
Tag Field Bits = 64 – 6 -11 = 47 Bits
c. 0x0000 0000 0001 63FA
Binary of LSB 5 hex digits is 0001 0110 0011 1111 1010
Block bits are = 101 1000 1111 = 0x58F block number
Q2.
a. Blocks of main memory = 2 ^ 24 / 2 ^ 6 = 2^ 18 blocks
b. Byte Offset = 6 bits; Tag bits = 24 – 6 = 18 bits
c. In a fully associative Cache the block can map to any of the available slots that may be empty
Q3.
a. Offset = 2 bits ; Set = Log (64 / 2) = Log32 = 5 bits ; Tag field = 21 – 5-2 = 14 bits
b. Offset = 2 bits ; Set = Log (64 / 4) = Log16 = 4 bits ; Tag field = 21 – 4 - 2 = 15 bits
Q4.
a. Pages in virtual memory = 2 ^ 20 / 2 ^ 8 = 2 ^ 12 pages
b. Pages in Main memory = 2 ^ 16 / 2 ^ 8 = 2 ^ 8 pages
c. Page table entries = Number of Pages in virtual memory = 2 ^ 12 entries.
Q5.
a. TLB hit time= TLB access time = 7 ns
Cache hit time = TLB hit rate * TLB access time +
TLB miss rate * (TLB access time + Cache hit time)
= .95 * 7ns + .05 * (7+15)= 7.75 ns
b) EAT for TLB hit = TLB hit rate * (TLB access time + Cache hit rate * cache access time + cache miss rate
* (cache + main memory access time) )
+ TLB miss rate * (TLB access time + main memory access time + cache hit rate * cache
access time + cache miss rate (cache + main memory access time))
= .95 *( 7 + (.97*15) + .03(15+30))+ .05*(7+30+(.97*15) + .03 ( 15 + 30))=24.4 ns
Q6.
a. Virtual Address bits = Log32M = 25 bits
b. Physical Address bits = Log 4M = 22 bits
c. Maximum page Table entries = 2 ^ 25 / 2 ^ 11 = 2 ^ 14 page entries
d. 0x37F is address on Virtual Page 0. It is in Page frame 1 of Physical memory
e. 0x1203 is on Page Frame 2 of physical memory. Address from Virtual Page 4 0x2203 will map
here.

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Understanding Operating Systems: Memory Management and TLB in a Nutshell
|7
|870
|248

a. Direct Mapped Cache Addres_format: // (tag, line, wo
|2
|449
|49

Solution:. 1. A CPU has 6 bits physical address and gen
|4
|299
|39

Computer Architecture Assignment: Binary Addresses
|2
|305
|134

Operating System - Desklib
|7
|544
|268

Computer Architecture Basics Material | Solution
|4
|660
|26