In general the following requirements for a deadlock can be identified:
- Mutual exclusion: There is a resource which can be accessed only by one thread at any point in time.
- Resource holding: While having locked one resource, the thread tries to acquire another lock on some other exclusive resource.
- No preemption: There is no mechanism, which frees the resource if one thread holds the lock for a specific period of time.
- Circular wait: During runtime a constellation occurs in which two (or more) threads are each waiting on the other thread to free a resource that it has locked.
No comments:
Post a Comment