i have some quastion iam struggling to answer it ..
i have 4 procces
condition :
1)evry process can run by himself
2)procces p1&p3 can run togther in the critical section
and p2,p4 can run togther in the critical section
now the quastion says that this solution isnt right..and show how the run of this code will not give answer the right conditions
first i thought its a deadlock. and keep thinking but got confused
but then i totaly got confused.
the second quastion show me how with 1 binary semaphore we can solve this conditions
iam sure that is some kind of a dead lock case like
p1 holding s1
and p2 holding s2
and now p1 waits for for s2 to realsed
and p2 wait for s3 and p3 holds p3 and so on..
there is some way that p1 and p2 can run togther?! or p1 and p4?