Unit 3
- Priority Inversion
- Startvation
- Convoy Effect
- Fetch, Decode, Calculate, Fetch, Execute, Write #Pipeline Hazard (Pipeline Bubble) Resource Hazard-occurs due to resource sharing concurrently(Structural Hazard) Data Hazard-conflict in access of operand location RAW(True), WAR(Anti), WAW(Output) Control Hazard(Branch Hazard)-when pipeline makes wrong decision on a branch prediction.
Multiprogramming Multiprocessing Distributed processing-“cluster” refers to the connection of computers or servers to each other over a network to form a larger “computer”
concurrency-issues communication allocation of processor time to processes synchronization of activities sharing of resources
IMP terms
- Atomic Operation (guarantees isolation)
- Critical Section
- Deadlock } v
- Live lock } Lead to Starvation but reverse is not possible
- Mutual exclusion
- Race Condition
- Starvation
#Principles of concurrency
- Interleaving(single processor system)
- Overlapping(multiprocessor system)
#Process Interaction
- Competition(me, dl, st)
- Cooperation by sharing(me,dl,st, data coherence)
- Cooperation by communication(dl, st)
#Solution of critical section problem
- Lock variable Lock=0 -> Critical section vacant Lock=1 -> Critical section occupied
test&set -> solution of lock var
-
Interrupt disabling Machine Instruction approach Compare and swap(*word, testval, newval) exchange(*register, *memory) busy waiting or spin waiting
-
Common concurrency mechanism