1,507 views
0 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 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).
Position:
Show:

Related questions

0 0 votes
2 2 answers
5.7k
5.7k views
ajit asked Sep 10, 2015
5,748 views
https://gateoverflow.in/?qa=blob&qa_blobid=10456887729102921117
3 3 votes
1 1 answer
261
261 views
GO Classes asked Jul 25
261 views
Consider the following entry and exit code used by two processes:$\texttt{while(lock);}$$\texttt{lock = TRUE;}$$\texttt{Critical Section}$$\texttt{lock = FALSE;}$Initiall...
0 0 votes
0 0 answers
1.8k
1.8k views
garvit_vijai asked Sep 20, 2018
1,840 views
In case of TSL we are aware of the following instructions: 1. TSL LOCK, Ro 2. CMP Ro, #0 3. JNZ step1 Now, the initial value of LOCK is 0 If process Po...
3 3 votes
2 answers 2 answers
3.1k
3.1k views
Nils asked May 25, 2016
3,075 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...