

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Concurrency and Parallelism
The terms concurrency and parallelism are used in context of multithreaded programs. However, they are quite different. Details about these are given as follows −
Concurrency
Concurrency means that multiple processes or threads are making progress concurrently. While only one thread is executed at a time by the CPU, these threads can be switched in and out as required. This means that no thread is actually completed totally before another is scheduled. So all the threads are executing concurrently.
An image that demonstrates concurrency is as follows −
In the above diagram, all the four threads are running concurrently. However, only one of them can be scheduled on a processor at a time.
Parallelism
Parallelism means that multiple processes or threads are making progress in parallel. This means that the threads are executing at the same time. This can happen if all the threads are scheduled on parallel processors.
An image that demonstrates parallelism is as follows −
In the above diagram, all the four threads are running in parallel i.e. they are executing at the same time.
- Related Questions & Answers
- Difference between CountDownLatch and CyclicBarrier in Java Concurrency
- What is the difference between Concurrency and Parallel Execution in Computer Architecture?
- Data parallelism vs Task parallelism
- Thread-based parallelism in C#
- Thread-based parallelism in Python
- Difference between JCoClient and JCoDestination
- Difference between String and StringBuffer.
- Difference between StringBuffer and StringBuilder.
- Difference between C# and .Net
- Difference between Process and Thread
- Difference between localhost and 127.0.0.1?
- Difference between Java and JavaScript.
- Difference between NodeJS and AngularJS
- Difference between Normalization and Denormalization
- Difference between Servlet and JSP