Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Thread_A: Started.
- Thread_A: Let's see if a resource is available.
- Thread_A: Now I have a resource.
- Thread_A: Let's see if the second resource is also available.
- Thread_A: Now I have both resources and I can start working!
- Thread_B: Started.
- Thread_B: Let's see if a resource is available.
- Thread_A: My work is done, I will free my resources!
- Thread_A: I will now sleep for 8 seconds!
- Thread_B: Now I have a resource.
- Thread_B: Let's see if the second resource is also available.
- Thread_B: Now I have both resources and I can start working!
- Thread_A: Let's see if a resource is available.
- Thread_B: My work is done, I will free my resources!
- Thread_B: I will sleep now . I will be back in 8 seconds !
- Thread_A: Now I have a resource.
- Thread_A: Let's see if the second resource is also available.
- Thread_A: Now I have both resources and I can start working!
- Thread_B: Let's see if a resource is available.
- Thread_A: My work is done, I will free my resources!
- Thread_A: I will now sleep for 8 seconds!
- Thread_B: Now I have a resource.
- Thread_B: Let's see if the second resource is also available.
- Thread_B: Now I have both resources and I can start working!
- Thread_A: Let's see if a resource is available.
- Thread_B: My work is done, I will free my resources!
- Thread_B: I will sleep now . I will be back in 2 seconds !
- Thread_A: Now I have a resource.
- Thread_B: Let's see if a resource is available.
- Thread_B: Now I have a resource.
- Thread_A: Let's see if the second resource is also available.
- DEADLOCK: Both threads are waiting for a resource!
- THREAD_A-Thread canceled
- Thread_A: Started.
- Thread_A: Let's see if a resource is available.
- Thread_A: Now I have a resource.
- Thread_A: Let's see if the second resource is also available.
- Thread_B: Let's see if the second resource is also available.
- DEADLOCK: Both threads are waiting for a resource!
- THREAD_A-Thread canceled
- Thread_B: Now I have both resources and I can start working!
- Thread_A: Started.
- Thread_A: Let's see if a resource is available.
- Thread_B: My work is done, I will free my resources!
- Thread_B: I will sleep now . I will be back in 8 seconds !
- Thread_A: Now I have a resource.
- Thread_A: Let's see if the second resource is also available.
- Thread_A: Now I have both resources and I can start working!
- Thread_B: Let's see if a resource is available.
- Thread_A: My work is done, I will free my resources!
- Thread_A: I will now sleep for 8 seconds!
- Thread_B: Now I have a resource.
- Thread_B: Let's see if the second resource is also available.
- Thread_B: Now I have both resources and I can start working!
- Thread_A: Let's see if a resource is available.
- Thread_B: My work is done, I will free my resources!
- Thread_B: I will sleep now . I will be back in 2 seconds !
- Thread_A: Now I have a resource.
- Thread_B: Let's see if a resource is available.
- Thread_B: Now I have a resource.
- Thread_A: Let's see if the second resource is also available.
- Thread_B: Let's see if the second resource is also available.
- DEADLOCK: Both threads are waiting for a resource!
- --> THREAD_B-Thread canceled
- Thread_A: Now I have both resources and I can start working!
- --> Thread_A: Started.
- Thread_A: Let's see if a resource is available.
- Thread_A: My work is done, I will free my resources!
- Thread_A: I will now sleep for 8 seconds!
- Thread_A: Now I have a resource.
- DEADLOCK: Both threads are waiting for a resource!
- Thread_A: Let's see if the second resource is also available.
- Thread_A: Now I have both resources and I can start working!
- THREAD_A-Thread canceled
- Thread_A: Started.
- Thread_A: Let's see if a resource is available.
- Thread_A: Now I have a resource.
- Thread_A: Let's see if the second resource is also available.
- ^C ===> ABORT <===
- THREAD_A-Thread canceled
- THREAD_B-Thread canceled
Advertisement
Add Comment
Please, Sign In to add comment