9
I recently came across this interview question (posted in a forum somehwere... looks like this was a real interview question):
Design a class which provides a lock only if there are no possible deadlocks.
No other information is given. I am not quite sure how to interpret this. Assuming pthreads model, is the interviewer looking for a lock manager class? Any ideas will help.