Introduction to Parallel and Asynchronous Programming | Dot Net Tutorials | Pranaya Rout

2K views Dec 8, 2023

Introduction to Parallel and Asynchronous Programming | Dot Net Tutorials | Pranaya Rout | Online Training Introduction to Concurrency How we can Achieve Efficiency What is Concurrency How We Can Achieve Parallelism in Programming Introduction to Asynchronous Programming Introduction to Parallel Programming CPU vs. I/O Bound Operations As developers, we all want to develop good software or applications. We also know that good software is Testable, Maintainable, Reusable, Flexible, and Efficient. Now, we are going to focus on the efficiency aspect. When we talk about efficiency, we probably think in terms of speed. For example, let us say we have a program A that performs a task in 60 seconds. Another program, B, performs the same task in 2 seconds. We can say that Program B is more efficient than Program A. How can we Achieve Efficiency? One of the ways to achieve efficiency is to have a faster computer, i.e., the computer having more RAM, CPU, SSD, etc. Unfortunately, this will be expensive, and there are also some limitations regarding RAM, CPU, SSD, etc. Another option is to take advantage of the power of different cores of our processor. What is Concurrency? Concurrency means doing several things at the same time. For example, if we have to do a million tasks, then instead of doing them sequentially one by one, we can do them simultaneously, thus reducing the duration of the program execution. Let us understand Concurrency with one real-time example. If you have a restaurant with only one cook, then that cook is responsible for cooking everything each customer asks for. Now, if one cook is cooking everything and handling every customer, then the waiting time to serve the customer will definitely be longer. That means one cook does multiple tasks, i.e., preparing food for multiple customers.

#Computer Science
#Training & Certification