1,150 views

1 Answer

0 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 .
Position:
Show:

Related questions

0 0 votes
0 0 answers
1.4k
1.4k views
sh!va asked Dec 28, 2016
1,387 views
I told thatIn digital computers, complements are used for simplifying subtraction operation and logical manipulation.Give an example of logical manipulation where complem...
1 1 vote
1 1 answer
1.2k
1.2k views
Mak Indus asked Oct 26, 2018
1,187 views
Consider the following foo function and identify the return value of foo function.int foo (unsigned int n){ int c, x = 0; while (n! = 0) ...
0 0 votes
1 1 answer
613
613 views
eyeamgj asked Jul 18, 2018
613 views
PLEASE FRAME AN EXAMPLE TO EXPLAIN THE CASES MENTIONED IN THIS The third major event that must be handled by the TCP sender is the arrival of anacknowledgment segment (...
0 0 votes
0 0 answers
178
178 views
TEJOPRAYUKTHA_DODDAP asked Jul 24, 2025
178 views
Can you please give content for ECE branch also? I am an ECE student and unable to go through my branch related content