Question: Q4: Explain the following algorithm for a two process critical section. Also check if it is a good solution or not. Explain your answer in

Q4: Explain the following algorithm for a two process critical section. Also check if it is a good solution or not. Explain your answer in each case. Process Pi do { flag[i] = true; turn =j; while (flag[j] && turn == j) ; Critical section flag[i] = false; Remainder section } while (1); Q5: Multiple processes can exchange using message-passing techniques. How it work? Support your example using Linux system calls. Q6: Let say we have a single queued memory and we have to implement multiprogramming with fixed task. In class we discussed different algorithms to adjust the process in fixed partitioned memory. Discuss each with the help to example. Also give a situation for each, where they can be used efficiently
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
