dreadlocks – deadlock detection in linux

1
Dreadlocks – Deadlock Detection in Linux Supervisor: Dimitri Perelman y: Dan Slov & Gal Nave Networked Software La Problem definition: Deadlock is a specific condition when two or more processes (or threads) are each waiting for each other to release a resource, thus forming a circular chain. Project goals: Supply support for successful debugging Implement M.Herlihy and E.Koskinen “Dreadlocks” algorithm in Linux. Evaluate the performance overhead implied by the solution What is Digest? Each thread has a list of processes/threads, it is waiting for in order to acquire a mutex lock . This list is called a digest Deadlock Detection – how it gets done: Thread trying to acquire mutex that is already locked checks the owner’s digest for its TID and if it is found there – DEADLOCK. Digest of A:{B} Digest of B:{A} New lock algorithm : Try to lock a mutex Taken? Acquire it try to detect a deadlock Deadloc k? alert the user no ye s ye s no

Upload: debra-baldwin

Post on 02-Jan-2016

38 views

Category:

Documents


2 download

DESCRIPTION

Networked Software Lab. Dreadlocks – Deadlock Detection in Linux. Problem definition: Deadlock is a specific condition when two or more processes (or threads) are each waiting for each other to release a resource, thus forming a circular chain. Project g oals: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Dreadlocks – Deadlock Detection in Linux

Dreadlocks – Deadlock Detection in Linux

Supervisor: Dimitri Perelman

By: Dan Slov & Gal Nave

Networked Software Lab

Problem definition:

Deadlock is a specific condition when two or more processes (or threads) are each waiting for each other to release a resource, thus forming a circular chain.

Project goals:• Supply support for successful debugging

•Implement M.Herlihy and E.Koskinen “Dreadlocks” algorithm in Linux.

• Evaluate the performance overhead implied by the solution

What is Digest?Each thread has a list of processes/threads, it is waiting for in order to acquire a mutex lock . This list is called a digest

Deadlock Detection – how it gets done: Thread trying to acquire mutex that is

already locked checks the owner’s digest for its TID and if it is found there – DEADLOCK.

Digest of A:{B}

Digest of B:{A}

New lock algorithm :

Try to lock a mutex

Taken?

Acquire it

try to detect a deadlock

Deadlock?

alert the userno

yes

yes

no