Question: In the following solution, L and len are data shared by process P 1 and P 2 . L:to hold some shared data by P

In the following solution, L and len are data shared by process P1 and P2.
L:to hold some shared data by P1 and P2; It is a list in this example
len: to indicate how many elements there are in L
semaphore s1=1;
semaphore s2=1;
shared list L;
Shared int len;
Code for p1
I1: P(s1);
L2: :,P(s2),,V(s1);V(s2)p2PV
I need answer apecific to a ,state whether it is correct or not
In the following solution, L and len are data

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!