Win32/64-Multithread/Multicore-Programming

Who should attend?

Software engineers developing Windows applications that make use of the multithreading features of the Win32/Win64-API.

Pre-requisites:

A good working knowledge of C.

Duration:

3 days

Course Description:

This course covers the multithreading features of the Win32/Win64-API. It explains the differences between processes and threads, what their features are and how they can communicate and work together. Furthermore it details what must be done in terms of synchronisation to prevent typical multithreading problems like deadlocks and wrong results showing up from time to time. An additional focus of this course is to show why adding processing power in form of multicore processors in many cases does not lead to the expected results, and what needs to be done to exploit these dormant resources. 


Course Outline

Introduction

  • The Win32/64 API
  • Process and thread model
  • Memory management and virtual addressing
  • Windows objects and how they are used

Processes and Threads

  • Creation and termination
  • Priorities
  • Scheduling
  • Preemption
  • Time slicing

Synchronisation

  • Critical Sections
  • Mutexes
  • Semaphores
  • Events
  • Deadlocks
  • Interlocked functions

Inter Process Communication

  • Shared Memory (Memory Mapped Files)
  • Message Queues
  • Named pipes and Anonymous pipes

Multicore Performance Optimisations

  • CPU usage scenarios
  • False Sharing
  • Criteria for best performance results
  • OpenMP (outlook)

Debugging Techniques

Practical Exercises