Course CSH103
C# .Net Multithreading Programming
C# .Net Multithreading Programming
Duration: 3 Days
Course Synopsis
Microsoft 32bit and 64bit operating systems use threads as the unit of scheduling. Threads associated with a given task share resources and hence inter-thread communication by use of shared memory is quite efficient. Multithreading is well suited to implementing scaleable server tasks running on Symmetric Multi-Processor (SMP) architectures, as the processors share the same memory. Since threads share the same executable code multiple threads can run on separate processors and make use of the same virtual memory space. The code generated by the compiler is the same whether it will run on a single or multi-core SMP processor. Multithreading can also be used to run I/O processing in a separate thread to e.g. data processing.
This module will cover multi-threading programming using C# and .NET multi-threading support. Multi-tasking in the context of .NET will also be covered. A lot of attention will be paid to interthread communication both for synchronisation and for safe access to share resources.Course Objectives
Areas explored in this course include
- Understanding the Windows operating system multi-tasking and multi-threading mechanisms and the various interprocess communication mechanisms available under Windows
- Exploring classical multi-threading patterns and examples in the context of .NET multithreading
- Producer-consumer
- Readers and writers
- Work crew
- The dining philosophers problem
- WinAPI synchronisation resources
- Event objects
- Mutexes
- Semaphores
- Monitors
- critical sections
- Memory mapped files
- Programmers who already know C# and who wish to gain a deeper understanding of mutli-tasking and multi-threading in the context of developing .NET applications.
- Symmetric MultiProcessor (SMP) Architectures
- WinAPI and the separation between user space and kernel space code
- How the .NET framework fits in with the WinAPI
- Multi-threading and Multi-tasking in the Windows world
- Creating threads - the Thread class
- Implied type declaration
- Runnable Interface
- Thread priorities
- Stopping and Aborting threads
- Thread join
- Threadpools
- Thread termination
- Graceful shutdown
- Mutex
- Semaphore
- Event object - ManualResetEvent and AutoResetEvent
- Memory mapped files
- Stopping and Aborting threads
- Thread join
- Threadpools
- Interlocked interface
- Increment
- Exchange
- Producer-consumer example
- Readers and Writers Example
- Dining Philosopher's Example
- Workcrew Example
- Stopping and Aborting threads
- Thread join
- Threadpools
- Sleep
- Timer
- Implementing Timer callbacks
- Thread interrupts
- Overview of the PFX Parallel Framework
- The Parallel class
- Parallel LINQ (PLINQ)
- Task parallelism
- Concurrent collections
- SpinLock and SpinWait
The course is aimed at
Publicly scheduled dates, locations, and prices
A schedule of dates for this subject is not currently available. Please call Ajay Patel on 02086471939 to enquire about places and availability.
