Chapter 6 - Concurrency Flashcards
What is Concurrency?
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.
What is parallelism?
Parallelism is when the execution of two or more pieces of code do run at the same time. It’s hardware concern.
What is temporal coupling?
Temporal Coupling happens when your code imposes a sequence on things that is not required to solve a problem at hand.
What is an atomic operation?
It is a set of commands that should be synchronously executed. In other words, it should not switch execution context.
What is the most challenging part of Concurrency?
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.
What are some alternatives to Concurrency with Shared State?
1 - Actor and Processes
2 - Messaging System / Blackboard