answersLogoWhite

0

Recursive locks (also called recursive thread

mutex) are those that allow a thread to recursively acquire the same lock that it is

holding. Note that this behavior is different from a normal lock. In the normal case if

a thread that is already holding a normal lock attempts to acquire the same lock again,

then it will deadlock. Recursive locks behave exactly like normal locks when another

thread tries to acquire a lock that is already being held. Note that the recursive lock is

said to be released if and only if the number of times it has been acquired match the

number of times it has been released by the owner thread. Many operating systems do

not provide these recursive locks natively. Hence, it is necessary to emulate the

behavior using primitive features like mutexes (locks) and condition variables.

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

RossRoss
Every question is just a happy little opportunity.
Chat with Ross
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: What are recursive locks?
Write your answer...
Submit
Still have questions?
magnify glass
imp