FOR FREE MATERIALS

UGC NET 2017

 

Question:

A memory management has 64 pages with 512 byte page size. Physical memory consists of 32 page frames. What is the number of bits required in logical and physical address respectively?

 

A. 14 and 15

B. 14 and 29

C. 15 and 14

D. 16 and 32

 

Solution:

 

First, we should write what data which given in the question:

 

Given data:

Number of pages = 64 = 26, page size = 512 byte = 29 and number of frames in main memory or physical address space = 32 = 25

 

Now, as we know Logical Address Space (LAS) = Number of pages × Page size

So, number of bits required in Logical Address (LA) = 15 bits

 

Now we are calculating the number of bits in Physical Address (PA).

 

Number of bits in Physical Address (PA) = Frame number + Offset

 

Now, page size = 512 byte is given and as we know page size and frame size are always the same.

So, page size = frame size = 512 byte = 29

 

Now, we can say page offset = frame offset = 9 bits

 

We know the number of frames = 32 = 25.

 

So, we can say the number of bits required in frame number = 5 bit

 

Now, we elaborate the address fields of Physical Address (PA):

 

 

So, total bits required in Physical Address (PA) = Frame number + Offset = 5 bits + 9 bits = 14 bits

 

So, the number of bits in Logical Address (LA) = 15 bits, and the number of bits in Physical Address (PA) = 14 bits.

 

Option (C) is correct.