Actors 101

It’s not uncommon for words to have a narrower meaning in a specific domain than they do in plain English. ”Heap” and ”stack” are synonyms in the dictionary too, but they don’t mean the same thing in computing.

5 Likes

Parallelism in the same universe would be useless, without the concurrency required to consume the parallel outputs. This is akin to sitting in front of two television sets and watching two different news programs simultaneously.

The following definition is from Modernizing Grand Central Dispatch Usage:

Parallelism

Simultaneous execution of closely related computations

Concurrency

Composition of independently executed tasks

Also, out of curiosity, I asked Flexi the following question. :slight_smile:

In computing, what is the difference in the meaning of the following words? concurrent and parallel?

It gave me the following answer.

Great question! Both "concurrent" and "parallel" computing involve multiple tasks happening at the same time, but they have some differences:

Concurrent Computing:

  • Definition: Multiple tasks are in progress at the same time, but not necessarily executing simultaneously.
  • Example: Think of a single-core processor that switches between tasks quickly. It might work on Task A for a bit, then switch to Task B, and so on. It gives the illusion that tasks are happening at the same time, but they are actually taking turns.

Parallel Computing:

  • Definition: Multiple tasks are executed simultaneously, often using multiple processors or cores.
  • Example: Imagine a multi-core processor where each core handles a different task at the same time. Task A runs on Core 1, Task B runs on Core 2, and so on. This means tasks are truly happening at the same time.

Key Differences:

  • Concurrency is about dealing with lots of things at once (interleaving tasks).
  • Parallelism is about doing lots of things at the same time (simultaneous execution).

I hope this helps you understand the difference!

TN2028

Wow, I’d forgotten that I wrote that O-:

ibex10, Lemme add a text book recommendation, namely Mac OS X Internals: A Systems Approach by Singh. It’s also super old, but it’s an excellent explaining of many of the technologies that continue to underpin Apple platforms.

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

2 Likes

Dear @eskimo,

Thank you for the book recommendation.

I have finished reading the TN2028, and I quite liked it.

But, how much of it is still relevant? Especially of the last section titled Mac OS X Kernel Threading?

Thank you :slight_smile:

But, how much of it is still relevant?

All the Mac OS 9 stuff is definitely irrelevant (unless your @jrose :-).

As to the Mac OS X stuff, that’s mostly still relevant, but it’s no longer the full story. Most notably, it doesn’t cover Dispatch (GCD), and Dispatch is layered on top of new infrastructure (workloops) that represent significant enhancements over what was possible on Mac OS X 10.0. For example, with this Dispatch infrastructure the kernel can start a new thread in a user space process in response to an event, which is pretty cool.

Especially of the last section titled Mac OS X Kernel Threading?

That section is still reasonably relevant. The only big change is that the kernel funnel no longer exists. Mac OS X switched to using fine-grained locks in the 10.4-ish timeframe.

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

4 Likes