L7 - Concurrency Flashcards
Semaphores are ________________ that can only accessed by _________ and _________.
Semaphores are kernel data structures, that can only be accessed by wait and signal.
What is Push Through Blocking?
In push through blocking, the medium priority task is blocked by a lower priority task which inherited a higher priority from a task it directly blocks.
Name the three problems that can occur while multi-threading.
- Race Conditions
- Priority Inversions
- Starvation
What does NPP stand for?
In NPP (Non-Preemptive Protocol), a task that enters a critical section gets the highest priority level and therefore prevents a deadlock. NPP is easy to implement and denies preemption during execution of any critical section
Describe Starvation.
Process is denied necessary resources and waits forever.
Multi-Tasking
Parallel execution of independent processes is called multi-tasking.
Priority Ceiling Protocol (PCP) avoids ____________, ____________ and ____________. What is the concept of PCP?
Priority Ceiling Protocol (PCP) avoids priority inversion, deadlocks and chained blocking. Task can only enter critical section if priority is higher than priority ceiling of all currently locked semaphores
The protocol has:
- medium permission
- deadlock prevention and medium implementation
What is a Race Condition?
Threads/processes are reading or writing shared data. This leads to results depending on the exact execution order of instructions.
Solution: critical sections and mutual exclusion
What is understood under the term of performance degradation?
- Slow Memory Access
- changing threads
- time consuming thread synchronization
What is not allowed in a critical section?
In critical sections shared resources are not allowed to be simultaneously accessed by competing tasks. There is only one process in the critical section.
Thread
Different execution paths that operate on the same data.
What is generally known as Memory Wall?
Memory speed does not keep up with processor speed.
How is Concurrency defined?
In concurrent processes code or instructions are executable in parallel.
Power Wall
High clock frequencies lead to high thermal output that can’t be handled.
Define HLP.
HLP stands for Highest Locker Priority Protocol: task in critical section is given highest dynamic priority. With an easy implementation and medium permission, HLP prevents a possible deadlock.