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.
Multi-Threading
Parallel execution of independent subsequences is called multi-threading.
Direct Blocking
Higher priority wants to access resource that is held by a lower priority task.
In which protocol are tasks scheduled based on their active priority?
Priority Inheritance Protocol (PIP):
- Low permission
- no deadlock prevention and difficult implementation.
Which resources does an execution of a process demand and on which factors does the execution time depend on?
- CPU time
- memory
- hardware resources
The execution time depends on:
- CPU performance
- Availability of resources
- Input parameters
- Delays
Priority Inversion
Low-priority task blocks high priority process.
How many memory regions do threads use?
Threads always use the same memory region which leads to…
- very low management effort
- high efficiency
- but also to conflicts (common memory space)
Name limiting factors of memory development.
- Memory Wall
- Power Wall
- Performance Degradation.