Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help answering these two questions. Could you please explain how to get t

ID: 3596180 • Letter: I

Question

I need help answering these two questions. Could you please explain how to get the answers for each question.

This problem concerns paging (no virtual memory) Assume a machine has a 30-bit logical address space and is byte-addressable. The physical address space is 31 bits and the page size is 1K bytes. Give the best answer to each of the following that you can. If you need to make additional assumptions to give an answer, state the assumptions you are making. If the answer is a power of 2, leave it in exponential form. a) How many frames of physical memory are possible? 1. b) How many bits of the logical address space are needed for the page number? c) How many bits of the logical address space are used for the page offset? d) How many bits of the physical address are used for the frame number? e) How many bits of the physical address are used for the frame offset? f) How many bits would be needed for a page table entry? g) How many bytes would be needed for a page table for one process? 2. This problem concerns memory address translation in a paging memory system. Suppose the TLB has an access time of 2 ns. and the main memory access time is 30 ns. Suppose the page size is 256 bytes, the logical address space is 32 bits, and the physical memory address space is 24 bits. The entire TLB and the beginning of the page table are given below. For each of the logical addresses given in binary below, find the corresponding page number estimate the time to access the memory location, and give the corresponding physical memory address. page table TLB page frame 9 3 4 6 a) ol110100010 b) 01001000101 c) 101101 10100 Logical Address Page Nmb a) 0111010001o b) 01001000101 c 10110110100 Access Tim Plhysical Address

Explanation / Answer

1. Since page in logical address space has to fit in frame in physical address space. So page size= frame size

a. Frame size = Page Size = 1 KB = 210 bytes

Since physical address space = 31 bit = 231 bytes space

Number of frames possible = 231 / 210 = 221

b. Since page size = 1 KB = 210 bytes

Page offset = log(210) = 10 bits

Number of bits for page = bits in logical address space - page offset bits = 30-10 = 20 bits

c. Page Size = 1 KB = 210 bytes

and since the memory is byte addressable.

So page offset in virtual memory = log(210) bits = 10 bits

d. Total bits in physical memory = 31 bits

Total number of frames = 221

So, number of bits in frame number = log(221) bits = 21

e. Since page size = frame size

number of bits for frame offset= number of bits for page offset = 10

f. Assuming each page table entry contain only page number and page offset

Total bits in page table entry= number of bits for page number+ number of bits for page offset = 20+10 =30

g.  

2. Since page size is 256 bytes, so if the memory is byte addressable,

then number of bits for page offset = log(256) = 8 bits

For each of the logical aaddress mentioned in a,b and c, total bits of logical address = 11 bits, which is less than the number of bits in physical memory space = 24 bits. So for all three cases physical address is same as logical address

a. For logical address 01110100010, last 8 bits corresponds to page offset and first three bit corresponds to page number. So (011)2 = 3 is the page number.

Since page number 3 is not in TLB, it will corresponds to miss case.

So access time = access time of TLB+main memory access time = 2 + 30 = 32 ns

Physical address = logical address = 01110100010

b. For logical address 01001000101, last 8 bit correspond to page offset, first 3 bit (010)2 = 2 is the page number

Since page number 2 is in TLB. So access time = 2 ns

Physical address = logical address = 01001000101

c. For logical address 10110110100, last 8 bit correspond to page offset, first 3 bit (101)2 = 5 is the page number

Since page number 5 is in TLB. So access time = 2 ns

Physical address = logical address = 10110110100

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote