Remix.run Logo
Rob Pike – 'Concurrency Is Not Parallelism' [video] (2012)(vimeo.com)
41 points by jruohonen 3 hours ago | 25 comments
bjoli 37 minutes ago | parent | next [-]

It seems like we forgot about lightweight fibers for about 30 years and then collectively rediscovered it in about 2010. sure, Java did green threads, but not like m:n stuff.

I sometimes wonder where we would be now if people would have gone "Wow, mr Reppy! concurrentML is so cool!" in 1993.

instead we got pthreads and collective amnesia and later we got go's girly times and channels which are only half way there.

BobbyJo 5 minutes ago | parent | next [-]

Back then you could spend 6 months making something twice as fast, or wait six months for computers to become twice as fast. People obviously did the latter.

It also became a cycle: People write single threaded code -> CPUs/OSs optimize performance/ergonomics for single threaded programs -> People write single threaded code ->...

It wasn't until scaling slowed down that interest/investment in concurrency/parallelism took off.

kllrnohj 16 minutes ago | parent | prev | next [-]

That's because they are very rarely useful. This was true then and it's still true now. There's just not many workloads where it makes sense to need to rapidly launch a thread that doesn't need to do much of anything but does need to exist for a while before terminating.

What is useful is the state machine aspects of things like coroutines or async/await, but those aren't quite fibers and very much aren't M:N threading. A major use of them is in UI where they have strict thread requirements even.

smallstepforman 12 minutes ago | parent | prev [-]

Yet the average software engineer hasn’t heard or Carl Hewitt, Joe Armstrong, has never programmed in an Actor Programming model, and dont even know what it is.

thebeardisred an hour ago | parent | prev | next [-]

Slides - https://go.dev/talks/2012/waza.slide

cassianoleal 3 hours ago | parent | prev | next [-]

Why does Vimeo require me to verify my age in the UK to watch Robert Pike talking computer science?

PaulKeeble 2 hours ago | parent | next [-]

Surveillance, got to track you all across the internet.

kmlx 2 hours ago | parent | prev | next [-]

In Greece (EU). Can’t play it either. I’m getting:

> This video is not rated

> Join vimeo to watch

> Already have an account? Log in

throwrioawfo an hour ago | parent | prev | next [-]

Compliance with the absurd and draconian OSA

ChrisArchitect 2 hours ago | parent | prev | next [-]

Alt link: https://www.youtube.com/watch?v=54EV4dDdLO0

davydm 3 hours ago | parent | prev [-]

because otherwise how would the queen know what you're up to all the time? :D

cassianoleal 3 hours ago | parent [-]

Since she was probably sent by God to rule, I assume he called her back upstairs upon her passing. In this case, she can just ask the big man.

Funnily enough, yt-dlp has no trouble downloading it.

dofm an hour ago | parent | next [-]

Side note: we do have a Queen. She's married to the King.

cassianoleal an hour ago | parent [-]

Hah! Fair point. Not sure why she would want to surveil me, but at this point...

davydm 3 hours ago | parent | prev [-]

yeah, i use that often, eg when a video is slow on a website - at least yt-dlp will shard out multiple piece-downloaders, and I can get the video in a few seconds or minutes, and just watch it. Also great for anonymizing sharing videos - download the actual video, share that. Not an url (:

In much the same vein, I rarely actually watch stuff _on_ netflix, through a browser - I watch sped up, and the quality just degrades. Since I pay for it, I feel nothing for downloading a ripped copy to watch it locally :D

petilon 31 minutes ago | parent | prev | next [-]

After watching the video I can see how go lang makes it easier to write correct concurrent programs. But with AI writing the code these days, it is just as "easy" to write correct concurrent programs in Java (because AI is doing the work). Java's virtual threads are light weight, just like go's routines. Java's LinkedBlockingQueue offers roughly the same functionality as go's channels. I would like to hear from go experts as to why I am wrong. Does go have any inherent advantage if AI is writing the code?

DonHopkins 26 minutes ago | parent | prev | next [-]

Just set the source pile of C++ manuals on fire. No gophers needed!

sulam 2 hours ago | parent | prev | next [-]

To HN moderators: title needs to note that this talk is 13 years old.

folkrav an hour ago | parent [-]

The title must have been edited in the last 40min - it shows (2012) now

davydm 3 hours ago | parent | prev [-]

it's an interesting talk, my take being:

concurrency _is_ parallelism, but for I/O. People often think of parallelism for the case of making something go faster - eg placing two computations in parallel (the definition posed in the video), OR placing two I/O operations in parallel - so this is the keyboard-vs-mouse in the OS, even when you're on one core only; this is multiple web requests in JavaScript, which does not support multi-threading, but 100% does support concurrency for I/O operations - that... badum-tiss! RUN IN PARALLEL.

I get the point of the talk, and it's well interesting, but I think it depends on how one views things.

pdpi 3 hours ago | parent | next [-]

> concurrency _is_ parallelism, but for I/O.

Not really. They're just separate but related concepts.

E.g. coroutines are a form of concurrency that doesn't have to involve any sort of I/O, you're just taking two logical processes (e.g generating a sequence and consuming it) and abstracting away how they execute relative to each other.

Describing your tasks using the language of concurrency is a requirement for process-based parallelism (multiple CPUs/cores), but data-level parallelism (SIMD) is a form of parallelism that doesn't involve concurrency either.

threatofrain 2 hours ago | parent [-]

Concurrency is the property of a program or algorithm such that:

    - the program is decomposable into partially ordered or unordered units of execution
    - the program result remains determinant despite partial ordering
Your data-level parallelism is taking advantage of the concurrent properties of a problem.
lelandbatey 2 hours ago | parent | prev [-]

No, and that's the point of the article. What you are calling parallel w/r/t IO should be called concurrency (conceptually happening at the same time by virtue of being able to interrupt and resume units of work). The reason IO APIs like you've described is concurrent but not necessqrily parallel is because there is no guarantee in the API that they both happen literally simultaneously; I could build a JS runtime that "works" for all the code written against XMLHTTPRequest (ignoring side-effects) but which under the hood only ever makes one HTTP request at a time. And because I can do that, that means JS code is living in a concurrency-only world, even though as an implementation detail most runtimes support parallel execution of those concurrent operations.

quietbritishjim an hour ago | parent [-]

> there is no guarantee in the API that they both happen literally simultaneously

There's no actual guarantee in the API that if you spawn multiple threads and call blocking network I/O that those happen literally simultaneously. Maybe the OS has a big mutex on network I/O to serialise them.

Of course, that's not what happens in practice. But neither is it what happens, in practice, to async network APIs called concurrently in one thread. So I don't think that can be the difference between concurrent and parallel.

convolvatron 24 minutes ago | parent [-]

concurrent programs enable parallel evaluation. concurrency is necessary but not sufficient for parallelism.