Multi-thread apps for Multi-Core

Win32 Functions to Create, Suspend, and Terminate Threads


Challenge

Apply procedures provided by the Microsoft Win32 API to create, suspend, resume, and terminate threads. Context switching in a multithreaded application is cheaper than context switching of multiple processes, because switching processes carries a lot more overhead than switching threads.

  • synchronization
  • Multi-thread apps for Multi-Core
  • How to thread?
  • Computação paralela
  • Use Win32 Functions to Manage Event Objects


    Challenge

    Apply Win32 Functions to create and use event objects.
    The event object is a kernel object that stays nonsignaled until a condition is met. The programmer has the control over setting the event object to a signaled or a nonsignaled state, unlike a mutex or semaphore where the operating system governs the signaled and nonsignaled state of the object.

  • synchronization
  • Multi-thread apps for Multi-Core
  • How to thread?
  • Computação paralela
  • Processor Time Counter to Evaluate Threading Methodology


    Challenge

    Evaluate the Processor Time counter of the performance object Thread to gauge the correctness of threading methodology. This indicator may help to point out where processor resources are being wasted in a long-duration spin-wait loop.

  • Multi-thread apps for Multi-Core
  • How to thread?
  • Performance analysis
  • Computação paralela
  • Perform Synchronization Using Thread Locking


    Challenge

    Perform synchronization when more than one atomic operation is required. In most implementations, a simple atomic operation is not sufficient to enforce synchronization and therefore to prevent race conditions (e.g., multiple threads simultaneously updating the same global variable).


    Solution

    Enforce criticality using Win32* critical sections, Win32 mutexes, or OpenMP* locks.

  • synchronization
  • Multi-thread apps for Multi-Core
  • How to thread?
  • Computação paralela
  • Structure the Implementation Phase of Threaded Application Development


    Challenge

    Develop a methodology for the implementation phase of the development cycle. The implementation phase involves converting design issues to actual code by selecting an appropriate threading model.

  • analysis
  • Multi-thread apps for Multi-Core
  • How to thread?
  • Computação paralela
  • Apply Functional Decomposition to Improve Efficiency of Input/Output Operations


    Challenge

    Decrease the overhead in program execution that is associated with Input/Output (I/O) operations. The following diagram represents the setup, execution, and finish-up phases of a threaded video-processing application:


  • analysis
  • Multi-thread apps for Multi-Core
  • How to thread?
  • Computação paralela
  • Write-Combining Store Buffers on Hyper-Threading Technology-Enabled Systems

    Challenge

    Ensure that write-combining store buffers are optimally available for use by the execution engine on processors with Hyper-Threading Technology. To accelerate processor write performance, a write-combining (WC) store buffer accumulates multiple stores in the same cache line before eventually writing the combined data farther out into the memory hierarchy.
  • Hyper-Threading
  • Multi-thread apps for Multi-Core
  • Computação paralela
  • Avoid Excessive Synchronization


    Challenge

    Identify and eliminate excessive synchronization in a threaded application. The overhead associated with excessive synchronization can be a significant detriment to the scaling performance of threaded applications. If global data accesses are found throughout the profile of a thread, each has to be protected by synchronization constructs.

  • synchronization
  • Multi-thread apps for Multi-Core
  • How to thread?
  • Computação paralela
  • Assine o Multi-thread apps for Multi-Core