646 views

1 Answer

0 votes
0 votes
Yes there is spin lock which is kind of deadlock .. it occur due to priority inversion problem .

1. TSL lock R( load lock R ,store #1 ,lock )

2. cmp R ,#0

3 critical section

4 exit section (release lock)

suppose there is 2 process p1 and p2 intial R =0 and for now line 1 is exected by process p1 and it enter into critical section  .now p2 comes which is high priority than p1 so p1 is preempted and go in ready queue and p2 execute the line 1 and 2 but lock R is not 0 . so it will be in busy waiting until it get critical section so we cant preempt it and p1 is in queue so it could not release the lock . and fall in deadlock .

Related questions

0 votes
0 votes
0 answers
1
sh!va asked Dec 28, 2016
914 views
I told thatIn digital computers, complements are used for simplifying subtraction operation and logical manipulation.Give an example of logical manipulation where complem...