Segmentation

Segmentation:

  • Paging does not follow users  view of memory allocation 
  • To achieve users view of memory allocation ,the segmentation will be implemented
  • In the segmentation LAS will be divided in to various segments
  • Segments of LAS will  vary in the  size
  • Segments of LAS will be  brought in  to the PAS

 

s\rightarrowNo. of bits required to represents  the segments of  LAS or segment number

d\rightarrow No. of bits required to represents  the size of segments or word number of the segments or segment offset

  • Number of entries in segment table will  be  same  as number of segments in LAS

Ex .    d=210,L=200 then d<L 

210<200  trap to o.s

Ex .       d=190 L=200                       

190<200 then Base address+d=PAS  

  • The variable size segments are brought from LAS  to PAS so similarly behaving like variable partition scheme Hence segmentation still suffer from External fragmention

{\color{Red} Segmented Paging}

  • To avoid the overhead of bringing large size segments in to the memory ,the segmented paging will be implemented.
  • In the segmented paging ,paging will be applied  on  the segments and instead of bringing the entire segments in to the memory ,the pages of segments will be brought in to the memory

 

 

​Important points:

  • page size of segments is same as frame size of  PAS 
  • Number of entries in the page table of segments  is same as no. of pages on segments

Ques.Consider a system using segmented paging architecture.The segments is divided in to 1k pages and each page is having 512 entries.The segment number requires 17bits to repsents the segments in LAS and frame number requires 13 bits to represent the frame of PAS and memory is word addressable  and page table entry size is 2 words  .Then calculate:

  1. Length of LA
  2. Length of PA
  3. Page table size  of segment

Solution:

 

 

 

 

0Comment