Critical - Section Problem

Critical - Section  Problem :

      Critical - Section  Problem  is  an  segment of  a  code  in  which  a  process   may  be

  • changing  common  variables
  • Upating  a  table  or
  • Writing  a  file.

General   Structure  of  a  typical process :

               do   {

                               entry  section

                                      critical  section

                                exit    section

                                        remainder  section

                         }  while  (true);

  1.   Entry - Section :  It  requests  permission  to  enter   the  critical -section.
  2.   Critical - Section : Mutually  exclusive  in  time  which  is  having  no  other  process  can  execute  in  its  critical -  Section.
  3.   Exit -  Section  :  It  follows  the   critical - Section.
  4.   Remainder -  Section  :  It  ensures  the   one  process  is  executing  in its  critical -  Section.

Solutions  for  the  Critical -  Section  that  it  must  satisfy  the  3  requirements  :  

  1.  Mutual  Exclusion :  This  is  only  one  process can  be  in its  critical-section.
  2.  Progress  :  The  only  processes  that  are  not  in  their  remainder-section  can  enter  their  critical-section.
  3.  Bounded  Waiting :   There  must  be  a  bound  on  the  nummber  of  times  that  other  processes  are  allowed  to  enter  their  critical-section  after  the  process has  made   a  request  to  enter  its  critical-section  and  before  the  request   is  granted.

      ​   

            

Posted on by