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.


We currently have mapping of CPU as

1. Physical Processor {0,1) ( having Hyper Threading Capability )
2. Single Group Map {0}
3. NUMA NODE {0} (Non-Uniform Memory Access )
4. Socket Block {0,1}
5. Four Core {0,1,2,3}
6. 4 Logical Processors

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.

1. Worker threads (for Callback) and Worker factory (for manage)
2. Waiter threads (multiple wait handles).
3. Work Queue

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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s