Jump to content

Can someone please explain in detail, concurrency and parallelism, and the difference between them?

 

I've checked multiple links on Google and the results are mixed. Some sources describe them as the same thing, some describe concurrency as being different, so IDK.

 

Java Trainee (Novice)

Thanks in advance~

Link to comment
https://linustechtips.com/topic/1425446-java-concurrency-vs-parallelism/
Share on other sites

Link to post
Share on other sites

1 hour ago, Kiyullo said:

Can someone please explain in detail, concurrency and parallelism, and the difference between them?

 

I've checked multiple links on Google and the results are mixed. Some sources describe them as the same thing, some describe concurrency as being different, so IDK.

 

In reference to what?  They’re words. This could be anything from film theory to math.  Much like the names of art movements They mean different things in different situations.  Magic realism in writing is totally different from magic realism in painting for example.

Not a pro, not even very good.  I’m just old and have time currently.  Assuming I know a lot about computers can be a mistake.

 

Life is like a bowl of chocolates: there are all these little crinkly paper cups everywhere.

Link to post
Share on other sites

54 minutes ago, Bombastinator said:

In reference to what?

Java, a programming language?

 

image.png.07a846d28d9f84d14784152da53d0d98.png

On 4/5/2024 at 10:13 PM, LAwLz said:

I am getting pretty fucking sick and tired of the "watch something else" responses. It's such a cop out answer because you could say that about basically anything, and it doesn't address the actual complaints. People use it as some kind of card they pull when they can't actually respond to the criticism raised but they still feel like they need to defend some company/person. If you don't like this thread then stop reading it. See how stupid it is? It's basically like telling someone "shut the fuck up". It's not a clever responsive, it doesn't address anything said, and it is rude. 

 ^

-----

MKBHD is but an Apple propagandist and fanboy. Take his videos with a grain of salt, especially about anything Apple. In his video titled "I Visited Apple's Secret iPhone Testing Labs!", he has shown that he makes no effort to fact check Apple's claims, and takes it at face value. I do not believe he can be trusted as an Reviewer/Influencer.

-----

bruh switch to dark mode its at the bottom of this page

VPN Server Guide

Link to post
Share on other sites

56 minutes ago, RockSolid1106 said:

Java, a programming language?

 

image.png.07a846d28d9f84d14784152da53d0d98.png

It seems I was unclear.  That happens a lot. No I mean the other definitions.  Yes you want the meaning for Java coders.  The thing is those words are standard English not just specialized coding terms so the various definitions are going to be for different things.  And those things will not be the same.  I suggest looking in some sort of Java certification prep materials or something.  They will likely vary there too but the range will likely be smaller.

Not a pro, not even very good.  I’m just old and have time currently.  Assuming I know a lot about computers can be a mistake.

 

Life is like a bowl of chocolates: there are all these little crinkly paper cups everywhere.

Link to post
Share on other sites

6 hours ago, Kiyullo said:

Can someone please explain in detail, concurrency and parallelism, and the difference between them?

 

I've checked multiple links on Google and the results are mixed. Some sources describe them as the same thing, some describe concurrency as being different, so IDK.

 

Most of the time concurrency means, that you can work on independent tasks. Not necessarily parallel.

 

Painting the walls in a house: If you switch between the rooms constantly, you see progress on two tasks (rooms). That's concurrent but not parallel.

If you get help from a friend, but you only have 1 paint roller: That's concurrent but not parallel. The tasks moves between cores.

If you add a second paint roller: That's parallel.

 

Reading a book -> door bell rings -> stop reading -> you receive a packet -> unpacking / continue delivery -> continue reading . 3 tasks on two cores. One task runs parallel, the other two don't, all tasks are concurrent.

 

In practice this usually means:

If you have one "job" to do, like independent calculations with 1000 different values, parsing a lot of lines -> call that parallel if you do that in a parallel loop. You do not have to do a lot of work to prevent conflicts and you have a defined block of data.

 

If you have responsive interfaces, multiple users, downloads, events, multiple database accesses.... things that can be "unpredictable but need to be handled at the same time" -> call that concurrent.  Because it describes more of a general situation or concept - and can cause a lot problems 😄

 

Link to post
Share on other sites

Concurrency refers to the general concept of a computer being able to run multiple tasks at the same time, or at least give that perception to the user. Java implements concurrency in a variety of ways:

https://docs.oracle.com/javase/tutorial/essential/concurrency/

 

Parallelism more strictly refers to doing something in parallel, usually with multiple computing units working on subdivided data. The official Java docs define it here:

https://docs.oracle.com/javase/tutorial/collections/streams/parallelism.html

 

the two concepts aren't entirely separate, parallelism here could be seen as a type of concurrency.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×