Madula posted an Question
April 28, 2022 • 22:16 pm 30 points
  • UGC NET
  • Computer Science & Applications

Explain about process synchronization turn flag wait signal difference in os

explain about process synchronization turn flag wait signal difference in os

1 Answer(s) Answer Now
  • 0 Likes
  • 1 Comments
  • 0 Shares
  • Aparna 1 best-answer

    In process synchronization, Flag[ ] array of size N that is false by default Therefore, the flag of a process needs to be set true, whenever it wants to enter the critical section. A variable TURN tells the process number waiting to enter the Critical section. When a process enters the Critical Section, it changes the TURN to another number from the list of ready processes when it is existing. Whenever a process requires to enter in the critical section it has to set it's flag as true. Eg. - If Pi wants to enter it will set. FLAG[i] = TRUE TURN The variable is used to indicate the process number that is currently waiting to enter into the critical section. The process that enters into the critical section while exiting would change the TURN to another number from the list of processes that are ready. Eg :- If the tuen is 3 then P3 enter into Critical S section & while exiting then turn=4 and therefore P4 breaks out of the loop.

whatsapp-btn

Do You Want Better RANK in Your Exam?

Start Your Preparations with Eduncle’s FREE Study Material

  • Updated Syllabus, Paper Pattern & Full Exam Details
  • Sample Theory of Most Important Topic
  • Model Test Paper with Detailed Solutions
  • Last 5 Years Question Papers & Answers