Numerical Related to Logical and Physical Address

Q1. Consider a logical address space of 2 pages or 1024 words. Each mapped onto a physical address than how many bits are in logical address.

Ans. 1. For logical address

Number of pages = size of logical address/size of page

  • 2 = 2m/1024
  • 2 = 2m/210
  • 2 = 2m-10
  • 1 = m โ€“ 10
  • m = 1 + 10
  • m = 11 bits

 

  1. For physical address

Number of frames = size of physical address/size of frame

  • 32 = 25

So,

  • 32 = 2m/1024
  • 32 = 2m/210
  • 25 = 2m-10
  • 5 = m โ€“ 10
  • m = 5 + 10
  • m = 15

 

Page 0
Page 1
Page 2
Page 3

Logical Address

 

 

Frame Number

0 1
1 4
2 3
3 7

Page Table

 

Frame Number

0
1 Page 0
2
3 Page 2
4 Page 1
5
6
7 Page 3

Physical Memory

When we use paging scheme, we have no external fragmentation because any free frame can be allocated to a process that needs it.

 

Leave a Reply

Your email address will not be published. Required fields are marked *