*
If a thread goes to sleep
a. It releases all the locks it has.
b. releases all of its lock except one.
c. It releases half bf its locks.
d. It does not release any locks.
Answers
Answer:
Ans- a. it releases all the loks it has .
Explanation:
If it helps you then please mark me brainliest and follow me
Answer:
Correct option A.
(A) It releases all the locks it has If a thread goes to sleep.
Explanation:
It releases all the locks it has If a thread goes to sleep. It doesn't open any locks. One important distinction that has yet to be mentioned is that while sleeping, a Thread does not release the locks it holds, whereas waiting releases the lock on the object on which wait() is called. Waiting only releases the lock on the object on which wait() is called. It does not open any other locks. Thread. sleep suspends execution of the current thread for a specified amount of time. This is a quick way to make processor time available to other threads of an application or other applications running on a computer system.