Workshop 6 Section 1 Flashcards
What are 4 design issues of concurrency?
Inter-process communication, sharing/competing for resources, synchronization of processes, scheduling of processor time allocation to processes.
Problem with shared data a concurrency?
Data incoherence - where data is inconsistent and incorrect.
What are three degrees of awareness concurrent processes have of each other?
Processes unaware: compete for resources, problems - mutual exclusion, deadlock, starvation
Processes indirectly aware: share access to object, cooperate, problems - me, deadlock, starvation, data coherence
Aware of each other: cooperate by communication, problems - deadlock and starvation.
What is mutual exclusion?
Processes access resource on at a time.
Why is critical section?
The part of the process that tries to use critical resource.
What is the purpose of process synchronization?
To ensure only one process enters a critical section for resource at any one time.
What is deadlock?
The permanent blocking of a set of processes that compete or communicate.
Where do deadlocks most commonly happen?
In multi-tasking environments.
What is starvation?
When a process waits for resource but never gets it.
What six requirements must be met for mutual exclusion to happen?
1 process at a time in CS, process that halts in non-CS musn’t interfere with others, no deadlock or starvation allowed, process must not be delayed access to CS if no other process using it, no assumptions on speeds or number of processes, process remains inside its CS for finite time.
What three approaches to mutual exclusion?
Software, hardware, OS.
What is concurrency?
Apparent simultaneous execution of processes, single processor systems do it by timeslice cpu, often requires cooperative processes to access shared data.