FOR FREE CONTENT

Question 3:

 

Consider the system which has Logical Address Space 128MB and Physical Address Space 64MB. Memory is byte-addressable where memory is divided into 4KB frames. Now calculate the number of pages in Logical Address Space and Page Table Size.

 

You should know:

Before seeing the solution please follow Calculation of offset for logical and physical address, Calculation of logical address bit and number of pages, Calculation of physical address bit and number of frames, Calculation of page table size. 

 

Solution:

 

Given data

Logical Address Space (LAS) = 128MB = 227Physical Address Space (PAS) = 64MB = 226

And the number of frames in PAS = 4KB = 212.

 

Number of pages:

Number of pages = LAS / Page size

So, first, we have to calculate page size.

Now number of frames in PAS = 4KB = 212 is given

So, the number of bits required for frame number at Physical Address (PA) = 12 bits.

And Physical Address Space (PAS) = 64MB = 226 is given

So, number of bits required for Physical Address (PA) = 26 bits

 

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

 

 

So, offset = PA – frame number = 26 – 8 = 18 bits

Now, if offset is 18 bits then page size = frame sizes = 218

And LAS = 128MB = 227 is given.

 

So, 

 

Page Table Size:

Page Table Size (PTS) = Number of pages × Page size

 

But page entry is not given here and as we know if page entry is not given then we take frame number (number of bits for frame number) as page entry. 

 

Now frame number = 8 bits already calculated