Chapter 13 Rev Qs Flashcards
Write at least two mechanisms that controls the order in which tasks are executed in concurrency programs.
Task Synchronization:
two kinds; task communication is necessary and provided by shared nonlocal variables, parameters, and message passing
Scheduler:
maps task execution onto available processors
—-
Semaphores; Monitors; Message Passing
Name at least three programming languages presented in class that support concurrency.
ADA, Scala, Javascript, Rust, GO, Haskell
What is the difference of physical concurrency and logical concurrency?
Physical Concurrency:
multiple independent processors
Logical Concurrency:
the appearance of physical concurrency is presented by time-sharing one processor (SW can be designed as if there were multiple threads of control)
Describe the two types of synchronization in concurrency. Cooperation and Competition.
Cooperation:
Task A must wait for Task B to complete some specific activity before Task A can continue its execution. (The producer-consumer problem)
Competition:
Two or more tasks must use some resource that cannot be simultaneously used(A shared computer; is usually provided by mutually exclusive access)