430 views

1 Answer

1 votes
1 votes
in following sequence process will be in deadlock ..

p : 1| Q: 1| R:1|S:1(Block)|P:2(Block)| Q:2(block)|R: 2(block) here 1,2 are line no of process which is executed and vertical line is for preemption

P,Q,R execute line no 1 . but s is block becoz it request for the A which is hold by P , then if P execute lin2  req for B which hold by R,so it will be blocked , Q executed line no 2 it block bcoz it request for the A . which not released .similar R req for C which is hold byQ. so there is hold and wait or cycle . so there is deadlock .

there is not always deadlock . in these seq there no deadlock P:1 2 3| Q: 1 2 3| P: 4 | R 1 2| S 1 | R 3 4| S 2 3 4 .. you can do also for other sequence .

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
1 answer
2
1 votes
1 votes
1 answer
3
kallu singh asked Jan 16, 2018
161 views
0 votes
0 votes
1 answer
4
kallu singh asked Dec 13, 2017
283 views