Deprecated: Implicit conversion from float-string "1632205821.210" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1632205821.210" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1632205821.210" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1632205821.210" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1632205821.210" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
Operating System: Synchronization mechanism doubt
836 views
1 votes
1 votes
I read that one of the disadvantage of busy waiting solution to synchronization is that PRIORITY INVERSION can occur in it.

My doubt is, does the priority inversion problem only occur in busy waiting solution or it can occur in without busy waiting solution too. Please explain. Thanks.

1 Answer

Best answer
2 votes
2 votes

yes you are talking abut non-busy waiting means of SEMAPHORE..yes problem of priority inversion occure here too...

say when you are using Binary semaphore ...now assume a process comes and do DOWN() on semaphore ....and enter into CS..but as same time a high priority process comes...

 if hight priority process leads low priority too preempt...then process inside CS will not do UP on semaphore and result is that no one can enter into CS....as logically low priority is still holding CS....hence priority inversion occure.....

but to cause PRIORITY INVERSION...PROCESS MUST BE PREEMPTED before executing UP() on mutex..

selected by

Related questions

475
views
1 answers
1 votes
pC asked Dec 11, 2015
475 views
Peterson's SolutionSWAP instructionStrict AlternationBoth 2 and 3
354
views
1 answers
0 votes
N3314nch41 asked Sep 10, 2023
354 views
How to approach synchronization (specifically semaphore) question, there size are really intimidating and i’m unable to decode the code written? What to do??