Chapter 13 Rev Qs Flashcards

1
Q

Write at least two mechanisms that controls the order in which tasks are executed in concurrency programs.

A

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

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

Name at least three programming languages presented in class that support concurrency.

A

ADA, Scala, Javascript, Rust, GO, Haskell

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

What is the difference of physical concurrency and logical concurrency?

A

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)

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

Describe the two types of synchronization in concurrency. Cooperation and Competition.

A

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)

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