Changes

Jump to: navigation, search

GPU621/Pragmatic

2,874 bytes added, 01:15, 7 November 2016
Added notes section with an entry on November 7th 2016 at 01:15
Team is considering using Prefix Scan or Convolution workshops for demonstration purposes.
== Notes == *''All notes are based on the material outlined in "Debug Multithreaded Applications in Visual Studio" section of MSDN documentation at:'' [https://msdn.microsoft.com/en-us/library/ms164746.aspx https://msdn.microsoft.com/en-us/library/ms164746.aspx] ''and other related MSDN documentation.'' '''Entry on: November 6th 2016''' '''Debug Multithreaded Applications in Visual Studio''' While parallel processing of multiple threads increases program performance, it makes debugging task harder, since we need to track multiple threads instead of just one (Master thread). Also some potential bugs are introduced with parallel processing, for example, when race condition (When multiple processes or threads try to access same resource at the same time, for more information visit [https://en.wikipedia.org/wiki/Race_condition Race Condition Wiki]) occurs and mutual exclusion is performed incorrectly, it may create a deadlock condition (When all threads wait for the resource and none can execute, for more info visit [https://en.wikipedia.org/wiki/Deadlock Deadlock Wiki]), which can be very difficult to debug.  Visual Studio provides many useful tools that make multithreaded debugging task easier. '''Debug Threads and Processes''' A process is task or a program that is executed by operating system, while a thread is a set of instructions to be executed within a process. A process may consist of one or more threads.  Following are the tools for debugging Threads and Processes in Visual Studio: # Attach to Process (Dialog box) -Allows to attach the Visual Studio debugger to a process that is already running;# Process (Window) -Shows all processes that are currently attached to the Visual Studio debugger;# Threads (Window) - Allows to view and manipulate threads;# Parallel Stacks (Window) - Shows call stack information for all the threads in the application (Threads View);# Parallel Tasks (Window) - Displays all parallel tasks that are currently running as well as tasks that are scheduled for execution;# Parallel Watch (Window) - Allows to see and manipulate the values for one expression executed on multiple threads;# GPU Threads (Window) - Allows to examine and work with threads that are running on the GPU in the application that is being debugged;# Debug Location (Toolbar) - Allows to manipulate processes and threads while debugging the application; Above mentioned tools can be classified as follows: * The primary tools for working with processes are the ''Attach To Process'' dialog box, the ''Processes'' window, and the ''Debug Location'' toolbar;* The primary tools for working with threads are the ''Threads'' window and the ''Debug Location'' toolbar.* The primary tools for working with multithreaded applications are the ''Parallel Stacks'', ''Parallel Tasks'', ''Parallel Watch'', and ''GPU Threads'' windows.
54
edits

Navigation menu