Course Solutions Uncategorized (Solved) : 2 Sample Exam Question 4 Processes Executing Concurrently Process Po Infinite Loop Increme Q26864566 . . . .

(Solved) : 2 Sample Exam Question 4 Processes Executing Concurrently Process Po Infinite Loop Increme Q26864566 . . . .

 

2· //same as a sample exam question There are 4 processes, executing concurrently. Process PO is in an infinite loop, incrementing the value of the variable x (x is initialized to 0). Pois the only process that changes the value of x The rest of the processes Pi (1<-i<-3) monitor the value of x. Whenever x reaches a value such that it is divisible by i, Pi prints the value of x. For example, P3 will print the sequence 3 6 9 1 2 as the value of x reaches 3, 6, 9, 12 and so on Write the code for all the 4 processes using semaphores. Note that P1 - P3 should be identical; also Pi determines whether x is to be printed, and this decision is not made by Po

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post