๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ป CS/์šด์˜์ฒด์ œ13

[์šด์˜์ฒด์ œ] 12. Disk Management and Scheduling Disk Structure 1) Logical Block - ๋””์Šคํฌ์˜ ์™ธ๋ถ€์—์„œ ๋ณด๋Š” ๋””์Šคํฌ์˜ ๋‹จ์œ„ ์ •๋ณด ์ €์žฅ ๊ณต๊ฐ„๋“ค - ์ฃผ์†Œ๋ฅผ ๊ฐ€์ง„ 1์ฐจ์› ๋ฐฐ์—ด์ฒ˜๋Ÿผ ์ทจ๊ธ‰ - ์ •๋ณด๋ฅผ ์ „์†กํ•˜๋Š” ์ตœ์†Œ ๋‹จ์œ„ 2) Sector - Logical Block์ด ๋ฌผ๋ฆฌ์ ์ธ ๋””์Šคํฌ์— ๋งคํ•‘๋œ ์œ„์น˜ - Sector 0์€ ์ตœ์™ธ๊ณฝ ์‹ค๋ฆฐ๋”์˜ ์ฒซ ํŠธ๋ž™์— ์žˆ๋Š” ์ฒซ ๋ฒˆ์งธ ์„นํ„ฐ์ด๋‹ค (Booting๊ณผ ๊ด€๋ จ๋จ) Disk Management 1) Physical formatting (Low-level formatting) header, trailer์— metadata ์ €์žฅ - ๋””์Šคํฌ๋ฅผ ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ์ฝ๊ณ  ์“ธ ์ˆ˜ ์žˆ๋„๋ก ์„นํ„ฐ๋“ค๋กœ ๋‚˜๋ˆ„๋Š” ๊ณผ์ • (์š”์ฆ˜์€ ๋ฏธ๋ฆฌ formatting๋˜์–ด ๋‚˜์˜จ๋‹ค) - ๊ฐ ์„นํ„ฐ๋Š” header + ์‹ค์ œ data(512B) + trailer๋กœ ๊ตฌ.. 2023. 1. 29.
[์šด์˜์ฒด์ œ] 11. File System Implementation [์ด๋ก ] Allocation of File Data in Disk disk์— ํŒŒ์ผ์„ ์ €์žฅํ•  ๋•Œ๋Š” ๋™์ผํ•œ ํฌ๊ธฐ์˜ sector(logical block)๋กœ ๋‚˜๋ˆ„์–ด์„œ ์ €์žฅ 1) contiguous allocation 2) linked allocation 3) indexed allocation 1) Contiguous allocation ํ•˜๋‚˜์˜ file์ด disk ์ƒ์— ์—ฐ์†ํ•ด์„œ ์ €์žฅ๋˜๋Š” ๋ฐฉ๋ฒ• * ์žฅ์  1) ๋น ๋ฅธ I/O - HDD๋Š” disk head์˜ ์ด๋™ ์‹œ๊ฐ„์ด ๊ธด ํŽธ์ธ๋ฐ, ์—ฐ์† ํ• ๋‹น์„ ์“ฐ๋ฉด ํ•œ ๋ฒˆ์˜ seek/rotation์œผ๋กœ ๋งŽ์€ ์–‘์˜ data transfer ๊ฐ€๋Šฅ - process์˜ swap area๋กœ๋„ ์“ฐ์ž„ (์ž„์‹œ ์ €์žฅ์ด๊ธฐ ๋•Œ๋ฌธ์— ๊ณต๊ฐ„ ํšจ์œจ์„ฑ๋ณด๋‹ค๋Š” ์†๋„ ํšจ์œจ์„ฑ์ด ์ข‹์Œ) - real time file์šฉ์œผ๋กœ.. 2023. 1. 22.
[์šด์˜์ฒด์ œ] 10. File Systems File and File System 1) File - ์ด๋ฆ„์„ ํ†ตํ•ด ์ €์žฅํ•˜๋Š” collection : a named collection of related information - ๋น„ํœ˜๋ฐœ์„ฑ์˜ ๋ณด์กฐ๊ธฐ์–ต์žฅ์น˜์— ์ €์žฅ - ๋™์ผํ•œ ๋…ผ๋ฆฌ์  ๋‹จ์œ„๋กœ๋„ ์‚ฌ์šฉ๋จ (device special file) - create, read, write, reposition(lseek - ์–ด๋””๊นŒ์ง€ ์ฝ์—ˆ๋Š”์ง€ ํ‘œ์‹œํ•˜๋Š” ํฌ์ธํ„ฐ), delete, open, close * open : file์˜ ๋‚ด์šฉ์ด ์•„๋‹Œ metadata๋ฅผ disk์— ์˜ฌ๋ ค๋†“๋Š” ๊ฒƒ 2) File attribute(metadata) ํŒŒ์ผ์„ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ ๊ฐ์ข… ์ •๋ณด๋“ค - ํŒŒ์ผ ์ด๋ฆ„, ์œ ํ˜•, ์ €์žฅ๋œ ์œ„์น˜, ํŒŒ์ผ ์‚ฌ์ด์ฆˆ - ์ ‘๊ทผ ๊ถŒํ•œ(r/w/x), ์‹œ๊ฐ„(์ƒ์„ฑ, ๋ณ€๊ฒฝ, ์‚ฌ์šฉ), ์†Œ์œ ์ž ๋“ฑ.. 2023. 1. 22.
[์šด์˜์ฒด์ œ] 9. Virtual Memory ๋ฌผ๋ฆฌ์ ์ธ ๋ฉ”๋ชจ๋ฆฌ ๋ณ€ํ™”๋Š” OS๊ฐ€ ๊ด€์—ฌํ•˜์ง€ ์•Š์ง€๋งŒ Virtual Memory ๋ณ€ํ™”๋Š” OS๊ฐ€ ๊ด€์—ฌํ•œ๋‹ค! * ๋Œ€๋ถ€๋ถ„ paging ๊ธฐ๋ฒ•์„ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ๊ฐ€์ • Demand Paging ์š”์ฒญ์ด ์žˆ์œผ๋ฉด ๊ทธ ๋•Œ page๋ฅผ ๋ฉ”๋ชจ๋ฆฌ์— ์˜ฌ๋ฆฌ๋Š” ๊ฒƒ - I/O ์–‘์˜ ๊ฐ์†Œ (ํ•œ์ •๋œ ๋ฉ”๋ชจ๋ฆฌ ๊ณต๊ฐ„์„ ๋” ์˜๋ฏธ์žˆ๋Š” ์ •๋ณด๋กœ ์ฑ„์šธ ์ˆ˜ ์žˆ์Œ) - Memory ์‚ฌ์šฉ๋Ÿ‰ ๊ฐ์†Œ - ๋น ๋ฅธ ์‘๋‹ต ์‹œ๊ฐ„ - ๋” ๋งŽ์€ ์‚ฌ์šฉ์ž ์ˆ˜์šฉ Valid / Invalid bit์˜ ์‚ฌ์šฉ * invalid๋ž€? - ์‚ฌ์šฉ๋˜์ง€ ์•Š๋Š” ์ฃผ์†Œ ์˜์—ญ์ธ ๊ฒฝ์šฐ - ํŽ˜์ด์ง€๊ฐ€ ๋ฌผ๋ฆฌ์  ๋ฉ”๋ชจ๋ฆฌ์— ์—†๋Š” ๊ฒฝ์šฐ - ์ฒ˜์Œ์—๋Š” ๋ชจ๋“  page๊ฐ€ invalid bit๋กœ ์ดˆ๊ธฐํ™” - address translation ์‹œ์— invalid bit์ด set๋˜์–ด ์žˆ์œผ๋ฉด page fault -> [trap] CPU๊ฐ€ OS๋กœ.. 2023. 1. 22.