FOR FREE MATERIALS

Calculation of Physical address bit and number of frames

 

Calculation of the number of bits required for Physical Address:

 

  • # Physical Address Space (PAS) =Size of main memory.
  • # Physical Address Space (PAS) is divided into an equal number of frames.
  • Page size = frame size which is always a power of 2.

 

Let Physical Address Space (PAS)P bytes 

 

 

Example:

 

PAS = 256 KB = 218 Byte then,

 

So, number of bits requirement for physical address = 18 bits

 

Physical address contains two parts:  frame number and Offset

 

Calculation of the number of frames in Physical Address space:

 

PAS (Main memory size) = P bytes = 2x  bytes (Take it as a power of 2)

Frame size = F bytes = 2y bytes (Take it as a power of 2)

 

And the number of bits for frame number in PAS = x-y

 

Example:

 

PAS = 64 MB = 226 bytes and page size = frame size = 16KB = 214 bytes 

Number of bits required for frame number in PAS = 12

 

What we know from above

 

And  

 

 

So, the number of bits required for frame number in PAS = x - y bits = k bits.

 

We can also calculate page offset directly because we consider Frame size P bytes = 2y bytes

 

So, frame offset = y bits

 

So, here m - k bits = y bits