๐Ÿ“š CS/Operating System

๐Ÿ“š CS/Operating System

[OS] 6. I/O Management and Disk Scheduling

๋ณธ ๊ฒŒ์‹œ๊ธ€์€ PC๋ฒ„์ „์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Operating Systems, Internals and Design Principles (9th Ed.), William Stallings, Pearson, 2017 1. I/O Divices ์ž…์ถœ๋ ฅ์žฅ์น˜๋Š” Controller๋ผ๋Š” ๋ถ€๋ถ„์„ ๊ฐ€์ง„๋‹ค. Controller๋Š” Controller Register, Status Register, Intenal Buffer ๋กœ ๊ตฌ์„ฑ๋œ๋‹ค. 1. Controller Register ์žฅ์น˜ ๋“œ๋ผ์ด๋ฒ„๊ฐ€ 0 ๋˜๋Š” 1 ๋น„ํŠธ๋ฅผ ์„ธํŒ…ํ•จ์œผ๋กœ์จ ์žฅ์น˜์— ๋ช…๋ น์„ ๋‚ด๋ฆฐ๋‹ค. 2. Status Register ์žฅ์น˜ ๋“œ๋ผ์ด๋ฒ„๊ฐ€ ํ•ด๋‹น ์žฅ์น˜์˜ ํ˜„์žฌ ์ƒํƒœ๋ฅผ ์ฒดํฌํ•œ๋‹ค. 3. Internal Buffer ์ž…์ถœ๋ ฅ์ด ์ž„์‹œ๋กœ ์ €์žฅ๋˜๋Š” ๊ณต๊ฐ„์ด๋‹ค. ์ค‘์š”ํ•œ ๊ฒƒ์€ ์ด C..

๐Ÿ“š CS/Operating System

[OS] 5. Concurrency : Deadlock and Starvation

๋ณธ ๊ฒŒ์‹œ๊ธ€์€ PC๋ฒ„์ „์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Operating Systems, Internals and Design Principles (9th Ed.), William Stallings, Pearson, 2017 1. Principles Of Deadlocks ์ปดํ“จํ„ฐ์˜ ์ž์›์ด ํ•œ์ •๋˜์–ด ์žˆ๊ณ  ์ด๊ฒƒ์„ ์—ฌ๋Ÿฌ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์›ํ•˜๋ฏ€๋กœ ์ด ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋‹ค. P1์ด Ra๋ฅผ ์š”์ฒญํ•˜๊ณ  ์ปค๋„์— ์˜ํ•ด Ra๊ฐ€ P1์— ํ• ๋‹น๋œ๋‹ค. (ํ™”์‚ดํ‘œ ๋ฐฉํ–ฅ ์ฃผ์˜) (c)์˜ ๊ฒฝ์šฐ P1์€ Ra๋ฅผ ์š”์ฒญํ–ˆ์ง€๋งŒ P2์— ํ• ๋‹น๋˜์—ˆ๊ณ , P2๋Š” Rb๋ฅผ ์š”์ฒญํ–ˆ์ง€๋งŒ P1์— ํ• ๋‹น๋˜์—ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ฐ๋“œ๋ฝ์ด ๋ฐœ์ƒํ•œ๋‹ค. (d)์˜ ๊ฒฝ์šฐ (c)์™€ ๊ฐ™์€ ํ˜•ํƒœ์ด์ง€๋งŒ ์ž์›์˜ ๊ฐœ์ˆ˜๊ฐ€ ๋งŽ๊ธฐ ๋•Œ๋ฌธ์— ๋ฐ๋“œ๋ฝ์ด ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š”๋‹ค. 2. Condition for Deadlock 1..

๐Ÿ“š CS/Operating System

[OS] 4. Concurrency : Mutual Exlusion and Synchronization

๋ณธ ๊ฒŒ์‹œ๊ธ€์€ PC๋ฒ„์ „์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Operating Systems, Internals and Design Principles (9th Ed.), William Stallings, Pearson, 2017 1. Principles of Concurrency ์ปดํ“จํ„ฐ ๋‚ด๋ถ€์—์„œ ๋‹ค์–‘ํ•œ ํ”„๋กœ์„ธ์Šค ์“ฐ๋ ˆ๋“œ๊ฐ€ ์‹คํ–‰๋˜๋Š”๋ฐ ํ•œ์ •๋œ ์ž์›์„ ๊ฐ–๊ณ  ๋™์‹œ๋‹ค๋ฐœ์ ์œผ๋กœ ์ž‘๋™ํ•˜๋ฏ€๋กœ ์ถฉ๋Œํ•  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์Œ. 1) ์šฉ์–ด ์ •๋ฆฌ 1. Race Condition : ๊ฒฝ์Ÿ ์ƒํƒœ ๋‘ ๊ฐœ ์ด์ƒ์˜ ํ”„๋กœ์„ธ์Šค ํ˜น์€ ์“ฐ๋ ˆ๋“œ๊ฐ€ ๊ณต์œ ๋œ ์ž์›์„ ์ฝ๊ณ  ์“ฐ๋Š” ๊ณผ์ •์—์„œ ์–ด๋–ค ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์˜ฌ์ง€ ๋ชจ๋ฅด๋Š” ์ƒํ™ฉ 2. Mutual Exclusion : ์ƒํ˜ธ ๋ฐฐ์ œ ํ•˜๋‚˜์˜ ํ”„๋กœ์„ธ์Šค๊ฐ€ ๊ณต์œ ๋œ ์ž์›์— ์ ‘๊ทผํ•˜๋ฉด ๋‹ค๋ฅธ ํ”„๋กœ์„ธ์Šค๋Š” ์ ‘๊ทผํ•˜์ง€ ๋ชปํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ -> Race Condit..

๐Ÿ“š CS/Operating System

[OS] 3. Threads

๋ณธ ๊ฒŒ์‹œ๊ธ€์€ PC๋ฒ„์ „์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Operating Systems, Internals and Design Principles (9th Ed.), William Stallings, Pearson, 2017 1. Processses and Threads ์“ฐ๋ ˆ๋“œ๋Š” ํ”„๋กœ์„ธ์Šค ๋‚ด๋ถ€์˜ ์‹คํ–‰ ๋‹จ์œ„. ์“ฐ๋ ˆ๋“œ๋ฅผ ๊ฐ€๋ฒผ์šด ํ”„๋กœ์„ธ์„œ๋ผ๊ณ ๋„ ๋ถ€๋ฅด๊ธฐ๋„ ํ•จ. ํ•˜๋‚˜์˜ ํ”„๋กœ์„ธ์Šค์— ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์“ฐ๋ ˆ๋“œ๊ฐ€ ์กด์žฌํ•  ์ˆ˜ ์žˆ๋‹ค. -> ๋ฉ€ํ‹ฐ์“ฐ๋ ˆ๋“œ ํ•˜๋‚˜์˜ ํ”„๋กœ์„ธ์Šค๋Š” ์ตœ์†Œํ•œ ํ•˜๋‚˜์˜ ์“ฐ๋ ˆ๋“œ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์•ผ ํ•จ. ํ”„๋กœ์„ธ์Šค๋Š” Code, Data, Stack, Register Context๋ฅผ ๊ฐ–๊ณ  ์žˆ์ง€๋งŒ ์“ฐ๋ ˆ๋“œ๋Š” Register Context์™€ Stack์œผ๋กœ ๊ตฌ์„ฑ. ๊ทธ๋ฆผ์—์„œ ๋ณด์ด๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์“ฐ๋ ˆ๋“œ๋Š” ํ”„๋กœ์„ธ์Šค์˜ ์ž์›์„ ๊ณต์œ . Single Thread์—..

๐Ÿ“š CS/Operating System

[OS] 2. Process Description and Control

๋ณธ ๊ฒŒ์‹œ๊ธ€์€ PC๋ฒ„์ „์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Operating Systems, Internals and Design Principles (9th Ed.), William Stallings, Pearson, 2017 1. What is a Process ํ”„๋กœ์„ธ์Šค๋Š” ์‹คํ–‰์ƒํƒœ์— ์žˆ๋Š” ํ”„๋กœ๊ทธ๋žจ. ํ”„๋กœ์„ธ์Šค๋Š” ๋ˆ„๊ฐ€ ๋งŒ๋“ค์–ด? 1. GUI๋ฅผ ํ†ตํ•œ ์ž…๋ ฅ์œผ๋กœ ์‚ฌ์šฉ์ž๊ฐ€ 2. ๋‹ค๋ฅธ ํ”„๋กœ์„ธ์Šค์— ์˜ํ•ด -> ๊ฒฐ๊ณผ์ ์œผ๋กœ๋Š” ์ปค๋„์ด ์ƒ์„ฑ 2. Process States Dispatcher์— ์˜ํ•ด ํ”„๋กœ์„ธ์Šค์—์„œ ๋‹ค๋ฅธ ํ”„๋กœ์„ธ์Šค๋กœ ์ „ํ™˜ ๊ฐ€๋Šฅ. Dispatcher๋Š” ๋ฌธ๋งฅ ์ „ํ™˜์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ฃผ๋Š” OS์˜ ๊ธฐ๋Šฅ. ํ”„๋กœ์„ธ์Šค๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์—ญํ• . Process Scheduling๋กœ ์šฐ์„  ์ˆœ์œ„์— ๋”ฐ๋ฅธ ์ „ํ™˜. Waiting time๊ณผ Priority์— ๊ธฐ๋ฐ˜ํ•˜..

๐Ÿ“š CS/Operating System

[OS] 1. Operating System Overview

๋ณธ ๊ฒŒ์‹œ๊ธ€์€ PC๋ฒ„์ „์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Operating Systems, Internals and Design Principles (9th Ed.), William Stallings, Pearson, 2017 1. Operating System ์šด์˜์ฒด์ œ๋Š” ํ”„๋กœ๊ทธ๋žจ์˜ ์‹คํ–‰์„ ์ปจํŠธ๋กค(?) ํ•˜๋Š” ์†Œํ”„ํŠธ์›จ์–ด์ด๋‹ค. ๋…๋ฆฝ์ ์ธ ์‹คํ–‰์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋ฏ€๋กœ ํ”„๋กœ๊ทธ๋žจ์ด๋ผ๊ณ  ๋ถ€๋ฅด์ง€ ์•Š๊ณ  ์†Œํ”„ํŠธ์›จ์–ด๋ผ ๋ถ€๋ฅธ๋‹ค. ํ”„๋กœ๊ทธ๋žจ์€ ๋…๋ฆฝ์‹คํ–‰์ด ๊ฐ€๋Šฅํ•ด์•ผํ•œ๋‹ค. ๋”ฐ๋ผ์„œ OS๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์•„๋‹ˆ๋ผ ์†Œํ”„ํŠธ์›จ์–ด๋กœ ๋ณด๋Š” ๊ฒŒ ๋งž๊ณ , ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ฐœ๋…์œผ๋กœ ๋ณด๋Š” ๊ฒŒ ๋งž๋‹ค. ํ”„๋กœ๊ทธ๋žจ๊ณผ ํ•˜๋“œ์›จ์–ด ์‚ฌ์ด์˜ ์ธํ„ฐํŽ˜์ด์Šค ์—ญํ• ์„ ์ˆ˜ํ–‰ํ•œ๋‹ค. (์ž์› ๊ด€๋ฆฌ) ์šด์˜์ฒด์ œ์˜ ๋ชฉ์ ์€ ํšจ์œจ์„ฑ๊ณผ ํŽธ๋ฆฌ์„ฑ์ด๋‹ค. (ํ•˜๋“œ์›จ์–ด๋ฅผ Efficiencyํ•˜๊ฒŒ ํ”„๋กœ๊ทธ๋žจ์„ Convenienceํ•˜๊ฒŒ.) 1)..

kodo_o
'๐Ÿ“š CS/Operating System' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก