Performance implications a multithreaded program in C sharp Arabic #95



 Performance implications a multithreaded program in C sharp Arabic #95

Suggested Videos

Performance implications of a multithreaded program when run on a single core / processor machine versus multi core / processor machine.

On a machine that has multiple processors, multiple threads can execute application code in parallel on different cores. For example , if there are two threads and two cores, then each thread would run on an individual core . This means, performance is better. If two threads take 10 mili-seconds each to complete, then on a machine with 2 processors , the total time taken is 10 mili-seconds.

On a machine that has a single processor , multiple threads execute , one after the other or wait until one thread finishes , it is not possible for a single processor system to execute multiple threads in parallel .Since the operating system switches between the threads so fast , it just gives us the illusion that the threads run in parallel. On a single core / processor machine multiped threads can affect performance negatively as there is overhead involved with context-switching . If two threads take 10 mili-seconds each to complete, then on a machine with 1 processor , the total time taken is 20 mili-seconds + (Thread context switching time ,if any ).


Follow Us

YouTube

 If you want to download pptx : click Telegram

Facebook

Twitter

Instagram

Tik Tok



إرسال تعليق

أحدث أقدم