Meta

Parallel Processing

The traditional model for multiprocessor support is symmetric multiprocessor (SMP). In a NUMA system, CPUs are arranged in smaller systems called nodes. Each node has its own processors and memory, and is connected to the larger system through a cache-coherent interconnect bus.

Logical processor contain code blocks which are in process of execution.

Logical Processor

L1 Cache

Instruction Cache (32 Kb) Data Cache (32 Kb)

L2 Cache

Unified Cache (256 -1024 Kb)

L3 Cache

Unified Cache (1024-8192 Kb)

Test your CPU by using Application Coreinfo from sysinternal.This application will guide you with your CPU configuration and support for parallel computing. If you have support for parallel computing you can code your application in thread and task.

Thread <> Task <> Fibers

System.Threading.Thread <> System.Threading.Task

Thread : It is also the small unit of execution consists of a stack, the state of the CPU registers, and an entry in the execution list of the system scheduler. Thread Local Storage (TLS) gives locations in which to store thread-specific data. 1. Dynamically bound (run-time thread) 2. Statically bound (load-time thread)

Thread Pool : Used to reduce the number of application threads and provide management of thread.

Task : distributing execution processes across different parallel computing nodes without context switching between task. Task mostly are used in condition where we listen to some port or wait to get response from the system.

Fiber : light-weight, cooperative threads but two fibers can’t run at exactly the same time, just using fibers alone will not take advantage of multiple CPUs or multiple CPU cores.