1,473 views
0 0 votes
What is the significance of infinite loop that is written in every example of process synchronisation?

What would happen if there wasn't any infinite loop?

1 Answer

Best answer
3 3 votes

$to\ check\ synchronization\ between\ processes\ have\ to\ consider\ few\ points$

  • mutual exclusion
  • bounded wait
  • progress

$\ to\ check\ this\ have\ to\ execute\ code\ number\ of\ times\ but\ few\ programs\ give\ correct\ result\\$

$certain\ amount\ of\ times.\ In\ terms\ of\ mathematics, it\ is\ similar\ to\ finding\ a\ counter\ example.\\$

$to\ use\ infinite\ loop\ we\ try\ to\ find\ more\ accurate\ code\ for\ concurrency\\$

$It\ would\ need\ a\ significant\ amount\ more\ in-depth\ understanding\ of\ the\ situation\ to\\$

$determine\ why\ an\ infinite\ loop\ was\ selected\ in\ a\ certain\ situation.$

• selected by
Position:
Show:

Related questions

0 0 votes
4 4 answers
1.8k
1.8k views
NIKU asked Oct 28, 2017
1,753 views
Consider the below program as two concurrent processes:Semaphore x:= 0;P1: repeat forever P2: repeat forever1.V(x); ...
0 0 votes
1 1 answer
884
884 views
NIKU asked Oct 28, 2017
884 views
11. Consider the following program:Const int n= 10int Count= 0Void A( ){ int i;for(i= 1 to n)Count= Count + 1;}Main ( ){Par beginA( );A( );A( );A( );Par end}What is the m...
3 3 votes
4 4 answers
2.9k
2.9k views
NIKU asked Oct 26, 2017
2,928 views
Consider the below Algorithm:P0: Process= 0 P1: Process= 1other= 1-Process ...
3 3 votes
2 answers 2 answers
2.7k
2.7k views
NIKU asked Oct 26, 2017
2,667 views
Consider the below Algorithm where flag and lock are global variables:P0: P1:while (fla...