Sunday, 24 April 2011

Alogithm Growreg for changing the size of a Region

Alogithm   Growreg  for   changing   the   size  of   a   Region


algorith   growred  /*  change   the   size   of   a   region  */
input : (1) pointer    to  per   process  region   table   entry 
(2)  change   in   size   of  region (man   be   positive   or   negative)
output:   none
{
if(region   size   increasing)
{e
check  legality  of  new  region  size ;
allocate   auxiliary   tables(page   tables);
if(not   system  supporting  demand   paging)
{
allocate   physical   memory ;
initialize  auxiliary  tables , as  necessary ;
}
}
else  /*  region   size  decreasing */
{
free  physical  memory ,  as  appropriate ;
free  auxiliary  tables ,  as  necessary ;
}

do (othere) initialization  of  auxialiary  tables  ,  as   necessary ;
set   size  field   in  process  table;
}

No comments: