Question: Consider the following rendezvous code: while (1) { select { when a==TRUE : accept A() { f1%; b=FALSE } when b==TRUE : accept B()

Consider the following rendezvous code: while (1) { select { when a==TRUE : accept A() { f1%; b=FALSE } when b==TRUE : accept B() { f2; a=FALSE } else { a=TRUE; b=TRUE } Assume that there are no outstanding calls to A or B when the select statement is executed for the first time. Thereafter, the following calls arrive in the given order: AO), B(), B(), AO, AO, BO (a) In which order will the calls be accepted (processed)? (b) Can caller of A (or B) starve?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
