Chapter 6 - Concurrency Flashcards

1
Q

What is Concurrency?

A

Concurrency is when the execution of two or more pieces of code act as if they run at the same time. It is a software mechanism.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is parallelism?

A

Parallelism is when the execution of two or more pieces of code do run at the same time. It’s hardware concern.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is temporal coupling?

A

Temporal Coupling happens when your code imposes a sequence on things that is not required to solve a problem at hand.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an atomic operation?

A

It is a set of commands that should be synchronously executed. In other words, it should not switch execution context.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the most challenging part of Concurrency?

A

The most challenging part of concurrency is handling shared state.
Concurrency in a shared resource environment is difficult, and managing it yourself is fraught with challenges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some alternatives to Concurrency with Shared State?

A

1 - Actor and Processes

2 - Messaging System / Blackboard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly