โญ Group_Study/Operating System37 [5์ฃผ์ฐจ] Memory Management - Variable Partition Multi-programming Memory Management - Variable Partition Multi-programming Multi-Programming (Variable Partition Multiprogramming) โ ์ด๊ธฐ์๋ ์ ์ฒด๊ฐ ํ๋์ ์์ญ โ ํ๋ก์ธ์ค๋ฅผ ์ฒ๋ฆฌํ๋ ๊ณผ์ ์์ ๋ฉ๋ชจ๋ฆฌ ๊ณต๊ฐ์ด ๋์ ์ผ๋ก ๋ถํ โ No internal fragmentation VPM Example โ Memory space: 120 MB 1. ์ด๊ธฐ์ํ 2. ํ๋ก์ธ์ค A(20MB) ์ ์ฌ 3. ํ๋ก์ธ์ค B(10MB) ์ ์ฌ 4. ํ๋ก์ธ์ค C(25MB) ์ ์ฌ 5. ํ๋ก์ธ์ค D(20MB) ์ ์ฌ 6. ํ๋ก์ธ์ค B๊ฐ ์ฃผ๊ธฐ์ต์ฅ์น ๋ฐ๋ฉ 7. ํ๋ก์ธ์ค E(15MB) ์ ์ฌ 8. ํ๋ก์ธ์ค D๊ฐ ์ฃผ๊ธฐ์ต์ฅ์น ๋ฐ๋ฉ 9. ์ด๋์ ๋ฐฐ์นํ ๊ฒ์ธ๊ฐ...? Placemen.. 2023. 1. 4. [5์ฃผ์ฐจ] Memory Management - Fixed Partition Multiprogramming Memory Management - Fixed Partition Multiprogramming Memory Allocation โ Continuous Memory Allocaiotn(์ฐ์ ํ ๋น) Uni-programming Multi-programmoing Fixed partition(FPM) Variable partition(VPM) โ Non-continuous Memory Allocation(๋น์ฐ์ ํ ๋น) Chapter.9 Continuous Memory Allocation โ ํ๋ก์ธ์ค (context)๋ฅผ ํ๋์ ์ฐ์๋ ๋ฉ๋ชจ๋ฆฌ ๊ณต๊ฐ์ ํ ๋นํ๋ ์ ์ฑ ํ๋ก๊ทธ๋จ, ๋ฐ์ดํฐ, ์คํ ๋ฑ โ ๋ฉ๋ชจ๋ฆญ ๊ตฌ์ฑ ์ ์ฑ ๋์์ ์ฌ๋ผ๊ฐ ์ ์๋ ํ๋ก์ธ์ค ์(Multiprogramming degree) ๊ฐ ํ๋ก์ธ์ค์๊ฒ ํ ๋น๋.. 2023. 1. 3. [5์ฃผ์ฐจ] Memory Management: Backgrounds Memory Management: Backgrounds ๋ฉ๋ชจ๋ฆฌ(๊ธฐ์ต์ฅ์น)์ ์ข ๋ฅ โ ๊ณ์ธต์ ๊ตฌ์กฐ๋ฅผ ๊ฐ์ง๊ณ ์๋ค!! ๋ฉ๋ชจ๋ฆฌ(๊ธฐ์ต์ฅ์น) ๊ณ์ธต๊ตฌ์กฐ Address Binding โ ํ๋ก๊ทธ๋จ์๋ ผ๋ฆฌ ์ฃผ์๋ฅผ ์ค์ ๋ฉ๋ชจ๋ฆฌ์ ๋ฌผ๋ฆฌ ์ฃผ์๋ก ๋งคํ(mapping)ํ๋ ์์ โ Binding ์์ ์ ๋ฐ๋ฅธ ๊ตฌ๋ถ Compile time binding Load time binding Run time binding โ User Program Processing Steps Compile time binding โ ํ๋ก์ธ์ค๊ฐ ๋ฉ๋ชจ๋ฆฌ์ ์ ์ฌ๋ ์์น๋ฅผ ์ปดํ์ผ๋ฌ๊ฐ ์ ์ ์๋ ๊ฒฝ์ฐ ์์น๊ฐ ๋ณํ์ง ์์ โ ํ๋ก๊ทธ๋จ ์ ์ฒด๊ฐ ๋ฉ๋ชจ๋ฆฌ์ ์ฌ๋ผ๊ฐ์ผ ํ๋ค Load time binding โ ๋ฉ๋ชจ๋ฆฌ ์ ์ฌ ์์น๋ฅผ ์ปดํ์ผ ์์ ์์ ๋ชจ๋ฅด๋ฉด, ๋์ฒด ๊ฐ๋ฅํ ์๋ ์ฃผ.. 2023. 1. 2. [4์ฃผ์ฐจ] Deadlock: Deadlock Detection and Recovery Deadlock: Deadlock Detection and Recovery Deadlock Detection โ Deadlock ๋ฐฉ์ง๋ฅผ ์ํ ์ฌ์ ์์ ์ ํ์ง ์์ Deadlock์ด ๋ฐ์ ๊ฐ๋ฅ โ ์ฃผ๊ธฐ์ ์ผ๋ก deadlock ๋ฐ์ ํ์ธ ์์คํ ์ด deadlock ์ํ์ธ๊ฐ? ์ด๋ค ํ๋ก์ธ์ค๊ฐ deadlock ์ํ์ธ๊ฐ? โ Resource Allocation Graph(RAG) ์ฌ์ฉ Resource Allocation Graph(RAG) โ Deadlock ๊ฒ์ถ์ ์ํด ์ฌ์ฉ โ Directed, Bipartite Graph โ Directed graph G = (N, E) N = ${N_p, N_r}$ where $N_p$ is the set of processes = ${P1, P2, ..., P_N}$ and.. 2022. 12. 29. [4์ฃผ์ฐจ] Deadlock: Deadlock Avoidance Deadlock: Deadlock Avoidance Deadlock Avoidance: ๊ฐ์ โ ์์คํ ์ ์ํ๋ฅผ ๊ณ์ ๊ฐ์ โ ์์คํ ์ด deadlock ์ํ๊ฐ ๋ ๊ฐ๋ฅ์ฑ์ด ์๋ ์์ ํ ๋น ์์ฒญ ๋ณด๋ฅ โ ์์คํ ์ ํญ์ safe state๋ก ์ ์ง Safe State โ Safe state ๋ชจ๋ ํ๋ก์ธ์ค๊ฐ ์ ์์ ์ข ๋ฃ ๊ฐ๋ฅํ ์ํ Safe sequence๊ฐ ์กด์ฌ Deadlock ์ํ๊ฐ ๋์ง ์์ ์ ์์์ ๋ณด์ฅ โ Unsafe state Deadlock ์ํ๊ฐ ๋ ๊ฐ๋ฅ์ฑ์ด ์์ ๋ฐ๋์ ๋ฐ์ํ๋ค๋ ์๋ฏธ๋ ์๋๋ค ๊ฐ์ โ ํ๋ก์ธ์ค์ ์๊ฐ ๊ณ ์ ๋จ โ ์์์ ์ข ๋ฅ์ ์๊ฐ ๊ณ ์ ๋จ โ ํ๋ก์ธ์ค๊ฐ ์๊ตฌํ๋ ์์ ๋ฐ ์ต๋ ์๋์ ์๊ณ ์์ โ ํ๋ก์ธ์ค๋ ์์์ ์ฌ์ฉ ํ ๋ฐ๋์ ๋ฐ๋ฉ โ Not practical Algorit.. 2022. 12. 27. [4์ฃผ์ฐจ] Deadlock: Deadlock Prevention Deadlock: Deadlock Prevention Deadlock ํด๊ฒฐ ๋ฐฉ๋ฒ Deadlock prevention methods (์๋ฐฉ) Deadlock avoidance methods(ํํผ) Deadlock detection and deadlock recovery methods(ํ์ง ๋ฐ ๋ณต๊ตฌ) Deadlock Prevention โ 4๊ฐ์ deadlock ๋ฐ์ ํ์ ์กฐ๊ฑด ์ค ํ๋๋ฅผ ์ ๊ฑฐ Exclusive use of resources Non - preemptible resources Hold and Wait(Partial allocation) Circular wait โ Deadlock์ด ์ ๋ ๋ฐ์ํ์ง ์๋๋ค 1. ๋ชจ๋ ์์ ๊ณต์ ํ์ฉ โ Exclusive use or resources ์กฐ๊ฑด ์ ๊ฑฐ โ.. 2022. 12. 26. ์ด์ 1 2 3 4 5 6 7 ๋ค์