Download presentation
Presentation is loading. Please wait.
Published byJune Hicks Modified over 9 years ago
1
Debugging In a Multi- Threads Program
2
Contents 1 2 3 4 Advantages Of Multithreaded Programs Characteristics Of Sequential and Multithreaded Programs Why More Bugs And How to Prevent them How To Debug
3
1 Advantages Of Multithreaded Programs
4
Raise clock rate? “parallelism” ILP, Instruction Level Parallelism TLP, Thread Level Parallelism
5
2 Characteristics Of Sequential and Multithreaded Programs
6
Comparison
7
Sample Behavior is nondeterministic
8
3 Why More Bugs And How to Prevent them
9
Where Is Bug 1 2 3 4 “ Out-Of-Order ”
10
Out-Of-Order sleep() Latch CyclicBarrier CountDownLatch latch = new CountDownLatch(3); countDown() await() CyclicBarrier cyclicBarrier = new CyclicBarrier(3); cyclicBarrier.await(); Producer-Consumer Mode wait() 、 notify() 、 notifyAll()
11
Where Is Bug 1 2 3 4 Synchronization
12
Shared Memory Model Easy to understand Memory coherence is managed by the operating system
13
Synchronization synchronized Destroy parallelism
14
Where Is Bug 1 2 3 4 Deadlock Other
15
4 How To Debug
16
1 breakpoint 2 3 logJPDA JDI ENTER TEXT
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.