3,371 views
0 votes
0 votes

How the processes are removed from the Semaphore suspended queue?Is it implementation dependent or is it FIFO always?If not FIFO then how starvation will be handled.I got this doubt while reading following paragraph from williams stallings Chapter -5[Concurrency]

The question arises of the order in which processes are removed from such a queue. The fairest removal policy is
first-in-first-out (FIFO): The process that has been blocked the longest is released
from the queue first; a semaphore whose definition includes this policy is called
a strong semaphore . A semaphore that does not specify the order in which processes
are removed from the queue is a weak semaphore

Where will this definiton fits if we use some other scheduling algorithm rather than FIFO?Says if I use Priority based/SJf..etc ,then it will neither be strong semaphore nor weak semaphore?#

Please clarify 

1 Answer

0 votes
0 votes
as far as i know,any random process can be waked up from the suspended list.FIFO is not used.hence,starvation can occur

Related questions

0 votes
0 votes
0 answers
2