Algorithm Concurrency Flashcards
Atomic operation
a function or action implemented as a sequence of one or more instructions which is indivisible, the sequence of instruction is guaranteed to execute as group
Critical selection
A section of code within a process that requires access to shared resources that must not be executed while another process is in a corresponding section of code.
Deadlock
Two or more processes are unable to proceed because each is waiting for one of the others to do something
Livelock
A situation in which two or more processes continuously change their states in response to changes in the other process(es) without doing any useful work
Mutual exclusion
Requirement when one process is in a critical section that accesses shared resources no other process may be in a critical section that accesses any of those shared resources
Race Condition
A situation in which multiple threads or processes read and write a shared data item and the final result depends on the relative timing of their execution
The “loser” of the race, who performs the last update determine the final value of a shared data item
Starvation
A situation in which a runnable process is overlooked indefinitely by the scheduler; although it is able to proceed it is never chosen.
Resource competition
Concurrent processes come into conflict when they are competing for the same resource
Critical section/ Mutual Exclusion
Process B may attempt to enter the critical region whilst A is in the critical region, this will result in B being blocked
Process B will be able to enter the critical section once process A leaves the critical region.
A process can finish the execution of its critical section, even if it is pre–empted or interrupted.
Problems of mutual exclusion
Deadlocks - Processes wait forever for each other to free resources
Starvation - A process waits forever to be allowed to enter its critical section