CREATE OWN LIBRARY

Question 1:

 

Consider the system which has Physical Address Space (PAS) 1MB, the number of pages 1KB, and page size 2KB. Memory is byte-addressable then calculates Logical Address Space(LAS), page offset, 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

PAS = 1MB = 220, number of pages = 1KB = 210, page size = 2KB = 211

So, the number of bits required for Logical Address (PA) = 20 bits.

 

Logical Address Space (LAS):

As we know LAS (Process size) = Number of pages × Page size (here both are given)

And the number of bits required for Logical Address (LA) = 21 bits

 

Page offset:

Here we calculate easily the page offset because page size is given i.e page size = 2KB = 211.

So, Page offset = 11 bits

 

Page Table Size (PTS):

PTS = Number of pages X Page entry 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. 

 

So, we have to calculate the number of bits required for the frame number.

 

Now, PAS is given i.e. PAS = 1MB = 220 and page size is given i.e. page size = 2KB = 211.

And as we know page size and frame size are always the same so, page size = frame size 2KB = 211.

So, the number of bits requires for frame number in PAS = 9 bits

 

Then, Page Table Size (PTS)