Ehsan Ghanbari

Experience, DotNet, Solutions

Multi-threading, parallelism and Asynchronous programming


Multithreading: Based on Microsoft definition, multithreading is the ability of a central processing unit to execute multiple processes or threads concurrently.  In multithreading, a single process has multiple threads of execution. If the system has multiple CPUs then it can run in parallel. In nutshell, it's all about solving simultaneously a problem to improve performances.


Parallel programming: is a programming technique wherein the execution flow of the application is broken up into pieces that will be done at the same time by multiple cores, processors, or computers.  It literally means using a set of resources to solve some problem in less time by dividing the work. The issue with the processor load has a connection with parallel programming in the sense that parallel programming aims to keep all computational elements as busy as possible. But simply keeping the CPU busy does not mean that you are doing parallel programming. It extends well beyond multithreading and can take place among processes running on the same machine or on different machines.


Asynchronous programming: usually it is used with slow tasks and when you don't want to lock other tasks of your application. For example, when some part of your application is busy for a task, other parts wouldn't wait for that task to be completed. In fact, it is a means of parallel programming in which a unit of work runs separately from the main application thread and notifies the calling thread of its completion, failure or progress.






About Me

Ehsan Ghanbari

Hi! my name is Ehsan. I'm a developer, passionate technologist, and fan of clean code. I'm interested in enterprise and large-scale applications architecture and design patterns and I'm spending a lot of my time on architecture subject. Since 2008, I've been as a developer for companies and organizations and I've been focusing on Microsoft ecosystem all the time. During the&nb Read More

Post Tags
Pending Blog Posts
Strategic design
Factory Pattern
time out pattern in ajax
Selectors in Jquery
Peridic pattern
How to use PagedList In MVC
How to query over Icollection<> of a type with linq
Domain driven design VS model driven architecture
What's the DDD-lite?
Redis as a cache server
comments powered by Disqus