title
stringlengths
1
544
โŒ€
parent
stringlengths
0
57
โŒ€
created
stringlengths
11
12
โŒ€
editor
stringclasses
1 value
creator
stringclasses
4 values
edited
stringlengths
11
12
โŒ€
refs
stringlengths
0
536
โŒ€
text
stringlengths
1
26k
id
stringlengths
32
32
**Claude Shannon**
Computer Scientists
May 9, 2023
Alan Jo
Alan Jo
Jun 25, 2023
[Alan Turing](https://texonom.com/alan-turing-df61b5084e544ac58577d289983e0d28)
๊ตฌ๊ธ€ ํ•™์ˆ ๊ฒ€์ƒ‰ ๊ธฐ์ค€์œผ๋กœ ์„ธ์ƒ์—์„œ 4๋ฒˆ์งธ๋กœ ๋งŽ์ด ์ธ์šฉ๋œ ๋…ผ๋ฌธ์ธ <์ •๋ณดํ†ต์‹ ์˜ ์ˆ˜ํ•™์  ์ด๋ก >์ด๋ผ๋Š” ๋…ผ๋ฌธ์„ ๋ฐœํ‘œ [Entropy](https://texonom.com/entropy-35fdf9bb7fdd42edbd4277147ca0ec38) 1950~1986 ์—ฐ ํ‰๊ท  ๋ณต๋ฆฌ์ˆ˜์ต์œจ์ด 28% ๋กœ ์„ธ๊ณ„์ตœ๊ณ ์ˆ˜์ค€ [N gram Language Model](https://texonom.com/n-gram-language-model-e600ddf01e2645e1b1d76604454bc3c9) [One Time Pad](https://texonom.com/one-time-pad-0fd4b702a7854dca8263035014fa3914)
bc27d0c33de4438cb326957a169ed36a
Edsger Dijkstra
Computer Scientists
Aug 9, 2023
Alan Jo
Alan Jo
Aug 9, 2023
> [Edsger Dijkstra's One-Day Workweek - Cal Newport](https://calnewport.com/edsger-dijkstras-one-day-workweek)
569bf90716e64b468e888f51099c8beb
Grace Hopper
Computer Scientists
Sep 7, 2020
Alan Jo
Alan Jo
Jun 25, 2023
์ตœ์ดˆ๋กœ ์ปดํŒŒ์ผ๋Ÿฌ๋ฅผ ๋งŒ๋“ค๊ณ  ์ฒ˜์Œ์œผ๋กœ ๋””๋ฒ„๊น…(?)์„ ํ•œ ๊ทธ๋ ˆ์ด์Šค ํ˜ธํผ๋„ ์—ฌ์„ฑ 1947๋…„ ํ˜ธํผ๋Š” ๋งˆํฌ2์—์„œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ž‘์—…์„ ํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ, ๊ทธ ๋‚  ๋”ฐ๋ผ ์ฒœ๊ณต์นด๋“œ ์ž…๋ ฅ์ด ์ž˜ ์•ˆ๋˜์—ˆ๋‹ค. ๊ฒฐ๊ตญ, ๋ฆด๋ ˆ์ด ์•ˆ์— ์ฃฝ์–ด์žˆ๋Š” ๋‚˜๋ฐฉ ๋•Œ๋ฌธ์— ์ปดํ“จํ„ฐ๊ฐ€ ์ œ๋Œ€๋กœ ๋™์ž‘ํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ์‚ฌ์‹ค์„ ์•Œ๊ฒŒ ๋œ ๊ทธ๋ฆฌ๊ณ  ๊ทธ ๋‚˜๋ฐฉ์„ ์ž‘์—… ๋…ธํŠธ์— ๋ถ™์ด๋ฉด์„œ ์ตœ์ดˆ์˜ ์ปดํ“จํ„ฐ ๋ฒ„๊ทธ๋ผ๊ณ  ๋ฉ”๋ชจ๋ฅผ ๋‚จ๊ธด๋‹ค.
1b108f44e96a4899b18c1a6821869f48
Margaret ***Hamilton***
Computer Scientists
Sep 7, 2020
Alan Jo
Alan Jo
Jun 25, 2023
### software engineering ์ด๋ผ๋Š” ์šฉ์–ด๋ฅผ ์ฒ˜์Œ ์‚ฌ์šฉํ–ˆ๋‹ค ๋Œ€ํ•™์—์„œ ์ˆ˜ํ•™์„ ๊ณต๋ถ€ํ•œ ๊ทธ๋…€๋Š” ๋‚จํŽธ์˜ ๋ฐ•์‚ฌ ํ•™์œ„ ๊ณต๋ถ€๋ฅผ ์ง€์›ํ•˜๊ธฐ ์œ„ํ•ด MIT์—์„œ ํ”„๋กœ๊ทธ๋ž˜๋จธ๋กœ ์ผ์„ ์‹œ์ž‘ํ–ˆ๋‹ค. ๋‹น์‹œ ๊ทธ๋…€๋Š” ์ œ๋Œ€๋กœ๋œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ต์œก๋„ ๋ฐ›์ง€ ๋ชปํ•˜๊ณ  ๋ฐ”๋กœ ๋‚ ์”จ๋ฅผ ์˜ˆ์ธกํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ ๊ฐœ๋ฐœ์— ์ฐธ์—ฌ ๊ทธ ํ›„, ์‹œ์Šคํ…œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ „๋ฌธ๊ฐ€๊ฐ€ ๋˜์–ด ์•„ํด๋กœ11 ํ”„๋กœ์ ํŠธ์— ์ฐธ๊ฐ€ํ•˜๊ฒŒ ๋œ๋‹ค. ๋‹น์‹œ ์•„ํด๋กœ11 ํ”„๋กœ์ ํŠธ์—๋Š” SW๊ฐœ๋ฐœ์„ ์œ„ํ•œ ์˜ˆ์‚ฐ๊ณผ ์ผ์ •์ด ํฌํ•จ๋˜์–ด ์žˆ์ง€ ์•Š์•˜๊ณ , ์š”๊ตฌ ์‚ฌํ•ญ์—๋„ ์†Œํ”„ํŠธ์›จ์–ด ๋Œ€ํ•œ ์–ธ๊ธ‰์€ ์—†์—ˆ๋‹ค > [F/OSS Story - ํŽ˜์ด์ง€ 5 - ๋งŒํ™”๋กœ ๋‚˜๋ˆ„๋Š” ์ž์œ /์˜คํ”ˆ์†Œ์Šค ์†Œํ”„ํŠธ์›จ์–ด ์ด์•ผ๊ธฐ](https://joonecomics.wordpress.com/category/foss-story/page/5/)
ea62b054dc0a47d291b80dc976b5f8d8
Shumuel Winograd
Computer Scientists
Jun 25, 2023
Alan Jo
Alan Jo
Jun 25, 2023
5f38451bbad04b6da44260f93ca4eb43
Von Neumann
Computer Scientists
Apr 15, 2023
Alan Jo
Alan Jo
Jun 25, 2023
ef79cb1b1e9045d28caced75663e14f7
Alan Turing History
Alan Turing Notion
May 9, 2023
Alan Jo
Alan Jo
May 9, 2023
์ผ€์ž„๋ธŒ๋ฆฟ์ง€ ๋Œ€ํ•™๊ต ์ž…ํ•™ ํ”„๋ฆฐ์Šคํ„ด ์–‘์ž์—ญํ•™ ๋…ผ๋ฌธ์— ์˜๊ฐ์„ ๋ฐ›์Œ ๊ทธ ๋…ผ๋ฌธ์ด ์กด ํฐ ๋…ธ์ด๋งŒ์ด ์“ด ๊ฒƒ ํž๋ฒ ๋ฅดํŠธ๊ฐ€ ๊ธฐ๊ณ„๊ฐ€ ๋งŒ๋Šฅ์ด๋‹ค๋ผ๋Š” ์ฃผ์žฅ์„ ํ–ˆ๊ณ  ์„ธ๊ณ„์ˆ˜ํ•™ํ•™๊ณ„๊ฐ€ ์•”์šธํ–ˆ๋Š”๋ฐ ํ•™๊ต์—์„œ ๊ธฐ๊ณ„๊ฐ€ ๋งŒ๋Šฅ์ด ์•„๋‹ˆ๋‹ค๋ผ๋Š” ์˜๋ฏธ๋ฅผ ๊ฐ€์ง€๋Š” [๋ถˆ์™„์ „์„ฑ ์ •๋ฆฌ](https://texonom.com/e158a278de5b4a7fa97b509cbd2dc0bd) ๋ฅผ ์ฝ๊ณ  ์—ฐ์‚ฐ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์ž๋™ํ™”๋œ ๊ธฐ๊ณ„๋ผ๋Š” ๋ถ„์•ผ์— ํฅ๋ฏธ๋ฅผ ๊ฐ€์ง€๊ณ  ๊ณต๋ถ€ํ•˜๊ฒŒ ๋œ๋‹ค ๊ดด๋ธ์˜ ๋ถˆ์™„์ „์„ฑ ์›๋ฆฌ์˜ ๊ฐ„๋‹จํ•จ์— ์ƒˆ๋กœ ์ž์‹ ๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ์ฆ๋ช… ๊ทธ ๊ณผ์ •์—์„œ universial machine์ด๋ผ๋Š” ๋‹จ์–ด ๋‚˜์˜ด ์ด๋Ÿฐ ๋ฐฉ์‹์œผ๋กœ ๋žŒ๋‹ค๋Œ€์ˆ˜๋ฅผ ๋งŒ๋“ค์–ด์„œ ๋ถˆ์™„์ „์„ฑ ์›๋ฆฌ ์ฆ๋ช…ํ•œ ์•Œ๋ก ์†Œ ์ฒ˜์น˜๋ฅผ ๋”ฐ๋ผ ํ”„๋ฆฐ์Šคํ„ด์œผ๋กœ ๋– ๋‚จ ๋งŒ๋“ค์–ด๋ƒ„ 22์‚ด์— ์ˆ˜ํ•™๋ฐ•์‚ฌ๋˜๊ณ  ๋…ผ๋ฌธ ์—„์ฒญ ์“ด ์กด ํฐ ๋…ธ์ด๋งŒ๊ณผ ๊ต๋ฅ˜ ๋งจํ•˜ํƒ„ ํ”„๋กœ์ ํŠธ์— ์กด ํฐ ๋…ธ์ด๋งŒ์ด ์ฐธ์—ฌ ์•จ๋Ÿฐ ํŠœ๋ง์€ ์•”ํ˜ธ ์–€๊ทธ์„œ ์—๋“œ๋ฐ• ์ฐธ์—ฌ ๋…ผ๋ฌธ ์ „์Ÿ ๋๋‚˜๊ณ  ๋ƒ„ ๊ทผ๋ฐ ์ค‘๋‹จ๋จ ๋ชป์•Œ์•„๋ด์„œ ์ดํ›„์— ๋ช‡๋…„๋’ค ๊ตฌํ˜„๋˜์—ˆ๋Š”๋ฐ ๋‹น์‹œ ์„ธ๊ณ„์ ค๋น ๋ฅธ ์ปดํ“จํ„ฐ ํฐ๋…ธ์ด๋งŒ์ด edvac ๋ณด๊ณ ์„œ ๋ฏธ๊ตญ์„œ ์ป๋Š”๋ฐ ํŠœ๋ง๋จธ์‹  ์•„์ด๋””์–ด ์ฐธ๊ณ ํ–ˆ๋Š”์ง€ ํ™•์‹คํ•˜์ง€ ์•Š๋‹ค ์ดํ›„ ์˜๊ตญ ํ˜„์‹ค์— ๋ง‰ํ˜€ ๋งจ์ฒด์Šคํ„ฐ ๋Œ€ํ•™์— ๊ฐ€์„œ ์ธ๊ณต์ง€๋Šฅ ๊ณต๋ถ€ ์ˆ˜ํ•™๊ณผ ์ƒ๋ฌผํ•™ ๊ณต๋ถ€ํ•˜๋ฉฐ ๋…ผ๋ฌธ ์“ด๋‹ค ๊ณผ์—ฐ ๊ธฐ๊ณ„๋Š” ์ƒ๊ฐ์„ ํ• ์ˆ˜ ์žˆ์„๊นŒ๋ผ๋Š” ์งˆ๋ฌธ์œผ๋กœ ๋…ผ๋ฌธ ์‹œ์ž‘ ์ฒ ํ•™์  ๋…ผ๋ฌธcan machine think? Imitation Game ์—ฌ๊ธฐ์„œ ๋‚˜์˜ค๋Š” ๋ง , ๊ฐ•ํ™”ํ•™์Šต ๊ฐœ๋… ์†Œ๊ฐœ ๋ชจ๋“  ์ง€์„ฑ์˜ ์˜์—ญ์—์„œ ์ธ๊ฐ„๊ณผ ๊ธฐ๊ณ„์˜ ๊ฒฝ์Ÿ์„ ์˜ˆ์ธก ์ดํ›„ ์ž์—ฐ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ํŒจํ„ด์ด ์ƒ๊ธฐ๋Š” ๊ณผ์ •์„ ์ˆ˜ํ•™์ ์œผ๋กœ ์„œ์ˆ  ํ˜ธ๋ฅด๋ชฌ ํ™”ํ•™์น˜๋ฃŒ์ค‘ ์‚ฌ๊ณผ๋จน๊ณ  ์ž์‚ด ํฐ ์ด๋งŒ ๊ตฌ์กฐ ์ด๋ก ์  ์ฐฝ์‹œ์ž AI์˜ ์„ ๋‘์ž์ด์ž ํŠœ๋ง ํ…Œ์ŠคํŠธ์˜ ์–ด์› ์• ๋‹ˆ๊ทธ๋งˆ ๊ฐœ๋ฐœ์ž ์–ด๋ฆฐ์‹œ์ ˆ ํŠœ๋ง์€ ์นœ๊ตฌ๋ฅผ ๋˜์‚ด๋ฆฌ๊ณ  ์‹ถ์€ ๋งˆ์Œ์— ์–‘์ž์—ญํ•™๊ณผ ์ˆ˜ํ•™์— ์‹ฌ์ทจํ–ˆ๋‹ค ์—˜๋Ÿฐ ํŠœ๋ง์˜ ๊ธฐ๊ณ„์— ๋Œ€ํ•œ ์ฆ๋ช…์€ ๊ดด๋ธ์˜ ๋ถˆํ™•์ •์„ฑ ์›๋ฆฌ์— ๊ธฐ๋ฐ˜ํ•œ๋‹ค 2์ฐจ๋Œ€์ „ ์—๋‹ˆ๊ทธ๋งˆ ๋…์ผ ์ด uboat (undersea)์—์„œ ์‚ฌ์šฉํ•œ ์•”ํ˜ธํ™”๊ธฐ์ˆ  - 1943 - ์•จ๋Ÿฐ ํŠœ๋ง ์—๋‹ˆ์•…๋„ ์ˆ˜์†Œํญํƒ„ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ์œ„ํ•ด ๋งŒ๋“ค์–ด์ง„ ๊ฒƒ - 1946 - ๋ฏธ๊ตญ ํฐ ๋…ธ์ด๋งŒ์ด edvac ๋ณด๊ณ ์„œ๋กœ ํฐ ๋…ธ์ด๋งŒ ๊ตฌ์กฐ ์ •๋ฆฝ (1936 ์•จ๋ŸฐํŠœ๋ง์ด ์ œ์•ˆํ•œ ๋…ผ๋ฌธ๊ณผ ๊ฑฐ์˜ ๋น„์Šท - ํ•˜์ง€๋งŒ ํŠœ๋ง ์–ธ๊ธ‰ ์—†๋‹ค) ์—˜๋ž€ ํŠœ๋ง์ด ๋ณด๋‹ˆ ๋ถˆ์™„์ „ํ•ด๋ณด์ด๋Š” ๋ณด๊ณ ์„œ โ†’ ์˜๊ตญ์—์„œ ๋งŒ๋“ค์–ด์ฃผ์„ธ์š” ํ•ด์„œ ๋” ๋Œ€๋‹จํ•œ Proposed Electronic Calculator๋ผ๋Š” ๋…ผ๋ฌธ์„ ๋‚ธ๋‹ค Automatic Computing Engine ์œผ๋กœ ์ด๋ฆ„์ง“๋Š”๋‹ค edvac์„ ๋„˜์–ด ์„œ๋ธŒ๋ฃจํ‹ด ๊ฐ€๋Šฅํ•˜๊ฒŒ ๊ตฌ์กฐ ์„ค๊ณ„ํ–ˆ์ง€๋งŒ ๋„ˆ๋ฌด ๋ณต์žกํ•˜๋‹ค๊ณ  ์˜๊ตญ์—์„œ ๋ถˆ๊ฐ€๋Šฅํ•œ๊ฑฐ ์•„๋‹ˆ๋ƒ๊ณ  ๋ชป์•Œ์•„๋จน์Œ aceํ”„๋กœ์ ํŠธ ์ค‘๋‹จ๋จ 3๋…„๋’ค pilot ace๋ผ๋Š” ๊ณ„์†๊ธฐ๋กœ ์ œ์ž‘๋˜์„œ ์„ธ๊ณ„์—์„œ ๊ฐ€์žฅ ๋น ๋ฅธ ์ปดํ“จํ„ฐ๋กœ ๊ธฐ๋ก๋œ๋‹ค ๊ทธ ํ›„ ๊ถค๋ธ ์†Œ๊ฐœํ•ด์ค€ ๋งฅ์Šค๋‰ด๋จผ ๋”ฐ๋ผ ๋งจ์ฒด์Šคํ„ฐ ๋Œ€ํ•™ ๊ฐ€์„œ ์—ฐ๊ตฌ ๋ชจ๋‘ ์ดˆ์›”ํ•œ ์ธ๊ณต์ง€๋Šฅ์„ ๋งŒ๋“ค์–ด์•ผ๊ฒ ๋‹ค ํ•ด์„œ ์ˆ˜ํ•™์  ์ƒ๋ฌผํ•™ ๊ณต๋ถ€ ์‹œ์ž‘ 1950๋…„์— - computing machinery and intelligence๋ฅผ ๋งŒ๋“ ๋‹ค The imitation game์ด๋ผ๋Š” ์œ ๋ช…ํ•œ ๋‹จ์–ด๊ฐ€ ๋‚˜์˜จ๋‹ค โ†’ turing test ๋ผ๊ณ  ๋ถˆ๋ฆฌ๋ฉฐ ๋งค๋…„ ์„ธ๊ณ„์—์„œ ์—ด๋ฆฌ๊ณ  ์žˆ๋‹ค 2014๋…„์— ์œ ์ง„ ๊ตฌ์ŠคํŠธ๋งŒ์ด ์ตœ์ดˆ๋กœ ํŠœ๋ง ํ…Œ์ŠคํŠธ๋ฅผ ํ†ต๊ณผํ•œ๋‹ค ์ด ๋…ผ๋ฌธ ๋งˆ์ง€๋ง‰์œผ๋กœ ํ•œ๋ฌธ์žฅ์œผ๋กœ ์ •๋ฆฌ - ์ฒ ํ•™์  ๋…ผ๋ฌธ ์ดํ›„์— ์ง์ ‘ turochamp๋ฅผ ๊ฐœ๋ฐœํ•˜๊ฒŒ ๋˜์ง€๋งŒ ์ง„์งœ ์‹คํ–‰์—๋Š” ์‹คํŒจ - ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ณต์žก 2012๋…„๋„๊ฐ€ ๋˜์„œ์•ผ ๋งŒ๋“ ๋‹ค - ๊ฒฐ๊ณผ๋Š” ์ข‹์ง€ ๋ชปํ–ˆ์ง€๋งŒ morphogenesis๋ผ๋Š” ๊ฐœ๋… ์ž์—ฐ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ํŒจํ„ด์ด ์ƒ์„ฑ๋˜๋Š” ๊ณผ์ •์„ ์ˆ˜ํ•™์ ์œผ๋กœ ์„ค๋ช…ํ•˜๋Š” ๋…ผ๋ฌธ๋„ ๋‚ด๊ฒŒ ๋œ๋‹ค - ์ƒ๋ฌผํ•™ ๋…ผ๋ฌธ ์•„๋†€๋“œ ๋จธ๋ ˆ์ด๋ผ๋Š” ๋‚จ์ž์™€ ์—ฐ์ธ๊ด€๊ณ„ํ–ˆ์ง€๋งŒ ๋™์„ฑ์•  ์˜๊ตญ ๋ถˆ๋ฒ•์ด๋ผ์„œ ๊ตฌ๊ธˆ๋œ๋‹ค 2013๋…„์— ์˜๊ตญ์€ ๋™์„ฑ์• ๊ฒฐํ˜ผ์ด ํ•ฉ๋ฒ•ํ™”๋œ๋‹ค ํ˜ธ๋ฅด๋ชฌ์น˜๋ฃŒ๋ฅผ ๋ฐ›์œผ๋ฉฐ ์Šฌํ””์„ ๋ชป์ด๊ฒจ ์ฒญ์‚ฐ๊ฐ€๋ฆฌ๋ฅผ ๋งŒ๋“ค์–ด ์‚ฌ๊ณผ์— ๋„ฃ๊ณ  ์ž์‚ดํ•œ๋‹ค ์ดํ›„ ์˜๊ตญ์€ ์—๋‹ˆ๊ทธ๋งˆ๋ฅผ ๋‹ค๋ฅธ ๊ตญ๊ฐ€์— ๋ณด์•ˆ ํ™•์‹คํ•˜๋‹ค๊ณ  ํŒ”๊ณ  ์ž๊ธฐ๋“ค๋งŒ ํ•ด๋…ํ•ด์„œ ๊ทธ ์ •๋ณด ์‚ฌ์šฉํ•œ๋‹ค ์˜๊ตญ์€ ์ด๋ฅผ ๊ฐ์ถ”๊ธฐ ์œ„ํ•ด, ๋™์„ฑ์• ์ž ์•จ๋Ÿฐ ํŠœ๋ง์„ ๊ฐ์ถ˜๋‹ค the ultra secret์—์„œ ํŠœ๋ง์˜ ์—…์ ์ด ๋ฐํ˜€์ง„๋‹ค ์˜๊ตญ๊ณผ ์• ๋‹ˆ๊ทธ๋งˆ 2009๋…„์— ์•จ๋ŸฐํŠœ๋ง ์‚ฌ๋ฉด์šด๋™์ด ์ผ์–ด๋‚œ๋‹ค - 2010๋…„์— ์Šคํ‹ฐ๋ธ ํ˜ธํ‚น์ด ๊ฐ€์„ธํ•˜๊ณ  10๋Œ€ ์ธ๋ฌผ์— ์—˜๋Ÿฐ ํŠœ๋ง์ด ๋“ค์–ด๊ฐ€๊ณ  ์—˜๋ฆฌ์ž๋ฒ ์Šค 2์„ธ ์—ฌ์™•์˜ ํŠน๋ณ„์‚ฌ๋ฉด๊ถŒ์œผ๋กœ ๊ณต์‹ ์‚ฌ๋ฉด๋œ๋‹ค ์ปดํ“จํ„ฐ๊ณ„์˜ ๋…ธ๋ฒจ์ƒ์ธ ํŠœ๋ง์ƒ์ด ์ƒ๊ธด๋‹ค > [์•จ๋Ÿฐ ํŠœ๋ง - ํ˜„๋Œ€ ์ปดํ“จํ„ฐ ๊ณผํ•™์˜ ์•„๋ฒ„์ง€ (feat. ์„ธ๊ณ„ 2์ฐจ ๋Œ€์ „) [์ƒ]](https://www.youtube.com/watch?v=QasRpCP8qsI) > [2. ์•จ๋Ÿฐ ํŠœ๋ง๊ณผ ํฐ๋…ธ์ด๋งŒ](https://joone.net/2016/11/15/%ec%95%a8%eb%9f%b0-%ed%8a%9c%eb%a7%81%ea%b3%bc-%ed%8f%b0%eb%85%b8%ec%9d%b4%eb%a7%8c/)
b394066bcd2a49fb9e048836bbf1a212
Automatic Computing Engine
Alan Turing Notion
Mar 2, 2021
Alan Jo
Alan Jo
May 9, 2023
์ฒ˜์Œ์œผ๋กœ ๋ฉ”๋ชจ๋ฆฌ ๋‚ด์žฅ ์ด์šฉ cpu memory ์ž…๋ ฅ์žฅ์น˜ ์ถœ๋ ฅ์žฅ์น˜ ์„ค๊ณ„
a61d7bc038fe4e58a80989d1c3e6facf
OS Function
OS Notion
May 19, 2021
Alan Jo
Alan Jo
Jan 18, 2023
### OS Functions |Title| |:-:| |[Processor Scheduling](https://texonom.com/processor-scheduling-924d2fa78737494d82e74595de81219f)| |[Memory Management](https://texonom.com/memory-management-dbf37c509eaf46deb2df8ccd086e386c)| |[Disk Management](https://texonom.com/disk-management-f82047a4bc5a4bfb9960448cd13ac476)|
cc6a2b8fffb94340b51bc3f4a9c38862
OS History
OS Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jun 21, 2022
์ดˆ๊ธฐ ์ปดํ“จํ„ฐ๋“ค์€ [Punch Card](https://texonom.com/punch-card-dcb71893cc074afb9ec6865b43eaaa61) ๋ฅผ ์ž…,์ถœ๋ ฅ์— ์‚ฌ์šฉ ๋ฌผ๋ฆฌ์ ์œผ๋กœ ์ปดํ“จํ„ฐ ๋ฉ”๋ชจ๋ฆฌ์— ๋กœ๋“œํ•ด์„œ ์‹คํ–‰์‹œํ‚ค๊ณ  ์‹คํ–‰์ด ์™„๋ฃŒ๋˜๋ฉด ๋ฉ”๋ชจ๋ฆฌ ๋คํ”„๋ฅผ ํ•ด์„œ ์ถœ๋ ฅ์€ ์–ป์Œ [TTY](https://texonom.com/tty-d3c35ff3460343359b453c88a3bb896f) [Punch Card](https://texonom.com/punch-card-dcb71893cc074afb9ec6865b43eaaa61) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fc55655c1-5711-44cc-be47-ee9da8f95035%2FUntitled.png?table=block&id=2248fd3f-a36c-4f4b-a903-2b3d3c4d3548&cache=v2) ์ด ๊ณผ์ •์„ ์‚ฌ๋žŒ์ด ์ง์ ‘ ๋ฐ˜๋ณตํ•˜๋‹ค๊ฐ€ ํ”„๋กœ๊ทธ๋žจ์— ์˜ํ•ด ์ž๋™ํ™” ํ•˜๊ธฐ ์‹œ์ž‘ํ•œ๊ฒƒ์ด Operating System ์˜ ์‹œ์ž‘ > unix: bsd (now free bsd), system V: bsd: for ํ•™๋ฌธ: system V: ex. ์†”๋ผ๋ฆฌ์Šค >> init in bsd: getty >> init in system V: inittab >> those are psd 1 > > UNIX โ†’ GNU โ†’ Linux > โ†’ POSIX โ†’ BSD โ†’ MACOS > ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8666dfa6-0c1f-4d3f-be0c-245ae45e6ee4%2FScreenshot_20200509-172659_Chrome.jpg?table=block&id=c42adbe0-47e2-4bd2-8ae4-33e1627aba09&cache=v2) > [Introduction](https://mug896.github.io/bash-shell/tty.html)
0f04c35c56144da9a9646d935a4a69fd
OS Structure
OS Notion
May 19, 2021
Alan Jo
Alan Jo
Apr 3, 2023
[Software Architecture](https://texonom.com/software-architecture-5d3c80f6ffe44d60b10c870903c2b703)
### OS Structures |Title| |:-:| |[CLI](https://texonom.com/cli-3b46069e77904f7b8ce85faff6252cfc)| |[OS Kernel](https://texonom.com/os-kernel-631bce6131a64accb3a482df622ff957)| |[Disk System](https://texonom.com/disk-system-104aed644fd54c31a9938e4f7b3bae6f)| |[File System](https://texonom.com/file-system-7a340052fcaf48169a5c6da2610aa5cf)| |[I/O Systems](https://texonom.com/io-systems-1fe831bd09ae43909cccb33056a1dfc7)| ### OS Components |Title| |:-:| |[GUI](https://texonom.com/gui-936270e7b4af43e3929f69fcb6e1e2e4)|
a66cf2a9ea8f4841b64ca65fbec8b743
UNIX
OS Notion
Mar 18, 2021
Alan Jo
Alan Jo
Apr 25, 2023
## **UNiplexed Information Computing System** ### Unix Notion |Title| |:-:| |[POSIX](https://texonom.com/posix-6fd6ba0425f145fca4dea48a6dee1ce7)| |[Unix Philosophy](https://texonom.com/unix-philosophy-8f96f33ed93b4ea5a533303869abfa92)| |[UNIX Structure](https://texonom.com/unix-structure-f892f7c631854084a7a93cf8db918cc3)| |[Unix-like](https://texonom.com/unix-like-578ba7dbb07b44b3a2d3895ca103c5ec)| |[UNIX History](https://texonom.com/unix-history-34c9169587714b508aad541945d7571d)|
233213b96425492f925a8277650c5b28
Disk Management
OS Functions
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
[File System](https://texonom.com/file-system-7a340052fcaf48169a5c6da2610aa5cf)
### Need - Ram and disk price difference is still 10^2 - Memory is volatile - Disks as swap space for virtual memory system ### Disk Management Notion |Title| |:-:| |[Disk layout](https://texonom.com/disk-layout-5091a147a01a4ff2986c9d80e6aad326)| |[Disk Allocation methods](https://texonom.com/disk-allocation-methods-4a49727bed65460cb4db6426038b97b4)| |[Disk caching](https://texonom.com/disk-caching-f0d66b9112c24fbd9b6bb7f115da6af0)| |[Anatomy of hard-disk](https://texonom.com/anatomy-of-hard-disk-e4eca2717d6145a189df99f477adf720)| |[Disk Head Scheduling](https://texonom.com/disk-head-scheduling-e6e60cca761147059a1bf7717616c398)| |[Disk management](https://texonom.com/disk-management-2db57b8f7837407088208b308e51bbec)| |[RAID](https://texonom.com/raid-4b50ffdd255d430ca76f393e8d1ebe25)| |[Tertiary storage devices](https://texonom.com/tertiary-storage-devices-def6411e9adf4220811b65706895e6e3)| |[Disk Performance](https://texonom.com/disk-performance-28e569d80cbe4c3b9e68857ac92550ea)| > primary - secondary - tertiary
f82047a4bc5a4bfb9960448cd13ac476
Memory Management
OS Functions
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
### Memory Management Notion |Title| |:-:| |[Memory Management History](https://texonom.com/memory-management-history-baac71af6c7c4281894e15349bde6777)| |[Memory Management Method](https://texonom.com/memory-management-method-040223391bea4c148bcfee4f4064572f)| |[Memory Address Changing](https://texonom.com/memory-address-changing-53916e26496843d6bf5a26e6185ebe8d)| ### Memory Management Usage |Title| |:-:| |[Garbage Collector](https://texonom.com/garbage-collector-8af9f92e3ca842ee8ddd638e25647cd7)| |[Memory Leak](https://texonom.com/memory-leak-16c4f840b59e4d45a04770b03e582229)| ### reference bit > [Untitled](https://asfirstalways.tistory.com/140) ### associative register > [์—ฐ๊ด€๊ธฐ์–ต์žฅ์น˜, ๋ณต์ˆ˜ ๋ชจ๋“ˆ ๊ธฐ์–ต์žฅ์น˜](https://devkim93.tistory.com/entry/%EC%97%B0%EA%B4%80%EA%B8%B0%EC%96%B5%EC%9E%A5%EC%B9%98-%EB%B3%B5%EC%88%98-%EB%AA%A8%EB%93%88-%EA%B8%B0%EC%96%B5%EC%9E%A5%EC%B9%98)
dbf37c509eaf46deb2df8ccd086e386c
Processor Scheduling
OS Functions
Nov 5, 2019
Alan Jo
Seong-lae Cho
Aug 10, 2023
### Scheduling is small issue in OS but hard to optimize ### Processor Scheduling Notion |Title| |:-:| |[Processor Scheduler](https://texonom.com/processor-scheduler-8c124741c1e84d26b0b0a8ad599337f4)| |[Process](https://texonom.com/process-ffd68f9e2b2648759b96047d48d17778)| |[Interrupt](https://texonom.com/interrupt-d26d34c54d5447a6888ad85089184fb3)| |[Thread](https://texonom.com/thread-d704a229d3b94619963c61bb742b822b)| ### Processor Scheduling Usages |Title| |:-:| |[Processor Scheduling Algorithm](https://texonom.com/processor-scheduling-algorithm-305e26d3aca84cdd9e5c980e91642a8f)| |[Processor Scheduling Method](https://texonom.com/processor-scheduling-method-c5c243a128b74b2183508330aec1090c)| |[Processor Scheduling Evaluation](https://texonom.com/processor-scheduling-evaluation-b897d00ffba948e6922c062d95693455)| > [[OS] 5-2. CPU Scheduling II](https://asfirstalways.tistory.com/124)
924d2fa78737494d82e74595de81219f
Anatomy of hard-disk
Disk Management Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
# Anatomy of hard-disk - **platters **and **double of heads of platters** - since we can use upper and lower of platter - usually **sector **is 512 bytes - head need physical take off and landing - slow - **Disk address = (driver, surface, track, sector)** - Cylinder-based mapping - Seek time : The head is moved to the target track - latency : Rotational latency - Transfer time: Read/write the sector ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcee3253a-c7b1-499f-accc-489628ef3d46%2Ftemp.jpg?table=block&id=ab97e574-2861-4904-90ea-f9a11fccce0d&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F6578359c-9bba-4b35-80a4-ba9b4bd1ce17%2Ftemp.jpg?table=block&id=130aa835-3424-4abc-85c4-da18252e6633&cache=v2) ### Mapping algorithm or disk addressing <details><summary> Mapping from sector address to logical block address</summary> (surface j, track i, sector k) = k + s * (j + i*p) - Assuming p surfaces in the disk and s sectors per track. </details>
e4eca2717d6145a189df99f477adf720
Disk Allocation methods
Disk Management Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
### where should we allocate(save) in disk - contiguous allocation - has hole waste to cleanblock also has same sizesimple but - linked allocation (dynamic) - pointerif bad sector broken easily occur - indexed allocation - Has index blockhas pointer > do not trust memory - especially secondary memory > contiguous : ์ธ์ ‘ํ•œ
4a49727bed65460cb4db6426038b97b4
Disk caching
Disk Management Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
for slow disk performance **Buffer cache (in memory)** : cache file blocks in memory to capture locality in buffer cache or buffer cache - Idea: cache file blocks in memory to capture locality in buffer cache (or buffer cache) - this cache is system wide, shared by all processes - cache consistency issues can be occur **Page cache** - โ€“ Caches pages rather than disk blocks using virtual memory techniques. โ€“ Memory-mapped I/O uses a page cache. **Unified Buffer cache** -โ€“ A unified buffer cache uses the same page cache to cache both memory-mapped pages and ordinary file system I/O. โ€“ Avoids double caching and the possibility of inconsistencies between page caches and buffer caches.
f0d66b9112c24fbd9b6bb7f115da6af0
Disk Head Scheduling
Disk Management Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
More than one request in the disk queue - read or write ### Algorithms - FCFS - fair but ineffcient - fifo - SSTF - starvation possible - select minimum seek time - **usual algorithm** - SCAN - elevator algorithm - possibility of double time - double direction - C-SCAN - one direction since disk is round - **usual algorithm **- provide uniform wait time - LOOK - one direction until services all requests โ†’ reverse - C-LOOK - variant of C-SCAN - only goes as far as the last request in each direction
e6e60cca761147059a1bf7717616c398
Disk layout
Disk Management Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
cpu can't directly control disk so kernel has in-memory sturcture ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcf347120-7912-4dae-ae82-0b858e27757f%2Ftemp.jpg?table=block&id=cdd3a113-0151-4967-853c-5c59b1663de5&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8ba5baf0-04e8-425e-8fef-ec74cb81ac66%2FUntitled.png?table=block&id=79a04b2e-946f-4b24-93db-68bf497c9463&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F7338d4d4-8caa-4323-bf34-c27267abf197%2FUntitled.png?table=block&id=74744e50-5351-46a0-b807-98e79499f478&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F05994a8d-f0f0-4362-8359-d7984a89eab2%2FUntitled.png?table=block&id=eb9b0dd1-387a-4de2-ba9f-8f47759f634d&cache=v2)
5091a147a01a4ff2986c9d80e6aad326
Disk management
Disk Management Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
[Disk partitioning](https://texonom.com/disk-partitioning-129115f572724f5cbc570c7517151187) [Disk bad sector](https://texonom.com/disk-bad-sector-5cc7aac350854f0885cfa60f62bee9ce) [Disk Swap Space](https://texonom.com/disk-swap-space-5bf2726b42c14bf1abeeb90018408163)
2db57b8f7837407088208b308e51bbec
Disk Performance
Disk Management Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
### Performance - 1. cost, 2. speed & bandwidth, 3. reliability optical disk - permanent data storage โ†’ cloud in temporary ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fc5563700-295a-4a9d-8f1e-604d5a19d691%2FUntitled.png?table=block&id=8e30c91b-677f-420a-93ea-e7e39f363dd2&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fda675d40-dc07-49e5-b1a5-5505aeed791b%2FUntitled.png?table=block&id=dd0f8f2c-c868-4f57-b9b1-0520b0e86759&cache=v2)
28e569d80cbe4c3b9e68857ac92550ea
RAID
Disk Management Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jun 7, 2021
## redundant array of inexpensive disks [Hardware RAID](https://texonom.com/hardware-raid-861083a0395649d18fa43e8b5dec9f51) ### RAID level - originally 5 level [RAID 0](https://texonom.com/raid-0-5b52502a6406464689c2bf557f5d3b47) [RAID 1](https://texonom.com/raid-1-b4b2a03a0193424e8fa40b4ee7488be7) [RAID 2](https://texonom.com/raid-2-1b24579f29674f05a13c00b5075f2739) [RAID 3 ](https://texonom.com/raid-3-4cc5f5d7b3c84145825a3f9bc4975ec9) [RAID 4](https://texonom.com/raid-4-f4db629dc21d4e58a8ad908a83be049f) [RAID 5](https://texonom.com/raid-5-afdf3a4add0a4374958c915fea1f83ef) Usual tech of server and NAS and data center ### Two design goals of various RAIDs 1. increased data reliabilitymirroring data 2. increased input/output performance trade-off between reliability and performance > even parity, odd parity for detect block failure > Striping : Disk striping - look at the diagrams which are like stripes
4b50ffdd255d430ca76f393e8d1ebe25
Tertiary storage devices
Disk Management Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
ex. usb, sd card, external disk [HSM](https://texonom.com/hsm-95b2b5fc37ca4982aed9c39ffe45ecb2)
def6411e9adf4220811b65706895e6e3
Disk bad sector
Disk management
null
null
null
null
null
[Disk bad sector remapping](https://texonom.com/disk-bad-sector-remapping-f18741071ab949c29a01c238403a0630)
5cc7aac350854f0885cfa60f62bee9ce
Disk partitioning
Disk management
null
null
null
null
null
129115f572724f5cbc570c7517151187
Disk Swap Space
Disk management
null
null
null
null
null
temporal image space of main memory ### Swap File approach ### Swap partition Approach - Swapping By File system read but slow because of using VFS but do not need partition - or do not need file system just image dump to this sector > rule of the thumb - twice of main memory
5bf2726b42c14bf1abeeb90018408163
Disk bad sector remapping
Disk bad sector
null
null
null
null
null
f18741071ab949c29a01c238403a0630
Hardware RAID
RAID
null
null
null
null
null
ํ•˜๋“œ์›จ์–ด ๋””๋ฐ”์ด์Šค๋ฅผ ํ†ตํ•ด RAID๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒฝ์šฐ ์šด์˜์ฒด์ œ์™€ ํŒŒ์ผ์‹œ์Šคํ…œ์€ RAID ๋ฉ”์ปค๋‹ˆ์ฆ˜์„ ์ธ์‹ํ•˜์ง€ ๋ชปํ•จ ์ „์šฉ ํ•˜๋“œ์›จ์–ด์ธ RAID card ์ž์ฒด์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ ์ „์ฒด ๋””์Šคํฌ array๊ฐ€ ๋ฌด์šฉ์ง€๋ฌผ์ด ๋˜๋Š” ๊ฒฝ์šฐ๋„ > [๋„ค์ด๋ฒ„ ํด๋ผ์šฐ๋“œ ํ”Œ๋žซํผ (NAVER Cloud Platform) : ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ](https://blog.naver.com/n_cloudplatform/222384170516)
861083a0395649d18fa43e8b5dec9f51
RAID 0
RAID
null
null
null
null
null
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F82335579-cbcb-400a-8260-2f4bcbb2ec06%2Ftemp.jpg?table=block&id=f24a948f-aad6-45fc-bd58-2d347fbc8e6c&cache=v2) - RAID 0 - striped disks
5b52502a6406464689c2bf557f5d3b47
RAID 1
RAID
null
null
null
null
null
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F82335579-cbcb-400a-8260-2f4bcbb2ec06%2Ftemp.jpg?table=block&id=49941f40-28e1-47fd-9f36-f7f78bd839f9&cache=v2) - RAID 1 - disk mirroring
b4b2a03a0193424e8fa40b4ee7488be7
RAID 2
RAID
null
null
null
null
null
1b24579f29674f05a13c00b5075f2739
RAID 3
RAID
null
null
null
null
null
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Faafcb581-cf0c-4683-9ed0-c28bf5c9f412%2Ftemp.jpg?table=block&id=48020019-2481-4287-8a7e-3d635536caf4&cache=v2) - RAID 3 - Striped set with dedicated parityidea of redundant disk to increase reliability - many disk decrease reliabilitybut update parity block overhead and bottle neck to parity disk
4cc5f5d7b3c84145825a3f9bc4975ec9
RAID 4
RAID
null
null
null
null
null
f4db629dc21d4e58a8ad908a83be049f
RAID 5
RAID
null
null
null
null
null
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ffeb998d5-2d36-4dc7-bf82-eb682687d18e%2Ftemp.jpg?table=block&id=a2fc4fbf-b4bb-419f-b0a9-2b231d62e11d&cache=v2) - RAID 5 - Striped set with distributed parity
afdf3a4add0a4374958c915fea1f83ef
HSM
Tertiary storage devices
null
null
null
null
null
95b2b5fc37ca4982aed9c39ffe45ecb2
Memory Address Changing
Memory Management Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
- **Physical address space** - Starting at address 0, going to address MAXsys - **Logical address space** - Starting at address 0, going to address MAXprog **CPU(code) execute instructions by logical address** > **relative address** is an example of logical addres**s** ### Address Generation ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd35ce2bf-0ec6-44eb-a128-e63e6089a756%2FUntitled.png?table=block&id=2d6934fd-f96f-4c0d-a731-09f64ece4df1&cache=v2) until linking, code has relative address and after loading to memory, it has physical address โ†’ Hardware for Address Translation (For adequate performance) โ† dynamically โ€œrelocatedโ€ - **Base (also called Relocation) Register **- used for validation in CPU (either limit R) - **Limit Register -** size of program ## Linking combining various pieces of code and data into a single file that can be loaded into memory <details><summary> Linkerโ€™s tasks</summary> 1. **Symbol resolution** : each **global symbol** in an object file is bound to a **unique definition** 2. **Relocation** : the physical **memory address for each symbol is determined **and where **references **to those objects are modified **either** </details> <details><summary> kind of linker</summary> 1. static linker(`linkage editorโ€™) - Object modules combine while Compile time 2. dynamic linker - Useful with language libraries (no duplicated copies) - done in Load time or Run time </details> ### Shared library - Static libraries disadvantages - Potential for duplicating- **ex. libc.a** - automatically occur when executable - also occur by user code dlopen() - routines can be shared by multiple processes **ex. ****[libc.so](http://libc.so)**
53916e26496843d6bf5a26e6185ebe8d
Memory Management History
Memory Management Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
# Backgrounds Multi programming by time sharing Need multiple processes in memory at once (number of I/O + CPU) **So we need protected updating** **Memory management = **The task that is carried out by the โ€œ**OS and hardware(MMU)**โ€ to accommodate multiple processes and **fully use memory resources **to maximize performance **Requirement - **Each process should have a logically contiguous space โ†’ virtual memory, make user do not consider memory while make program ### **Goal - protect, performance(fully use) and sharing**
baac71af6c7c4281894e15349bde6777
Memory Management Method
Memory Management Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
### Memory Management Methods |Title| |:-:| |[Virtual Memory](https://texonom.com/virtual-memory-07bf10ba636b42e9818c009b17f893f0)| |[Paging](https://texonom.com/paging-0571138c29914318a5f6a717cc2b36c0)| |[Dynamic Partitioning](https://texonom.com/dynamic-partitioning-ec4c829bbfec46d28f441044264eb5a7)| |[Fixed partitioning](https://texonom.com/fixed-partitioning-068a5eb6e57b4146926dc02fc828b649)| |[Segmentation](https://texonom.com/segmentation-9927cad8b8bf4366abdc591e533e1060)|
040223391bea4c148bcfee4f4064572f
Dynamic Partitioning
Memory Management Methods
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
- make partition when process input come - Each process is allocated exactly as much memory as it requires - Has external fragment (hole is external with no internal) - Use compaction to shift processes to free memory by external (less use by i/o problem) > **Compaction is possible only if relocation is dynamic, and is done at execution time** > I/O problem - Do I/O only into Operating System buffers <details><summary> Possible algorithms of placement</summary> 1. Best-fit - The fragment as small as possible 2. First-fit 3. Next-fit: choose first hole from last placement 4. Worst-fit: allocate the largest hole </details> > **Overlays** - choose memory layout by program call graph to efficient memory distribute by function module code
ec4c829bbfec46d28f441044264eb5a7
Fixed partitioning
Memory Management Methods
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
Partitions can be of equal or unequal sizes set by hardware - has internal fragmentation (Unequal-size partitions lessens these) - A program may be too large โ†’ design the program with overlays ### queue(s) fixed partitioning Placement algorithm with โ€œunequal sizeโ€ partitions use of multiple queues(minimize internal fragmentation) โ†’ some queue will empty โ†’ use of single queue (increase internal fragmentation) > internal means internal of partition
068a5eb6e57b4146926dc02fc828b649
Paging
Memory Management Methods
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
### Physical address space of a process can be non-contiguous (Pages are contiguous) - Keep track of all free frames - internal fragment - Set up a page table to translate logical to physical addresses - A virtual (logical) address is a pair (p, o) - Physical memory address is a pair (f, o) - Not all pages are mapped to frames **๋‚ด๋ถ€ ๋‹จํŽธํ™” O, ์™ธ๋ถ€ ๋‹จํŽธํ™” X** **๊ณ ์ •๋œ ์˜์—ญ์ธ ํŽ˜์ด์ง€(page)๋กœ ๋ถ„ํ• ** ### Paging Notion |Title| |:-:| |[Page Replacement Algorithm](https://texonom.com/page-replacement-algorithm-3721241bd6b84fd9b55960f82ecf1fbe)| |[Paging Table](https://texonom.com/paging-table-b368ef8543cf4628b837232f4fd7fe7c)| |[Associative Register](https://texonom.com/associative-register-538b0ad40e84419795da36b76959786f)| |[Paging Protection ](https://texonom.com/paging-protection-b0940a815ff94260bcae736355499b4b)| |[Hierarchical paging](https://texonom.com/hierarchical-paging-2b45d0a7145b4ae98735812f9f771786)| |[Segmentation Paging](https://texonom.com/segmentation-paging-dfb1e2f233f1401daf3f8dc74466a57e)| |[Buddy System](https://texonom.com/buddy-system-b83b6f21d398442a84ff9c4fcd2ce295)| ### Paging Usage |Title| |:-:| |[Paging Example](https://texonom.com/paging-example-35326cf37c694b23ab5bab18de683b9f)| > [์„ธ๊ทธ๋จผํ…Œ์ด์…˜(segmentation) VS ํŽ˜์ด์ง•(paging)](https://blog.naver.com/PostView.nhn?blogId=qbxlvnf11&logNo=221368476938&parentCategoryNo=&categoryNo=&viewDate=&isShowPopularPosts=false&from=postView)
0571138c29914318a5f6a717cc2b36c0
Segmentation
Memory Management Methods
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
### more classical method before paging but used in virtual address image **๊ฐ€๋ณ€์ ์ธ ์˜์—ญ์ธ ์„ธ๊ทธ๋จผํŠธ(segment)๋กœ** **๋‚ด๋ถ€ ๋‹จํŽธํ™” X, ์™ธ๋ถ€ ๋‹จํŽธํ™” O** - like paging - it has segment table also in each process Logical address consists of a two tuple - <segment-number, offset> Segment-table base register (STBR), Segment-table length register (STLR) exist - **has segment number s(identify segment) and d index(of process entry)- Maps two-dimensional physical addresses**each entry has base and limit ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fa58476a4-a0c8-4077-aa61-4aa199746880%2FUntitled.png?table=block&id=2c19b285-1a31-4664-8470-b281f9517a36&cache=v2) Has also relocation, sharing, allocation issue for fragmentation ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F74859a9e-2904-49ab-80d3-450c8e24a75c%2FUntitled.png?table=block&id=4927863d-e58e-41d0-9615-2fa88e16f7fa&cache=v2) > [์„ธ๊ทธ๋จผํ…Œ์ด์…˜(segmentation) VS ํŽ˜์ด์ง•(paging)](https://blog.naver.com/PostView.nhn?blogId=qbxlvnf11&logNo=221368476938&parentCategoryNo=&categoryNo=&viewDate=&isShowPopularPosts=false&from=postView)
9927cad8b8bf4366abdc591e533e1060
Virtual Memory
Memory Management Methods
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
## Demand paging = virtual memory ### Motive : In any hardware, same code(address) should have same data (memory management by maintaining logical semantic) virtual address: logical address **Concept : separating of user logical memory from physical memory** > - Symbolic Address : access variable by name > - address binding : variable mapping to address and physical memory when compile **Insight : program do not need all of their code and data at once, so we can separate (but of course have overhead)** > - Implementation : demand paging **effect : VM enables program to execute without requiring their entire address space to be resident in physical memory. isolate each process's memory, enable share files and address spaces.** ### Virtual Memory Notion |Title| |:-:| |[Page Table](https://texonom.com/page-table-ffbce6c10d9a4a8993bd0d809f4a4249)| |[Segmentation Fault](https://texonom.com/segmentation-fault-b1008afd3e3a4117a92c978ba3dc0c14)| |[Page Replacement](https://texonom.com/page-replacement-936ec615a0554950bc1ab233fb67434f)| |[page size](https://texonom.com/page-size-c50803e5e52b492c847de02404f0be36)| |[TLB reach](https://texonom.com/tlb-reach-afd1dceecb9542c086eab1d89b938824)| |[Swapping](https://texonom.com/swapping-98903f7a115e48808b17fc418468c8e3)| |[Page fault handler](https://texonom.com/page-fault-handler-b4d166a24a7740a9bc153f80701a03bc)| |[Virtual Memory Thrashing](https://texonom.com/virtual-memory-thrashing-f57fa2a2a76244278cca8ad66badd63f)| |[i/o interlock](https://texonom.com/io-interlock-458727109a584d01b1087036dd6922bc)| |[Pages Arguments](https://texonom.com/pages-arguments-287308a9ec104a0eb0c4e01b157c8831)| |[TLB (Translation Lookaside Buffer)](https://texonom.com/tlb-translation-lookaside-buffer-fd5ffc7e77c44f57a744915cc426c27e)| ### Virtual Memory Notion Usages |Title| |:-:| |[Linux Paging](https://texonom.com/linux-paging-dddeb1bb20e64c67bf7d38ae744e625c)| |[COW(copy-on-write)](https://texonom.com/cowcopy-on-write-b41107af21f04feb923f02eeaf677017)| |[Memory-Mapped Files](https://texonom.com/memory-mapped-files-09442c8a229e475083829ddf52eca697)| > [8๊ฐ•. ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ](https://marlinbar.tistory.com/68?category=300896)
07bf10ba636b42e9818c009b17f893f0
Associative Register
Paging Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
parallel search - if associative register exist <details><summary> Address translation (Aยด, Aยดยด) </summary> โ€“ If Aยด is in associative register, get frame number out โ€“ Otherwise, get frame number from page table in memory </details> ### Effective Access time Associative lookup = `math: \epsilon `time unit - related to hardware performanc Assume memory cycle time is 1 microsecond Hit ratio (`math: \alpha`) - related to algorithm $$EAT = (1 + \epsilon)\alpha + (2 + \epsilon)(1 - \epsilon) \\ = 2 + \epsilon - \alpha$$
538b0ad40e84419795da36b76959786f
Buddy System
Paging Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
- used with virtual memory system either - combination of fixed and dynamic Compromise to overcome disadvantages of both fixed and dynamic partitioning schemes <details><summary> **Alogorithm**</summary> 1. Start with entire block 2. When request of size S is made > ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fa14d3c04-3016-4f0e-a409-5db1a488c95a%2FUntitled.png?table=block&id=1372aeb8-b364-4946-8e46-1cc0c6ac5fc5&cache=v2) 3. this process is repeated until the smallest block greater or equal to S is generated. 4. Two buddies are coalesced whenever both of them become de-allocated. > Given the address and size of a block, the address of buddy is automatically determined. The address of a block and its buddy differ in exactly one bit position > **binary branch framework and buddy(share one parent) is has different bit of final address** </details> ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F95bed60f-0f6b-4160-993d-7960c4d49888%2FUntitled.png?table=block&id=f3fd7300-747a-4204-b62f-8b947fe5c206&cache=v2) > modified form is used in UNIX SVR4 (and also in Linux) for kernel memory allocation (KMA) > Smallest size of block is page ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F4085edf3-c409-4719-b832-70c192b29e91%2FUntitled.png?table=block&id=5c4d8207-1c56-4bf2-9233-3a534cbe810d&cache=v2)
b83b6f21d398442a84ff9c4fcd2ce295
Hierarchical paging
Paging Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
โ€“ A simple technique is a two-level page table โ€“ Break up the logical address space into multiple page table Has page offset either but **has multi page number in logical address** ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8138952b-d75a-443f-92a3-5dfbabd137b2%2FUntitled.png?table=block&id=5b07a593-5c04-4e1e-a521-806dc03a80fe&cache=v2) last page number indicate page of page table,other is root or outer page table
2b45d0a7145b4ae98735812f9f771786
Page Replacement Algorithm
Paging Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
### Page Replacement Algorithms |Title| |:-:| |[LRU Algorithm](https://texonom.com/lru-algorithm-1f181112165f4df8b5a5cdea967d65c1)| |[Clock Algorithm](https://texonom.com/clock-algorithm-80f852e82a0548f5856f09baf11f6cf1)| |[Second Chance Algorithm](https://texonom.com/second-chance-algorithm-afdfb27ecaac4854902ba38eec679e41)| |[FIFO Algorithm](https://texonom.com/fifo-algorithm-80eb13636a8f4edc8861c04033c9d637)| |[LFU Algorithm](https://texonom.com/lfu-algorithm-db665029bdb84a42a98099c471ec744b)| > [์šฐ์ฃผ๋ฅผ ์œ„ํ•ด : ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ](https://blog.naver.com/oidoman/90097323379) > [LRU ์•Œ๊ณ ๋ฆฌ์ฆ˜ (Least Recently Used Algorithm)](https://j2wooooo.tistory.com/121)
3721241bd6b84fd9b55960f82ecf1fbe
Paging Protection
Paging Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
**Memory protection bits** - Implemented by associating protection bit with each page - e.g. read-only, read-write, in page table **valid/invalid bit** - changed by other page in same frame ### Sharing is easy - just indicate same frame and make it both valid
b0940a815ff94260bcae736355499b4b
Paging Table
Paging Notion
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
### Paging Tables |Title| |:-:| |[Hashed page table](https://texonom.com/hashed-page-table-5503e136b5d94731911edb2a21ccd4c9)| |[Inverted page table](https://texonom.com/inverted-page-table-25d3365925cf4aea9b9eb834c1c6bbad)| ### One table (mean one image) for each process: part of processโ€™s state <details><summary> Contents</summary> 1. Flags: valid/invalid (also called resident) bit, dirty bit, reference (also called clock or used) bit used for clock page change algorithm 2. Page frame number </details> Page table is kept in main memory - Page-table base register (PTBR) points to the page table of each process - Page-table length register (PTLR) indicates size of the page table of each process > use tlb to lessen memory access overhead to find page page table size is pretty big โ†’ โ€“** Only need to map the portion of the address space actually being used** (tiny fraction of entire address space) Approach Methods > โ€“ Multi-level(Hierarchical) paging, Hashed page table, Inverted page table
b368ef8543cf4628b837232f4fd7fe7c
Segmentation Paging
Paging Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
- **Use segments to manage logically related units** - **Use pages to partition segments into fixed size chunks **- first go to segment table (protection easy) > Need to allocate page table entries only for those pieces of the segments that have themselves been allocated. > ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd370d686-0d0a-4b36-9304-1c52bb619bfa%2FUntitled.png?table=block&id=33d0e559-e0c3-4c22-9dcb-38bbc8eeb185&cache=v2) > ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F5c5ffdbb-d91c-4b65-b989-fde20a0389cf%2FUntitled.png?table=block&id=69399c6b-6efa-4b2e-a6bc-3665fc417f01&cache=v2) **Logical (virtual) address โ†’ Linear address โ†’ Physical address (intel 32 architecture)** ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd6130a43-2117-4675-acf7-49442a5ed895%2FUntitled.png?table=block&id=8bd0a58e-360f-499a-b136-4a2bd00ce504&cache=v2) Segmentation: logical partition of memory - Segment Selector bits exist (segmentation register store segment selector bits usually) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff8645193-e5ef-4450-a3af-26da99b9b36c%2FUntitled.png?table=block&id=2b2edf19-d47f-4964-9766-a221553cf019&cache=v2) > Offset means relative address
dfb1e2f233f1401daf3f8dc74466a57e
Clock Algorithm
Page Replacement Algorithms
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
second-chance๋ณด๋‹ค ๋”ย  ํšจ์œจ์ ์ธ FIFO๋ฒ„์ „์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ queue์˜ ํŽ˜์ด์ง€๋ฅผ ์ด๋™์‹œํ‚ค์ง€ ์•Š๋Š”๋‹ค. clock ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ์ˆœํ™˜ํ˜• ๋ฆฌ์ŠคํŠธ๋ฅผ ์œ ์ง€ํ•˜๊ณ , ๊ฐ€์žฅ ์˜ค๋ž˜๋œ ํŽ˜์ด์ง€๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š” hand(iterator)๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค ํŽ˜์ด์ง€ ํดํŠธ๊ฐ€ ๋ฐœ์ƒํ–ˆ๊ณ  ๋นˆ ํ”„๋ ˆ์ž„์ด ์—†๋‹ค๋ฉด, hand๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๊ณ  ์žˆ๋Š” ํŽ˜์ด์ง€์˜ ์ฐธ์กฐ๋น„ํŠธ๋ฅผ ๊ฒ€์‚ฌ ๋งŒ์•ฝ ์ฐธ์กฐ๋น„ํŠธ๊ฐ€ ํด๋ฆฌ์–ด ์ƒํƒœ๋ผ๋ฉด hand๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๊ณ  ์žˆ๋Š” ํŽ˜์ด์ง€๊ฐ€ ์ƒˆ๋กœ์šด ํŽ˜์ด์ง€๋กœ ์‚ฌ์šฉ ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ์ฐธ์กฐ๋น„ํŠธ๋ฅผ ํด๋ฆฌ์–ด์‹œํ‚จ๋‹ค. ๊ทธ ๋‹ค์Œ hand๋Š” ์ฆ๊ฐ€ํ•˜๊ณ , ํŽ˜์ด์ง€๊ฐ€ ๊ต์ฒด๋  ๋•Œ๊นŒ์ง€ ์ด ๊ณผ์ •์ด ๋ฐ˜๋ณต > [์šฐ์ฃผ๋ฅผ ์œ„ํ•ด : ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ](https://blog.naver.com/oidoman/90097323379)
80f852e82a0548f5856f09baf11f6cf1
FIFO Algorithm
Page Replacement Algorithms
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
**FIFO**ย : ํŽ˜์ด์ง€๊ฐ€ ์ฃผ๊ธฐ์–ต์žฅ์น˜์—ย ์ ์žฌ๋œ ์‹œ๊ฐ„์„ ๊ธฐ์ค€์œผ๋กœ ๊ต์ฒด๋  ํŽ˜์ด์ง€๋ฅผ ์„ ์ •ํ•˜๋Š” ๊ธฐ๋ฒ• ๋‹จ์  : ์ค‘์š”ํ•œ ํŽ˜์ด์ง€๊ฐ€ ์˜ค๋ž˜ ์žˆ์—ˆ๋‹ค๋Š” ์ด์œ ๋งŒ์œผ๋กœ ๊ต์ฒด๋˜๋Š” ๋ถˆํ•ฉ๋ฆฌ. ๊ฐ€์žฅ ์˜ค๋ž˜ ์žˆ์—ˆ๋˜ ํŽ˜์ด์ง€๋Š” ์•ž์œผ๋กœ ๊ณ„์† ์‚ฌ์šฉ๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์Œ. [Belady's Anomaly](https://texonom.com/beladys-anomaly-d5dfd0e9467f4aa1a7ba5d584c4c6d0c)
80eb13636a8f4edc8861c04033c9d637
LFU Algorithm
Page Replacement Algorithms
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
**LFU**ย : ๊ฐ€์žฅย ์ ์€ ํšŸ์ˆ˜๋ฅผ ์ฐธ์กฐํ•˜๋Š” ํŽ˜์ด์ง€๋ฅผ ๊ต์ฒด ๋‹จ์  : ์ฐธ์กฐ๋  ๊ฐ€๋Šฅ์„ฑ์ด ๋งŽ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ํšŸ์ˆ˜์— ์˜ํ•œ ๋ฐฉ๋ฒ•์ด๋ฏ€๋กœ ์ตœ๊ทผ์— ์‚ฌ์šฉ๋œ ํ”„๋กœ๊ทธ๋žจ์„ย ๊ต์ฒด์‹œํ‚ฌ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๊ณ , ํ•ด๋‹น ํšŸ์ˆ˜๋ฅผ ์ฆ๊ฐ€์‹œํ‚ค๋ฏ€๋กœ ์˜ค๋ฒ„ํ—ค๋“œ ๋ฐœ์ƒ
db665029bdb84a42a98099c471ec744b
LRU Algorithm
Page Replacement Algorithms
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
## Least Recently Used Algorithm ๊ฐ€์žฅ ์˜ค๋žซ๋™์•ˆ ์ฐธ์กฐ๋˜์ง€ ์•Š์€ ํŽ˜์ด์ง€๋ฅผ ๊ต์ฒด
1f181112165f4df8b5a5cdea967d65c1
Second Chance Algorithm
Page Replacement Algorithms
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
FIFO์˜ ๋ณ€ํ˜•๋œ ํ˜•ํƒœ์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ FIFO์™€ ๊ฐ™์ด ์ œ๊ฑฐ๋  ํŽ˜์ด์ง€๋ฅผ queue์˜ ์ฒซ๋ฒˆ์งธ ์š”์†Œ๋กœ๋ถ€ํ„ฐ ์ฐพ๋Š”๋‹ค ๊ทธ๋Ÿฌ๋‚˜ ์ฆ‰์‹œ ํŽ˜์ด์ง€๋ฅผ ์ œ๊ฑฐํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, ๊ทธ ํŽ˜์ด์ง€์˜ ์ฐธ์กฐ๋น„ํŠธ๊ฐ€ ์„ธํŒ…๋˜์–ด ์žˆ๋Š”์ง€๋ฅผ ์ฒดํฌํ•œ๋‹ค ์„ธํŒ…๋˜์–ด ์žˆ์ง€ ์•Š์œผ๋ฉด ์ œ๊ฑฐํ•˜๋Š” ๊ฒƒ์ด๊ณ , ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉดย ์ฐธ์กฐ๋น„ํŠธ๋ฅผ ํด๋ฆฌ์–ดํ•ด์„œ queue์˜ ๋งจ ๋’ค๋กœ ์ด๋™์‹œ > [์šฐ์ฃผ๋ฅผ ์œ„ํ•ด : ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ](https://blog.naver.com/oidoman/90097323379)
afdfb27ecaac4854902ba38eec679e41
Belady's Anomaly
FIFO Algorithm
null
null
null
null
null
FIFO(First In First Out)์—์„œ, ์›๋ž˜ ํŽ˜์ด์ง€ ํ”„๋ ˆ์ž„์˜ ๊ฐœ์ˆ˜๋ฅผ ๋Š˜๋ฆฌ๋ฉด page fault๋ฐœ์ƒ์ด ๊ฐ์†Œ ํ•ด์•ผ ํ•˜๋‚˜, ์˜คํžˆ๋ ค ๋Š˜์–ด๋‚˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋ฐœ์ƒ > [๋ฒจ๋ ˆ์ด๋””์˜ ๋ชจ์ˆœ (Belady's Anomaly)](https://m.blog.naver.com/cookatrice/50037414550)
d5dfd0e9467f4aa1a7ba5d584c4c6d0c
Hashed page table
Paging Tables
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
- The virtual page number is hashed into a page table - This page table contains a chain of elements hashing to the same location - need hash function and page table like hash table ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F054a272e-ba5a-447a-b1fa-9f432abbc97b%2FUntitled.png?table=block&id=cdb4b8cb-54a6-4019-81e5-e68ca1ad2580&cache=v2) Virtual page numbers are compared in this chain searching for a match. If a match is found, the corresponding physical frame is extracted (fast)
5503e136b5d94731911edb2a21ccd4c9
Inverted page table
Paging Tables
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2021
### ์—ญ ํŽ˜์ด์ง€ ํ…Œ์ด๋ธ” One entry for each real page of memory (frame) - Only one page table in the system - Entry consists of the virtual address of the page stored in that real memory location, with information about the process that owns that page - by pid, p โ†’ get i by hash table for limit one either ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F5dfe95bd-9a3d-4589-9252-dd6a7c0c0213%2FUntitled.png?table=block&id=e6e67336-8bae-4204-b6aa-13a3029a7c15&cache=v2) > [์—ญ ํŽ˜์ด์ง€ ํ…Œ์ด๋ธ” (Inverted Page Table) > ๋„๋ฆฌ์˜ ๋””์ง€ํ„ธ๋ผ์ดํ”„](http://blog.skby.net/%EC%97%AD-%ED%8E%98%EC%9D%B4%EC%A7%80-%ED%85%8C%EC%9D%B4%EB%B8%94-inverted-page-table/)
25d3365925cf4aea9b9eb834c1c6bbad
Paging Example
Paging Usage
May 19, 2021
Alan Jo
Alan Jo
May 19, 2021
# Paging in Hardware (Intel x86) โ€“ **physical addresses of page tables (CR3 register store) - two level in intel (+ page directory)** ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fce48bc62-3c64-4981-9923-613303ea798a%2FUntitled.png?table=block&id=14d204a8-6dd8-4444-8190-33197645aa4b&cache=v2) Enable by setting PG bit in CR0 register 4kb so 20 upper bits to find page table ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff3239cab-044c-4eae-ab4b-7782ae6ba8bf%2FUntitled.png?table=block&id=217f7801-2b3e-4b75-a709-0b6d37ce1c00&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F11c86ab6-4414-47d7-a314-c6c3b4610e28%2FUntitled.png?table=block&id=79f5e569-5327-4fb8-9bac-bff87c58639c&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F4bdc9f84-8bc1-4229-ac66-ebbc796c9ba8%2FUntitled.png?table=block&id=c4967232-f546-42b6-b243-c52905d4b111&cache=v2) > Linux support Four-level paging for future ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb10eea4f-ecbb-44d7-8b3f-dacb0d1b89e7%2FUntitled.png?table=block&id=b3f394dc-0641-4f29-b741-7f20dfb188f7&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F77e637c7-abbb-490c-86a4-5238dc928c7b%2FUntitled.png?table=block&id=03cdfda0-1c14-4877-8aeb-b01535c0e193&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff031c764-89ce-4d2e-a42f-037c38dc9cbe%2FUntitled.png?table=block&id=7097a2b7-c336-4177-aa5e-97a8c05f3632&cache=v2)
35326cf37c694b23ab5bab18de683b9f
i/o interlock
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
- ์ปค๋„๋กœ ๋ฌธ์ œํ•ด๊ฒฐ - Lock pages in physical memory using lock bits.
458727109a584d01b1087036dd6922bc
Page fault handler
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
### It is kind of interrupt if required PTE (entry) has invalid bit in page table than cause an exception to throw so go to OS(kernel mode), bring in missing page into physical frame, update PTE and restart instruction. -**Page fault service time: **service the page-fault interrupt + Read in the page + Restart the process - **Effective access time: **memory access time * (1 - p) + disk access time * p (p = probability of page fault) **degradation: **effective access time / memory access time (low p than low degradation) > **Locality**: dependent on page replacement policy > page change occur by not only by PFH, since predict page usage by machine learning
b4d166a24a7740a9bc153f80701a03bc
Page Replacement
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
> **Belady's Proof (Oracle solution: ideal)**: Evicting the page that will not be used for the longest period of time minimizes the number of page faults # Counting Algorithms - LFU(Least frequently used)but do not reflect time variable*recent used victim - MFU(Most Frequently Used)consider recent used # Timing algorithms - FIFOSimple: single pointer sufficesBelady's Anomaly: more frame do not improve fifo algorithm performance - LRU (Least recently used)by counters or stack ### but lru is complicate ### LRU Approximation (real use) - Sampled LRU (hardware support)reference bit - can be cleared when full - Second-Chance AlgorithmLRU clock(Secondd chance) - clock bitclock hand - PTE reference - often use modified bit(dirty bit) either > Evaluate algorithm usually by running it on a particular string of memory references (reference string) and computing the number of page faults on that string **Evict picked victim page** Page fault service time โ€“ Service the page-fault interrupt + Read in the page + Restart the process ### Allocation of Frames each process need minimum number of pages - Must provide enough frames to hold all the different pages that any single instruction can reference - local replacement - can not steal other process's frame - Fixed(Equal) allocation - each algorithm to process - global replacement - can steal other process's frame - Priority allocation > Proportional allocation : related to process size set frame number > Priority allocation : set process priority # Page replacement Examples 1. windows NTdemand paging with clustering(gist)process has working-set min, working-set maximum and if exceed then automatic working-set trimming process perform to restore free memory 2. solaris 2 > ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff66a2160-4cbc-4f7c-95f5-593519e3a76b%2FUntitled.png?table=block&id=21bfeffc-ef6d-43a1-b507-7f31bce81cbd&cache=v2)
936ec615a0554950bc1ab233fb67434f
page size
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
- Provide Multiple Page Sizeshardware page size various so we can choose by softwarelarge: small page table, small page faultsmall: less handling overhead, small internal fragment
c50803e5e52b492c847de02404f0be36
Page Table
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
Each Process has Page Table, Page table entry(PTE) has valid, access bit ### Page Table Arguments 1. V = {0 ,1 , ..., N-1}: virtual address space 2. P = {0, 1, ..., M-1}: physical address space 3. N > M: difference that not comparable 4. MAP: V โ†’ P U {null} address mapping function 5. null if in Disk (if valid is 0): page fault ### Page Table Parameters log upper = lower 6. P = Page size (bytes): typically KBs 7. N = Virtual Address limit 8. M = Physical address limit <details><summary> virtual address = virtual page number(VPN) bit + page offset</summary> VPN acts page index in page table </details> physical address = physical page number bit + page offset address translation change previous one only (32 bit to other) > compare start by page table base register page table need protection and cache do not need because of address translation
ffbce6c10d9a4a8993bd0d809f4a4249
Pages Arguments
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
Virtual page and Physical page both exists, Page Table connect VP to PP - P = total number of virtual pages - N = total number of Physical pages 1. PP can be placed in Disk (Storage) 2. Different VP can point out same PP (ex. library) > if disk read occur than DMA(direct memory access) transfer and then by I/O controller there will be interrupt processor
287308a9ec104a0eb0c4e01b157c8831
Segmentation Fault
Virtual Memory Notion
Jun 1, 2021
Alan Jo
Alan Jo
Jan 18, 2023
[Segmentation](https://texonom.com/segmentation-9927cad8b8bf4366abdc591e533e1060)
## Segfault OS์— ๋ฉ”๋ชจ๋ฆฌ ์•ก์„ธ์Šค ์œ„๋ฐ˜์„ ์•Œ๋ฆฌ๊ธฐ ์œ„ํ•ด ๋ฉ”๋ชจ๋ฆฌ ๋ณดํ˜ธ ๊ธฐ๋Šฅ์ด์žˆ๋Š” ํ•˜๋“œ์›จ์–ด์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์˜ค๋ฅ˜ customer handler๋ฅผ ์„ค์น˜ํ•˜์—ฌ ์‚ฌ์šฉํ•˜์ง€ ์•Š์œผ๋ฉด Linux์˜ ์ปค๋„์—์„œ ๋™์ž‘ํ•˜๊ณ  ์žˆ๋Š” process signal ์ฒ˜๋ฆฌ segfault๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ํ”„๋กœ์„ธ์Šค๋ฅผ ์ข…๋ฃŒํ•˜๊ณ  ์ ์ ˆํ•œ ulimit ์„ค์ •์„ ๊ฐ–์ถ˜ ์ฝ”์–ด ๋คํ”„๋ฅผ ์ƒ์„ฑ [Segfault RSP](https://texonom.com/segfault-rsp-9fa0f64a2de94e26906b7689c0590fd4) [Segfault RIP](https://texonom.com/segfault-rip-364a0188edf74a3e9f535a5f733bc996) ์˜ค๋ฅ˜ ๊ฐ’์€ ํŽ˜์ด์ง€ ์˜ค๋ฅ˜ ์˜ค๋ฅ˜ ์ฝ”๋“œ ๋น„ํŠธ์˜ ๋น„ํŠธ ๋งˆ์Šคํฌ from `arch/x86/mm/fault.c` > [What is Segfault Message?](https://hslee77.github.io/linux,cloud/2021/05/07/LinuxSegfault-Event.html)
b1008afd3e3a4117a92c978ba3dc0c14
Swapping
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
A process can be swapped temporarily out of memory to a **backing store - **and then brought back into memory for continued execution Backing store - Fast disk that must provide direct access to these memory images bring a page into memory only when it is needed (page-level **swapping**) - OS do movement of pages between memory/disks - evicted pages go to disk if page is dirty to a swap file
98903f7a115e48808b17fc418468c8e3
TLB reach
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
- TLB Reach = (RLB Size) * (Page Size)๊ฐ€๋ณ€ ํŽ˜์ด์ง€ ์‚ฌ์ด์ฆˆ ์ด์šฉํ•ด์„œ ์ปค๋„ํ•œํ…Œ๋Š” ํฐ ํŽ˜์ด์ง€
afd1dceecb9542c086eab1d89b938824
TLB (Translation Lookaside Buffer)
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
usually fully associative cache since page table is in memory ### bits: valid + dirty(since it is cache and if write back) + tag(process ID + virtual page number) + physical page number + page offset
fd5ffc7e77c44f57a744915cc426c27e
Virtual Memory Thrashing
Virtual Memory Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
<details><summary> Since lack of free frame(low RAM), process > physical memory then page fault rate will be very high</summary> ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F42e6be14-9a28-4c41-9344-709852b69ee1%2Ftemp.jpg?table=block&id=7f7afe8b-044d-458c-af60-912fb3450ba1&cache=v2) </details> โ†’ os use all time to swapping Solution Method two - working set, ppf > ### 1. Working set, locality set + others for continity = working set ***Working Set***: set of actively used pages `math: \Delta` : working-set window : fixed number of page references (ex. 10,000 instruction) > ex. WS(t1) = {1,2,3,4,5} ,ํ•œ๊บผ๋ฒˆ์— ๋ฐ˜๋‚ฉ, ๋Œ€์—ฌ $$\Sigma WSSi = total demand frames$$ OS monitor direct D, and if D > total number of frames in physical them swap process ***then how to direct?: ***like sampled lru use ***reference bit*** and ***interval time*** increasing bit will make performance better 2^bit per interrupt ### 2. Page-fault Frequency Allocation Window's method directly measure and control page-fault rate establish acceptable page fault frequency - too high rate โ†’ increase number of frames - too low rate โ†’ decrease number of frames
f57fa2a2a76244278cca8ad66badd63f
Segfault RIP
Segmentation Fault
null
null
null
null
null
๋ช…๋ น ํฌ์ธํ„ฐ ๋ ˆ์ง€์Šคํ„ฐ ๊ฐ’
364a0188edf74a3e9f535a5f733bc996
Segfault RSP
Segmentation Fault
null
null
null
null
null
์Šคํƒ ํฌ์ธํ„ฐ ๋ ˆ์ง€์Šคํ„ฐ ๊ฐ’
9fa0f64a2de94e26906b7689c0590fd4
COW(copy-on-write)
Virtual Memory Notion Usages
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
like fork(do not need to copy code and data) we do resource sharing efficiently image copy on write time, parent and child processes to initially share the same If either process modifies a shared page, only then is the page copied. ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F024bcd14-9529-4600-bd90-9c52a217c55e%2FUntitled.png?table=block&id=10970c8f-03c3-4373-9c16-b2c1748a6a49&cache=v2)
b41107af21f04feb923f02eeaf677017
Linux Paging
Virtual Memory Notion Usages
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
### four-level paging for future hardware which has many three level to mapping to hardware each process has its own Page Global Directory and its own set of page (upper, middle, null)tables ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F81e93678-3bfb-4c92-ad67-8febcbb65be7%2Ftemp.jpg?table=block&id=0c97af39-ebe2-4696-b377-c3c931e8f15f&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F0d77a5e8-bea8-4ece-82bd-39352f2d73e0%2Ftemp.jpg?table=block&id=fad97902-3c20-4c54-a857-31c1235cc219&cache=v2) task struct data sturucture has mm pointer, mm is pointer which has image mm_struct data sturcture. that has mmap pointer. process's meta data sturcture vm araa struct pgd is page first table base address directory 1. read then page fault (segmentation fault) start end area 2. write code is fault so OS read commision 3. also fault because because r/w no physical in frame then replacement > ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe3a42f71-e4d2-4057-97b8-80ace7bef2d1%2FUntitled.png?table=block&id=4dd69d90-4471-4c46-be35-7f144ff711d8&cache=v2) ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F56c9d36a-87cf-4f5b-b9ad-cbde6a4d621d%2Ftemp.jpg?table=block&id=67c9f0be-bd02-44ac-8eeb-48005baed1a4&cache=v2) **KMA: **dynamic memory allocation in head (3gb) by malloc. in kernel (1gb) memory allocationbecause kernel cannot use malloc - contiguous page frame allocator : alooc_pages() - noncontiguous page fram allocator : vmalloc() - memory object allocators : the slab alloctor- kmem_cache_alloc : congifuous allocation of kernel objects- kmalloc() : contiguous allocation of arbitrary length up to 128kb ## Page replacemnet in linux - **two LRU listsinactive_list - pages not known to be importantactive_list - pages known to be referenced frequently** - kernel swap daemon (a kernel thread) - more on page replacemnet mechanism > 64bit usually use 3 level paging
dddeb1bb20e64c67bf7d38ae744e625c
Memory-Mapped Files
Virtual Memory Notion Usages
Nov 5, 2019
Alan Jo
Seong-lae Cho
Jan 18, 2023
Memory-mapped file I/O allows file I/O to be treated as routine memory access by mapping a disk block to a page in memory - Uniform access for files and memory โ†’ less copying ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F26e99936-66b7-4614-ad26-1cc2b825c286%2FUntitled.png?table=block&id=02e0e36d-a529-43de-a147-3a10034222b8&cache=v2)
09442c8a229e475083829ddf52eca697
Garbage Collector
Memory Management Usage
Oct 29, 2020
Alan Jo
Alan Jo
May 19, 2021
### Garbage Collector Notion |Title| |:-:| |[GC Compaction](https://texonom.com/gc-compaction-9179519ad2ec4ba48377ad941be50edf)| |[Generational GC](https://texonom.com/generational-gc-9e88cd3b020e417dbe4d0a231884d0c7)| |[Generational Theory](https://texonom.com/generational-theory-307b210f9661421580b4b22b331014c1)| ### Garbage Collectors |Title| |:-:| |[Static Garbage Collector](https://texonom.com/static-garbage-collector-eaac7f4e278741fe97fa212dd9037eba)| |[Dynamic Garbage Collector](https://texonom.com/dynamic-garbage-collector-7d88c0e0170b4c1c8a890b6e65932088)|
8af9f92e3ca842ee8ddd638e25647cd7
Memory Leak
Memory Management Usage
Oct 29, 2020
Alan Jo
Alan Jo
May 19, 2021
1. Global Variable 2. Timer, Callback 3. Closer 4. Multi Reference > [์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์™€ V8 ์—”์ง„์˜ ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ ํ”„๋กœ์„ธ์Šค](https://medium.com/naver-place-dev/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%99%80-v8-%EC%97%94%EC%A7%84%EC%9D%98-%EB%A9%94%EB%AA%A8%EB%A6%AC-%EA%B4%80%EB%A6%AC-%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4-f45091e696e1)
16c4f840b59e4d45a04770b03e582229
GC Compaction
Garbage Collector Notion
Apr 30, 2021
Alan Jo
Alan Jo
Apr 30, 2021
[Dynamic Garbage Collector](https://texonom.com/dynamic-garbage-collector-7d88c0e0170b4c1c8a890b6e65932088)
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff1cd8946-653d-4fa4-b9a8-d9d16a199728%2FUntitled.png?table=block&id=697cd2a4-4784-415e-b7dc-5f1465129ff1&cache=v2) > [Go ์–ธ์–ด์˜ GC์— ๋Œ€ํ•ด - LINE ENGINEERING](https://engineering.linecorp.com/ko/blog/go-gc/)
9179519ad2ec4ba48377ad941be50edf
Generational GC
Garbage Collector Notion
Apr 30, 2021
Alan Jo
Alan Jo
Apr 30, 2021
[Generational Theory](https://texonom.com/generational-theory-307b210f9661421580b4b22b331014c1) [V8 GC](https://texonom.com/v8-gc-2630948f867a46069a56ccae5271f574) [JVM GC](https://texonom.com/jvm-gc-0023b0c7ffe644ed94a45f2a69fde1ea)
์„ธ๋Œ€๋ณ„ GC์˜ ๋ชฉ์ ์€ heap ๋‚ด ๊ฐ์ฒด๋ฅผ ์ˆ˜๋ช…(GC์—์„œ ์‚ด์•„ ๋‚จ์€ ํšŸ์ˆ˜ ๋“ฑ์œผ๋กœ ๋‚˜ํƒ€๋ƒ„)์— ๋”ฐ๋ผ ๋ถ„๋ฅ˜ํ•˜์—ฌ GC ํšจ์œจ์„ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ๊ฒƒ - ๊ฐ์ฒด ์‹ ๊ทœ ํ• ๋‹น ์˜์—ญ์—์„  GC๋ฅผ ์ž์ฃผ ์ˆ˜ํ–‰(Minor GC) - ํ•ด๋‹น ์˜์—ญ GC์—์„œ ์—ฌ๋Ÿฌ ๋ฒˆ ์‚ด์•„ ๋‚จ์€(๊ฐ€์žฅ ์˜ค๋ž˜๋œ) ๊ฐ์ฒด๋Š” ์Šน๊ฒฉ(promote)์‹œ์ผœ GC ๋นˆ๋„๊ฐ€ ๋‚ฎ์€(Major GC) ์˜์—ญ์œผ๋กœ ์ด๋™ Java8 HotSpot VM์—์„œ๋Š” ๋ชจ๋“  ์ปฌ๋ ‰ํ„ฐ๊ฐ€ ์„ธ๋Œ€๋ณ„ GC๋ฅผ ์ œ๊ณต [write barrier](https://texonom.com/write-barrier-73c82a9b955346429fee7fc504ab3172) > [Go ์–ธ์–ด์˜ GC์— ๋Œ€ํ•ด - LINE ENGINEERING](https://engineering.linecorp.com/ko/blog/go-gc/)
9e88cd3b020e417dbe4d0a231884d0c7
Generational Theory
Garbage Collector Notion
Apr 30, 2021
Alan Jo
Alan Jo
Apr 30, 2021
์ƒˆ๋กœ ํ• ๋‹น๋œ ๊ฐ์ฒด๋Š” ๋Œ€๋ถ€๋ถ„ ์ผ์ฐ ์ฃฝ๋Š”๋‹ค๋Š” ๊ฐ€์„ค
307b210f9661421580b4b22b331014c1
write barrier
Generational GC
null
null
null
null
null
์„ธ๋Œ€๋ณ„ GC๋Š” GC๋ฅผ ์ˆ˜ํ–‰ํ•˜์ง€ ์•Š์„ ๋•Œ๋„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์˜ค๋ฒ„ํ—ค๋“œ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๋Š” ๋‹จ์  root์—์„œ ์‹ ๊ทœ ์„ธ๋Œ€๋ฅผ ์ฐธ์กฐํ•˜๋Š” ๊ฒฝ๋กœ๋งŒ ์กฐ์‚ฌํ•œ ๋’ค ๊ทธ ์ค‘ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•œ ์ƒํƒœ์ธ ๊ฒƒ์„ ํšŒ์ˆ˜ํ•˜๋ฉด ๊ทธ๋ ‡๋‹ค๊ณ  ์˜ค๋ž˜๋œ ๊ฐ์ฒด๋ฅผ ํฌํ•จํ•˜์—ฌ heap ์ „์ฒด๋ฅผ ๊ฒ€์‚ฌํ•ด ๋ฒ„๋ฆฌ๋ฉด ์„ธ๋Œ€๋ณ„ GC๋ฅผ ํ•˜๋Š” ์˜๋ฏธ๊ฐ€ ์—†๋‹ค ๊ทธ๋ž˜์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์ฐธ์กฐ๋ฅผ ๋Œ€์ž…ํ•˜๊ฑฐ๋‚˜ rewriteํ•  ๋•Œ, ์˜ค๋ž˜๋œ ์„ธ๋Œ€์—์„œ ์‹ ๊ทœ ์„ธ๋Œ€๋ฅผ ์ฐธ์กฐํ•˜๋Š” ๊ฒฝ์šฐ ํ•ด๋‹น ์ฐธ์กฐ๋ฅผ ๋ณ„๋„๋กœ ๊ธฐ๋กํ•˜๋Š” ์ฒ˜๋ฆฌ๊ฐ€ ์ถ”๊ฐ€ ์ด์™€ ๊ฐ™์€ ์ฐธ์กฐ์˜ โ€˜mutateโ€™์™€ ํ•จ๊ป˜ ๋ถ€์ˆ˜์ ์œผ๋กœ ์ง„ํ–‰ํ•ด์•ผ ํ•˜๋Š” ์ฒ˜๋ฆฌ๋ฅผ โ€˜write barrierโ€™๋ผ๊ณ  ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F91b10137-4b01-4e06-8395-497fe3e92e6e%2FUntitled.png?table=block&id=65bf9e6d-3ddb-4cee-bf93-c23e71d43272&cache=v2) ์„ธ๋Œ€๋ณ„ GC๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด write barrier ์˜ค๋ฒ„ํ—ค๋“œ์— ๋น„ํ•ด ์–ป์„ ์ˆ˜ ์žˆ๋Š” ์ด์ ์ด ๋” ํด ๊ฒƒ์œผ๋กœ ๊ธฐ๋Œ€ > [Go ์–ธ์–ด์˜ GC์— ๋Œ€ํ•ด - LINE ENGINEERING](https://engineering.linecorp.com/ko/blog/go-gc/)
73c82a9b955346429fee7fc504ab3172
Dynamic Garbage Collector
Garbage Collectors
Apr 30, 2021
Alan Jo
Alan Jo
Apr 30, 2021
GC ์ˆ˜ํ–‰ ์‹œ alive ์ƒํƒœ์˜ ๊ฐ์ฒด๋ฅผ heap ๋์œผ๋กœ ์žฌ๋ฐฐ์น˜ํ•ด์„œ heap์„ ์••์ถ• - ๋‹จํŽธํ™” ํšŒํ”ผ - bump allocation์„ ํ†ตํ•ด ๊ณ ์† ๋ฉ”๋ชจ๋ฆฌ ํ• ๋‹น ๊ตฌํ˜„ ๊ฐ€๋Šฅ > - ๊ฐ์ฒด๊ฐ€ heap ๋์— ์œ„์น˜ํ•˜๋ฏ€๋กœ ๋ฉ”๋ชจ๋ฆฌ ์‹ ๊ทœ ํ• ๋‹น ์‹œ ๋์—์„œ ๋ฐ”๋กœ increment ![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ffd98b5ba-7490-479b-a026-7bcf994a6328%2FUntitled.png?table=block&id=1080d55c-9308-438e-bc75-e6e490419519&cache=v2) ### Dynamic Garbage Collectors |Title| |:-:| > [Go ์–ธ์–ด์˜ GC์— ๋Œ€ํ•ด - LINE ENGINEERING](https://engineering.linecorp.com/ko/blog/go-gc/)
7d88c0e0170b4c1c8a890b6e65932088
Static Garbage Collector
Garbage Collectors
Apr 30, 2021
Alan Jo
Alan Jo
Apr 30, 2021
์ •์  ์œ ํ˜•์˜ GC๋Š” GC๋ณ„๋กœ heap ๋‚ด ๊ฐ์ฒด๋ฅผ ์žฌ๋ฐฐ์น˜ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค ์ •์  ์œ ํ˜• GC์—์„œ ๋ฉ”๋ชจ๋ฆฌ ํ• ๋‹น๊ณผ ํ•ด์ œ๋ฅผ ๋ฐ˜๋ณตํ•˜๋ฉด heap ๋‹จํŽธํ™”๊ฐ€ ๋ฐœ์ƒํ•ด ํ• ๋‹น ์„ฑ๋Šฅ์ด ์•…ํ™”๋˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ๋‹ค ๋‹จ, ์ด๋Š” ๋ฉ”๋ชจ๋ฆฌ ํ• ๋‹น์ž๋ฅผ ์–ด๋–ป๊ฒŒ ๊ตฌํ˜„ํ•˜๋А๋ƒ์— ๋”ฐ๋ผ ๋‹ฌ๋ผ์ง ### Static Garbage Collectors |Title| |:-:| |[Tracing garbage collection](https://texonom.com/tracing-garbage-collection-19e036fe4c964d12be25ea3a974b69fd)| > [Go ์–ธ์–ด์˜ GC์— ๋Œ€ํ•ด - LINE ENGINEERING](https://engineering.linecorp.com/ko/blog/go-gc/)
eaac7f4e278741fe97fa212dd9037eba
Tracing garbage collection
Static Garbage Collectors
Nov 9, 2020
Alan Jo
Alan Jo
Apr 30, 2021
[Stop the world GC](https://texonom.com/stop-the-world-gc-5b16f1ca6ac3450bbf63e3bf56397538) [Mark & Sweep GC](https://texonom.com/mark-sweep-gc-b7bb682c52bc4be98043c847381fe483) [Reference Counting](https://texonom.com/reference-counting-a780282e427c436f8e12ca7f95173926) [Strong and weak references](https://texonom.com/strong-and-weak-references-7c3454cf4f1843d991bdc68439ec0091) > [Tracing garbage collection](https://en.wikipedia.org/wiki/Tracing_garbage_collection#Stop-the-world_vs._incremental_vs._concurrent)
19e036fe4c964d12be25ea3a974b69fd
Mark & Sweep GC
Tracing garbage collection
null
null
null
null
null
### ๋ฃจํŠธ์—์„œ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ ๋ฉ”๋ชจ๋ฆฌ๋Š” active, ๋‚˜๋จธ์ง€๋Š” ๊ธฐ๋น„์ง€ [CMS Collector](https://texonom.com/cms-collector-5893234d493d4a9a8e14b4a392d44827) **active root ์— ์›์น˜ ์•Š๋Š” ์ฐธ์กฐ๊ฐ€ ํฌํ•จ๋˜์–ด์žˆ๋‹ค๋ฉด, ํ•„์š” ์—†๋Š” ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ํ• ๋‹น๋œ ๋งŒํผ ๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜๊ฐ€ ๋ฐœ์ƒ** 2๋‹จ๊ณ„ ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ 1. Mark: GC ๋ฃจํŠธ ๋ชฉ๋ก์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ ๊ฒฝ์šฐย `window`๊ฐ์ฒด๊ฐ€ ๋ฃจํŠธ๋กœ ์ž‘๋™ํ•˜๋Š”๋ฐ, ๋ฃจํŠธ๋ž€ ์ฝ”๋“œ์—์„œ ์ฐธ์กฐ๋˜๋Š” ์ „์—ญ ๋ณ€์ˆ˜๋ฅผ ๋œปํ•ฉ๋‹ˆ๋‹ค. ๋ชจ๋“  ๋ฃจํŠธ๋“ค์€ย `acitve`ย ํ˜น์€ย `alive`(๊ฐ€๋น„์ง€๊ฐ€ ์•„๋‹˜)๋กœ ํ‘œ์‹œ๋˜๋ฉฐ, ์ด๋“ค์˜ ์ž์‹๋“ค ๋˜ํ•œ ์žฌ๊ท€์ (recursively)์œผ๋กœ ๋™์ผํ•˜๊ฒŒ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค. ์ฆ‰, ๋ฃจํŠธ์—์„œ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•˜๋‹ค๋ฉด ๊ฐ€๋น„์ง€๊ฐ€ ์•„๋‹ˆ๋ผ๊ณ  ํŒ๋‹จ๋ฉ๋‹ˆ๋‹ค. 2. Sweep:ย `active`๋กœ ํ‘œ๊ธฐ๋˜์ง€ ์•Š์€ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๋ชจ๋‘ ๊ฐ€๋น„์ง€๋กœ ๊ฐ„์ฃผํ•˜์—ฌ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. > [์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์™€ V8 ์—”์ง„์˜ ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ ํ”„๋กœ์„ธ์Šค](https://medium.com/naver-place-dev/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%99%80-v8-%EC%97%94%EC%A7%84%EC%9D%98-%EB%A9%94%EB%AA%A8%EB%A6%AC-%EA%B4%80%EB%A6%AC-%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4-f45091e696e1)
b7bb682c52bc4be98043c847381fe483
Reference Counting
Tracing garbage collection
null
null
null
null
null
๊ฐ์ฒด๋ฅผ ์ฐธ์กฐํ•˜๋Š” ๋ณ€์ˆ˜์˜ ์ˆ˜๋ฅผ ์ถ”์ ํ•˜๋Š” ๋ฐฉ๋ฒ• ๋ ˆํผ๋Ÿฐ์Šค๊ฐ€ ํ•˜๋‚˜ ์ฆ๊ฐ€/๋ณต์‚ฌ ๋  ๋•Œ๋งˆ๋‹ค ์นด์šดํŠธ๊ฐ€ 1๋งŒํผ ์ฆ๊ฐ€ ๋ ˆํผ๋Ÿฐ์Šค ์นด์šดํŒ…์€ ๋งค์šฐ ์‹ฌํ”Œํ•˜๊ณ  ๋น ๋ฅธ ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜ ๋ฐฉ์‹์ด์ง€๋งŒ, cyclic/circular reference ๋ฅผ ์ฒ˜๋ฆฌํ•˜์ง€ ๋ชปํ•˜๋Š” ๋“ฑ์˜ ๋‹จ์  ์Šค๋งˆํŠธ ํฌ์ธํ„ฐ cpp
a780282e427c436f8e12ca7f95173926
Stop the world GC
Tracing garbage collection
null
null
null
null
null
5b16f1ca6ac3450bbf63e3bf56397538
Strong and weak references
Tracing garbage collection
null
null
null
null
null
7c3454cf4f1843d991bdc68439ec0091
CMS Collector
Mark & Sweep GC
null
null
null
null
null
## Concurrent Mark & Sweep
5893234d493d4a9a8e14b4a392d44827
Interrupt
Processor Scheduling Notion
May 19, 2021
Alan Jo
Alan Jo
Mar 28, 2023
[reverie](https://github.com/facebookexperimental/reverie)
### interception ### Interrupt Notion |Title| |:-:| |[Mode Switching](https://texonom.com/mode-switching-b7f85582f0474555a8c08da922b33610)| |[OS Mode](https://texonom.com/os-mode-b0375e3351064cbd9d220d1c9d44e0e8)| |[Syscall](https://texonom.com/syscall-74f2aa4e9d7141dbad05bae5c88a07e0)| |[Context Switching](https://texonom.com/context-switching-132451f1c9fe4324a1a2bd84e11e7696)| |[Preemptive Scheduling](https://texonom.com/preemptive-scheduling-c4b6e46752f14d69bb769e987ae1c21b)| |[Cooperative Scheduling](https://texonom.com/cooperative-scheduling-93d38df64c4843e68d71e5db4e0f5752)| > [๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž๋“ค์ด ์•Œ์•„์•ผํ•  ๋™์‹œ์„ฑ 4โ€Šโ€”โ€Š์Šค์ผ€์ค„๋ง](https://choi-geonu.medium.com/๋ฐฑ์—”๋“œ-๊ฐœ๋ฐœ์ž๋“ค์ด-์•Œ์•„์•ผํ• -๋™์‹œ์„ฑ-4-์Šค์ผ€์ค„๋ง-e684331afc77)
d26d34c54d5447a6888ad85089184fb3
Process
Processor Scheduling Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
May 19, 2023
[Memory Management](https://texonom.com/memory-management-dbf37c509eaf46deb2df8ccd086e386c)
### process - program in execution ### Process Notion |Title| |:-:| |[Process Sync](https://texonom.com/process-sync-45211a317f4f442cbab6b374fdaed630)| |[Process switching ](https://texonom.com/process-switching-7f2486a6184241fba896860610a4d5f1)| |[Process Memory](https://texonom.com/process-memory-53285d27582d49058052939d739e8623)| |[Process Function Call](https://texonom.com/process-function-call-ab41c2af3a5743599fca591ce08b535f)| |[Process State](https://texonom.com/process-state-bbe0f9abe7b240c7a1d2a2d1c3478afd)| |[Process control block](https://texonom.com/process-control-block-f62e2db348e442c580ea6d2084973973)| |[Process descriptor](https://texonom.com/process-descriptor-81614898a94d48058419b80e9e971fae)| |[Process image ](https://texonom.com/process-image-c6384d00d1af41a6bcaa1b238165be17)| |[Process context](https://texonom.com/process-context-e76d70c66cd840b4a247de3310e85416)| |[Process Exit](https://texonom.com/process-exit-2d82b561fba64541bde82c478297a22c)| |[Critical Section](https://texonom.com/critical-section-8469b236528b41efb4088ea3a69a4cc4)| |[Semaphore](https://texonom.com/semaphore-46b11416972249d2a40e6c3e5060304a)| |[Monitor Sync](https://texonom.com/monitor-sync-54b03a3282964bdb88207ec60dfeb1b2)| |[IPC](https://texonom.com/ipc-98010a1077fd45968ce78ae98505b2e5)| |[massage passing](https://texonom.com/massage-passing-ab22575af94b441caad37d2e1697cd59)| |[Mutex](https://texonom.com/mutex-cbfff707d2fe484ea20344f1104b7141)| > memory, device, files, process has each table > **process image **is get by pid > [์„œ๋ฒ„์— ๊ฑธ๋ฆฌ๋Š” ๋ถ€ํ•˜, ์ถ”์ธกํ•˜์ง€ ๋ง๊ณ  ๊ณ„์ธกํ•˜์ž](https://injae-kim.github.io/dev/2020/07/09/how-to-check-single-server-load-average.html)
ffd68f9e2b2648759b96047d48d17778
Processor Scheduler
Processor Scheduling Notion
May 19, 2021
Alan Jo
Alan Jo
Feb 21, 2023
### Processor Schedulers |Title| |:-:| |[Long-term scheduler](https://texonom.com/long-term-scheduler-5f0783472fa94c478b10b7a1bfbf0192)| |[Short-term scheduler](https://texonom.com/short-term-scheduler-f95f24cbd78d490c8a216dcabb04e4cb)| |[Medium-term scheduler](https://texonom.com/medium-term-scheduler-15b70c90c2f641e696fcc6c90cbd04d9)| ### Processor Scheduler Notion |Title| |:-:| |[Processor Dispatcher](https://texonom.com/processor-dispatcher-dac6ca05f13c4ddc82906bd73f6080df)| ### Processor Queues |Title| |:-:| |[Job Queueย ](https://texonom.com/job-queue-92bccac0db114b5c83a0f3ac0d9de17e)| |[Ready Queue](https://texonom.com/ready-queue-c8546adf7d604a73a15b292808bef5b7)| |[Device Queue](https://texonom.com/device-queue-453d40088668423c96d51003b27f9a2e)| - selection function (which) in ready Q - decision mode (when) - end time > - non preem > - preem > [[O/S] CPU Scheduler์™€ Dispatcher](https://velog.io/@ss-won/OS-CPU-Scheduler%EC%99%80-Dispatcher)
8c124741c1e84d26b0b0a8ad599337f4
Thread
Processor Scheduling Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Feb 21, 2023
### Thread Notion |Title| |:-:| |[Thread Safe](https://texonom.com/thread-safe-a6b8ab6ec6e146deafa86b428e5ecfbe)| |[Threads model](https://texonom.com/threads-model-800491618af24626b02f701d43578b66)| |[kernel level thead](https://texonom.com/kernel-level-thead-498f95b4e748492b8e2ed535bf987b0b)| |[Lock convoy](https://texonom.com/lock-convoy-a904af475dcb4bb8a0d99ea8e095de39)| |[Two-Step Dance](https://texonom.com/two-step-dance-b328c6d4bef8483a97e076bbc91b0be8)| |[Priority Inversion](https://texonom.com/priority-inversion-beb6115d6154481db836a5677f877581)| |[Threads Scheduling](https://texonom.com/threads-scheduling-e1315fdaa06740c6ab54f097edeba1d7)| |[Deadlock](https://texonom.com/deadlock-8c118f296cc1477aac5c59c75cec8235)| |[CAS](https://texonom.com/cas-b3541e0665b74cf7aa4f91a7b202fde2)| ### Thread Types |Title| |:-:| |[user level thread](https://texonom.com/user-level-thread-6f68e5d2dff240359b9b494534598b29)| > [์ข€ ์ƒ์†Œํ•œ ์Šค๋ ˆ๋“œ ๊ด€๋ จ ๋ฌธ์ œ](https://m.blog.naver.com/PostView.nhn?blogId=jjoommnn&logNo=130036504092&proxyReferer=https:%2F%2Fwww.google.com%2F)
d704a229d3b94619963c61bb742b822b
****Context Switching****
Interrupt Notion
Mar 28, 2023
Alan Jo
Alan Jo
Mar 28, 2023
### ****Context Switching Notion**** |Title| |:-:|
132451f1c9fe4324a1a2bd84e11e7696
****Cooperative Scheduling****
Interrupt Notion
Mar 28, 2023
Alan Jo
Alan Jo
Mar 28, 2023
ํ˜‘์กฐ์  ์Šค์ผ€์ค„๋ง
93d38df64c4843e68d71e5db4e0f5752
Mode Switching
Interrupt Notion
May 19, 2021
Alan Jo
Alan Jo
Feb 21, 2023
b7f85582f0474555a8c08da922b33610
OS Mode
Interrupt Notion
Nov 5, 2019
Alan Jo
Seong-lae Cho
Feb 21, 2023
# hardware protection 1. dual mode - user mode / kernel mode - need hardware support 2. hardware protect protected processor register in intel **CPL(current), RPL(request), DPL(descriptor)** > supervisor = system = monitor = kernel > before mode > intel real mode, protected mode # Mode change ### 1. hardware(external) interrupt - i/O interrupt - device interrupt โ† timer intterupt ### 2. software(internal) interrupt - exception โ†’ exception handler ### 3. system call # system call โ†’ system call handler (by system call interface - inplement of wapper funct in libc.a) ### Method > int 0x80(vector) or sysenter > 1. same reg to KM stack > 2. invoke system call service routine > 3. exit handler > syscall_exit or sysexit > <details><summary> > > example</summary> > 1. fork () > 2. fork{} in libc.a > 3. movl 2, %eax - 2 means fork, eax is register > 4. int 0x80(system call) > 5. go to IDT(interrupt desciptor table) > 6. go to kernel mode function > 7. save all in stack > 8. check eax to function > 9. find sys call table that (2, fork) > 10. do ref_from_sys_call in entry.S > > </details> > > ### kind > > [System call](https://texonom.com/system-call-f36194e943f3498593520460b36c55aa) > - process management system call - file management system call - file system management system call > &system_call - handler address # Bridge there is breidge like north and south to control traffic > no bridge in embedded # VM - hosted - up on host OS - stand alone - up on hardware [dual booting](https://texonom.com/dual-booting-24656ee018014e6388b841b9f579c30c)
b0375e3351064cbd9d220d1c9d44e0e8
Preemptive Scheduling
Interrupt Notion
Mar 28, 2023
Alan Jo
Alan Jo
Mar 28, 2023
์„ ์ ํ˜• ์Šค์ผ€์ฅด๋ง
c4b6e46752f14d69bb769e987ae1c21b
Syscall
Interrupt Notion
Feb 21, 2023
Alan Jo
Alan Jo
Feb 21, 2023
74f2aa4e9d7141dbad05bae5c88a07e0