Difference between revisions of "GPU621/Sentinel"
(Added the project outline) |
(Added the introduction, multithreaded debugging challenges, list of VS Tools (description and screenshots of the tools to be added at a later date)) |
||
Line 8: | Line 8: | ||
== Introduction == | == Introduction == | ||
− | + | === Multithreaded applications debugging overview === | |
− | + | Debugging is one of the crucial software development stages. While all of us know the importance and the basics of debugging in the Visual Studio, debugging the multithreaded applications is more complicated than that of the serial programs we were used to before. The first problem of the multithreaded debugging is keeping track of multiple threads instead of just one as we did with the serial programs. Secondly, having multiple threads introduces new kinds of bugs and issues that can seriously affect the output of the software. Such issues include race conditions and deadlocks. A race condition is the behavior of the system when the output is dependent on the sequence of other events or commands. It becomes a bug when the events are out of order ([https://en.wikipedia.org/wiki/Race_condition Race condition wiki]). Deadlock is a situation when each member of the group (a group of threads in our case) is waiting for some other member to take action, it typically happens when mutual exclusion is executed incorrectly, and the lock on the resource cannot be released ([https://en.wikipedia.org/wiki/Deadlock Deadlock wiki]). | |
− | + | ||
+ | === Visual Studio tools for multithreaded debugging === | ||
+ | Visual Studio provides the developers with a variety of tools to assist with the multithreaded application debugging based on the specifics of the implementation: | ||
+ | * Threads | ||
+ | ** Threads window | ||
+ | ** Thread markers | ||
+ | ** Parallel Stacks window | ||
+ | ** Parallel Watch window | ||
+ | ** Debug Location toolbar | ||
+ | * Task parallelism | ||
+ | ** Parallel Stacks window (discussed above) | ||
+ | ** Parallel Watch window (discussed above) | ||
+ | ** Tasks window | ||
+ | * GPU threads | ||
+ | ** GPU Threads window | ||
+ | * Processes | ||
+ | ** Attach to Process dialog box | ||
+ | ** Processes window | ||
+ | ** Debug Location toolbar (discussed above) | ||
== Basic Debugging Steps == | == Basic Debugging Steps == |
Revision as of 23:06, 13 November 2018
Contents
Multithreaded Application Debugging in Visual Studio
Group Members
Introduction
Multithreaded applications debugging overview
Debugging is one of the crucial software development stages. While all of us know the importance and the basics of debugging in the Visual Studio, debugging the multithreaded applications is more complicated than that of the serial programs we were used to before. The first problem of the multithreaded debugging is keeping track of multiple threads instead of just one as we did with the serial programs. Secondly, having multiple threads introduces new kinds of bugs and issues that can seriously affect the output of the software. Such issues include race conditions and deadlocks. A race condition is the behavior of the system when the output is dependent on the sequence of other events or commands. It becomes a bug when the events are out of order (Race condition wiki). Deadlock is a situation when each member of the group (a group of threads in our case) is waiting for some other member to take action, it typically happens when mutual exclusion is executed incorrectly, and the lock on the resource cannot be released (Deadlock wiki).
Visual Studio tools for multithreaded debugging
Visual Studio provides the developers with a variety of tools to assist with the multithreaded application debugging based on the specifics of the implementation:
- Threads
- Threads window
- Thread markers
- Parallel Stacks window
- Parallel Watch window
- Debug Location toolbar
- Task parallelism
- Parallel Stacks window (discussed above)
- Parallel Watch window (discussed above)
- Tasks window
- GPU threads
- GPU Threads window
- Processes
- Attach to Process dialog box
- Processes window
- Debug Location toolbar (discussed above)
Basic Debugging Steps
- Build in Debug mode
- Double-check the outputs
- Start where the bug is
How to Debug Multithreaded Application in VS
- Tools in more detail (maybe show an example ourselves)
- Walkthrough (workshop-style)