Timeline for Resource/Thread Allocation and Deadlock
Current License: CC BY-SA 3.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 2, 2012 at 20:14 | history | migrated | from stackoverflow.com (revisions) | ||
| May 1, 2012 at 17:48 | vote | accept | CommunityBot | ||
| May 1, 2012 at 17:45 | answer | added | Karim Garram | timeline score: 1 | |
| May 1, 2012 at 17:37 | comment | added | Gray | Cool. I've added an answer as a summary. | |
| May 1, 2012 at 17:35 | comment | added | TimeBomb006 | Thank you for your help. It clarified my understand of thread allocation and deadlocks. | |
| May 1, 2012 at 17:35 | answer | added | Gray | timeline score: 1 | |
| May 1, 2012 at 17:33 | comment | added | Gray | Yes, you are correct. This is not deadlock because T1 can still operate. When it is done it will unlock R3 and T2 will get it. It will unlock R1 and T3 will get it. | |
| May 1, 2012 at 17:31 | comment | added | TimeBomb006 | So, some other students are arguing that it is a deadlock. I disagree. Based on my clarification of deadlock and this example, would I be correct? | |
| May 1, 2012 at 17:30 | comment | added | Gray | Yes, that's exactly right. Deadlocks are all about multiple locks and lock order. | |
| May 1, 2012 at 17:28 | comment | added | TimeBomb006 | Here is a basic example that would demonstrate a deadlock: T1 requests R1. T2 requests R2. T1 requests R2. T2 requests R1. This would create a cycle in which each thread indefinitely waits for another thread to release a resource. And yes, you are correct in your assumption. The Rs and Ts operate independently, they are just arbitrary threads/resources. | |
| May 1, 2012 at 17:28 | comment | added | Gray | Btw, I assume that the Rs and Ts aren't somehow connected, right? It could be R4, R5, R6 instead of the same numbers as T1-3, right? | |
| May 1, 2012 at 17:24 | answer | added | Karim Garram | timeline score: 0 | |
| May 1, 2012 at 17:23 | comment | added | Gray | I'm not sure what you mean by cycle but you are correct about waiting for resources versus a deadlock. So what would an example me of a deadlock using the resources? | |
| May 1, 2012 at 17:22 | answer | added | Darren | timeline score: 1 | |
| May 1, 2012 at 17:21 | comment | added | TimeBomb006 | I think that deadlock occurs only when there is a cycle in the graph. However, I don't see any cycles in it. I know that some threads are waiting for others to free up resources, but that shouldn't create a deadlock--if my assumptions are correct. | |
| May 1, 2012 at 17:17 | comment | added | Gray | Why do you think there is no deadlock? Can you expand on that? What would an example of deadlock be? | |
| May 1, 2012 at 17:14 | history | asked | TimeBomb006 | CC BY-SA 3.0 |