๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
โญ Group_Study/Operating System

[6์ฃผ์ฐจ] Virtual Memory: Non-continuous allocation

by ํฌ์ŠคํŠธ์‰์ดํฌ 2023. 1. 8.

Virtual Memory: Non-continuous allocation

Virtual Storage(Memory)

โœ” Non-continuous allocation
โœ” ์‚ฌ์šฉ์ž ํ”„๋กœ๊ทธ๋žจ์„ ์—ฌ๋Ÿฌ ๊ฐœ์˜ block์œผ๋กœ ๋ถ„ํ• 

โœ” ์‹คํ–‰ ์‹œ, ํ•„์š”ํ•œ block๋“ค๋งŒ ๋ฉ”๋ชจ๋ฆฌ์— ์ ์žฌ

  • ๋‚˜๋จธ์ง€ block๋“ค์€ swap device์— ์กด์žฌ

โœ” ๊ธฐ๋ฒ•

  • paging system
  • segmentation system
  • Hybrid paging/segmentation system

Address mapping

Continuous allocation

null

โœ” Relative address (์ƒ๋Œ€ ์ฃผ์†Œ)

  • ํ”„๋กœ๊ทธ๋žจ์˜ ์‹œ์ž‘ ์ฃผ์†Œ๋ฅผ 0์œผ๋กœ ๊ฐ€์ •ํ•œ ์ฃผ์†Œ

โœ” Reloacation (์žฌ๋ฐฐ์น˜)

  • ๋ฉ”๋ชจ๋ฆฌ ํ• ๋‹น ํ›„, ํ• ๋‹น๋œ ์ฃผ์†Œ(allocation address)์— ๋”ฐ๋ผ ์ƒ๋Œ€ ์ฃผ์†Œ๋“ค์„ ์กฐ์ •ํ•˜๋Š” ์ž‘์—…

Non-continuous allocation

โœ” Virtual address (๊ฐ€์ƒ์ฃผ์†Œ) = relative address

  • Logical address (๋…ผ๋ฆฌ์ฃผ์†Œ)
  • ์—ฐ์†๋œ ๋ฉ”๋ชจ๋ฆฌ ํ• ๋‹น์„ ๊ฐ€์ •ํ•œ ์ฃผ์†Œ

โœ” Real address(์‹ค์ œ์ฃผ์†Œ) = absolute(physical)

  • ์‹ค์ œ ๋ฉ”๋ชจ๋ฆฌ์— ์ ์žฌ๋œ ์ฃผ์†Œ
null

โœ” Address mapping

  • Virtual address -> Real address

Block Mapping

null

โœ” ์‚ฌ์šฉ์ž ํ”„๋กœ๊ทธ๋žจ์„ block ๋‹จ์œ„๋กœ ๋ถ„ํ• /๊ด€๋ฆฌ

  • ๊ฐ block ์— ๋Œ€ํ•œ address mapping ์ •๋ณด ์œ ์ง€

โœ” Virtual address:v = (b, d)

  • b = block number
  • d = displacement(offset) in a block

Block Map Table(BMT)

โœ” Address mapping ์ •๋ณด ๊ด€๋ฆฌ

  • Kernel ๊ณต๊ฐ„์— ํ”„๋กœ์„ธ์Šค๋งˆ๋‹ค ํ•˜๋‚˜์˜ BMT๋ฅผ ๊ฐ€์ง
null

์˜ˆ์‹œ

null
null

๋Œ“๊ธ€