Deadlock: Deadlock Model
Deadlock λ°μμ μ
β 2κ°μ νλ‘μΈμ€(P1, P2)
β 2κ°μ μμ(R1, R2)
β P1μ P2κ° κ°μ§κ³ μλ R1μ, P2λ P1μ΄ κ°μ§κ³ μλ R2λ₯Ό μμ²νκ³ μλ€ -> μλ‘ λ°μ κ°λ₯μ±μ΄ μλ μ΄λ²€νΈλ₯Ό κΈ°λ€λ¦¬κ³ μμΌλ―λ‘ deadlock!
Deadlock Model(ννλ²)
- Graph Model
- State Transition Model
Graph Model
β Node
- νλ‘μΈμ€ λ Έλ(P1, P2), μμ λ Έλ(R1, R2)
β Edge
- $R_j$ -> $P_i$: μμ $R_j$μ΄ νλ‘μΈμ€ $P_i$μ ν λΉ λ¨
- $P_i$ -> $R_j$: νλ‘μΈμ€ $P_i$κ° μμ $R_j$μ μμ²(λκΈ° μ€)
β Cycle μμ± μ Deadlock!
State Transition Model
β μμ
- 2κ°μ νλ‘μΈμ€μ Atypeμ μμ 2κ°(unit) μ‘΄μ¬
- νλ‘μΈμ€λ νλ²μ μμ νλλ§ μμ²/λ°λ© κ°λ₯
β State: νλ‘μΈμ€κ° 1κ°μΌ λ
β State: νλ‘μΈμ€κ° 2κ°μΌ λ
Deadlock λ°μμ νμ 쑰건
β μμμ νΉμ±
- Exclusive use of resources
- Non - preemptible resources
β νλ‘μΈμ€μ νΉμ±
- Hold and Wait(Partial allocation)
- μμμ νλ holdνκ³ λ€λ₯Έ μμ μμ²
- Circular wait
'β Group_Study > Operating System' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
[4μ£Όμ°¨] Deadlock: Deadlock Avoidance (1) | 2022.12.27 |
---|---|
[4μ£Όμ°¨] Deadlock: Deadlock Prevention (0) | 2022.12.26 |
[4μ£Όμ°¨] Deadlock: Deadlock and Resource types (0) | 2022.12.22 |
[3μ£Όμ°¨] Mutual Exclusion Solutions (Language-Level solution) (0) | 2022.12.21 |
[3μ£Όμ°¨] Mutual Exclusion Solutions (OS supported SW solution) (0) | 2022.12.18 |
λκΈ