1,191 views
0 votes
0 votes
If no resource is free then:

a) Both Spin lock and mutexes will keep on spinning on the blocked variable

b) Both Spin lock and mutexes will go to sleep and check the variable periodically.

c) Spin lock will keep on spinning on the blocked variable while mutexes will go to sleep and check the variable periodically.

d) Mutexes will keep on spinning on the blocked variable while Spin lock will go to sleep and check the variable periodically.

1 Answer

0 votes
0 votes
option C)

Spin-lock is nothing but infinite loop ...so our program will be busy waiting.

Mutexes are binary semaphores,which when finds the semaphore is taken by some other process,will go to sleep in the waiting queue.once a process comesout of critical section,it will wakeup the first process in the waiting queue(assuming wait queue is a FIFO queue).

Related questions

0 votes
0 votes
2 answers
1
ajit asked Sep 10, 2015
5,064 views
https://gateoverflow.in/?qa=blob&qa_blobid=10456887729102921117
3 votes
3 votes
2 answers
3
Nils asked May 25, 2016
2,411 views
Which of the following is true/false Explain it.1) TSL solution method is deadlock free.2)TSL solution method is starvation free.3)TSL solution method process enter into...