OYO interview question

Detect DeadLock in operating system