Home ๐Ÿ–ฅ๏ธ [Computer Architecture] Secondary Storage ๐Ÿ–ฅ๏ธ
Post
Cancel

๐Ÿ–ฅ๏ธ [Computer Architecture] Secondary Storage ๐Ÿ–ฅ๏ธ

๐Ÿ–ฅ๏ธ ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ VS ๋น„ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ

ย Computer ๋ถ€ํ’ˆExample
Volatile Memory
(ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ)
Register | Cache | Main MemoryRAM, ROM
Non-Volatile Memory
(๋น„ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ)
Secondary StorageHDD, SSD, CD-ROM, USB

ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ์™€ ๋น„ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ์˜ ํŠน์ง• ๋•Œ๋ฌธ์— ์ผ๋ฐ˜์ ์œผ๋กœ ๋น„ํœ˜๋ฐœ์„ฑ์ธ Secondary Storage์—๋Š” ๋ณด๊ด€ํ•  ๋Œ€์ƒ์„ ์ €์žฅํ•˜๊ณ , ํœ˜๋ฐœ์„ฑ์ธ Register, Cache, Main Memory์—๋Š” ์‹คํ–‰ํ•  ๋Œ€์ƒ์„ ์ €์žฅํ•˜์—ฌ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ–ฅ๏ธ HDD(Hard Disk Drive)

HDD๋Š” ์ž๊ธฐ์ ์ธ ๋ฐฉ์‹์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๋Š” ์žฅ์น˜์ž…๋‹ˆ๋‹ค. HDD๋Š” ์ฃผ๋กœ ๋Œ€์šฉ๋Ÿ‰ ์ €์žฅ ์žฅ์น˜๊ฐ€ ํ•„์š”ํ•œ ์ž‘์—…์ด๋‚˜ ์„œ๋ฒ„์—์„œ ๋งŽ์ด ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

HDD์˜ ๊ตฌ์„ฑ ์š”์†Œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • Platter: ๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ๋˜๋Š” ๊ตฌ์„ฑ ์š”์†Œ
  • Spindle: Platter๋ฅผ ํšŒ์ „์‹œํ‚ค๋Š” ๊ตฌ์„ฑ ์š”์†Œ
  • Head: ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ๊ณ  ์“ฐ๋Š” ๊ตฌ์„ฑ ์š”์†Œ
  • Disk Arm: Head๋ฅผ ์›ํ•˜๋Š” ์œ„์น˜๋กœ ์ด๋™์‹œํ‚ค๋Š” ๊ตฌ์„ฑ ์š”์†Œ

Platter์˜ ๊ตฌ์„ฑ ์š”์†Œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • Track: Platter๋ฅผ ์—ฌ๋Ÿฌ ๋™์‹ฌ์›์œผ๋กœ ๋‚˜๋ˆ„์—ˆ์„ ๋•Œ ๊ทธ ์ค‘ ํ•˜๋‚˜์˜ ์›
  • Sector: Track์„ ์ผ์ •ํ•œ ์กฐ๊ฐ์œผ๋กœ ๋‚˜๋ˆˆ ๊ฒƒ์ด๋ฉฐ, HDD์˜ ๊ฐ€์žฅ ์ž‘์€ ์ „์†ก ๋‹จ์œ„
  • Block: ํ•˜๋‚˜ ์ด์ƒ์˜ Sector๋ฅผ ๋ฌถ์€ ๊ฒƒ
  • Cylinder: ์—ฌ๋Ÿฌ ๊ฒน์˜ Platter ์ƒ์—์„œ ๊ฐ™์€ Track์ด ์œ„์น˜ํ•œ ๊ณณ์„ ๋ชจ์•„ ์—ฐ๊ฒฐํ•œ ๋…ผ๋ฆฌ์  ๋‹จ์œ„

HDD์— ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ์˜ ์ ‘๊ทผํ•˜๋Š” ์‹œ๊ฐ„์€ ํฌ๊ฒŒ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋‚˜๋ˆ„์–ด์ง‘๋‹ˆ๋‹ค.

  • Seek Time: ์ ‘๊ทผํ•˜๋ ค๋Š” ๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ๋œ Track๊นŒ์ง€ Head๋ฅผ ์ด๋™์‹œํ‚ค๋Š” ์‹œ๊ฐ„
  • Rotational Letency: Head๊ฐ€ ์žˆ๋Š” ์žˆ๋Š” ๊ณณ์œผ๋กœ Platter๋ฅผ ํšŒ์ „์‹œํ‚ค๋Š” ์‹œ๊ฐ„
  • Transfer Time: HDD์™€ ์ปดํ“จํ„ฐ ๊ฐ„์— ๋ฐ์ดํ„ฐ๋ฅผ ์ „์†กํ•˜๋Š” ์‹œ๊ฐ„

๐Ÿ–ฅ๏ธ SSD(Solid State Drive)

Flash Memory๋ž€ ์ „๊ธฐ์ ์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์“ธ ์ˆ˜ ์žˆ๋Š” ๋ฐ˜๋„์ฒด ๊ธฐ๋ฐ˜์˜ ์ €์žฅ ์žฅ์น˜์ž…๋‹ˆ๋‹ค. Flash Memory์—๋Š” ํฌ๊ฒŒ NAND Flash Memory์™€ NOR Flash Memory๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

NAND Flash Memory๋Š” NAND Gate๋ฅผ ๊ธฐ๋ฐ˜์ด๋ฉฐ ๋Œ€์šฉ๋Ÿ‰ ์ €์žฅ ์žฅ์น˜๋กœ ๋งŽ์ด ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. SSD๊ฐ€ ๋ฐ”๋กœ NAND Flash Memory๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.

NOR Flash Memory๋Š” NOR Gate๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ ๋ฉ”๋ชจ๋ฆฌ์ž…๋‹ˆ๋‹ค.

NAND Flash Memory์˜ ๊ตฌ์„ฑ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Cell๋“ค์ด ๋ชจ์—ฌ ๋งŒ๋“ค์–ด์ง„ ๋‹จ์œ„๋ฅผ Page, Page๋“ค์ด ๋ชจ์—ฌ ๋งŒ๋“ค์–ด์ง„ ๋‹จ์œ„๋ฅผ Block, Block๋“ค์ด ๋ชจ์—ฌ ๋งŒ๋“ค์–ด์ง„ ๋‹จ์œ„๋ฅผ Plane, Plane๋“ค์ด ๋ชจ์—ฌ ๋งŒ๋“ค์–ด์ง„ ๋‹จ์œ„๋ฅผ Die๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ–ฅ๏ธ Cell

NAND Flash Memory๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๋Š” ๊ฐ€์žฅ ์ž‘์€ ๋‹จ์œ„๋กœ Cell์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ํ•˜๋‚˜์˜ Cell์— ๋ช‡ Bit๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ๋Š”์ง€์— ๋”ฐ๋ผ์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด NAND Flash Memory์˜ ์ข…๋ฅ˜๊ฐ€ ๋‚˜๋‰ฉ๋‹ˆ๋‹ค.

ย SLC(Single Level Cell)MLS(Multiple Level Cell)TLC(Triple Level Cell)
Cell๋‹น Bit1 Bit2 Bit3 Bit
์ˆ˜๋ช…๊ธธ๋‹ค๋ณดํ†ต์งง๋‹ค
I/O ์†๋„๋น ๋ฅด๋‹ค๋ณดํ†ต๋Š๋ฆฌ๋‹ค
์šฉ๋Ÿ‰ ๋Œ€๋น„ ๊ฐ€๊ฒฉ๋†’๋‹ค๋ณดํ†ต๋‚ฎ๋‹ค

๐Ÿ–ฅ๏ธ Page์˜ ์ƒํƒœ

NAND Flash Memory์˜ ๊ฐ€์žฅ ํฐ ํŠน์ง•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • I/O๋Š” Page ๋‹จ์œ„๋กœ ์‹คํ–‰
  • ์‚ญ์ œ๋Š” Block ๋‹จ์œ„๋กœ ์‹คํ–‰

NAND Flash Memory์˜ ์ฝ๊ธฐ/์“ฐ๊ธฐ/์‚ญ์ œ๋กœ ์ธํ•ด์„œ Page๋Š” ๋‹ค์Œ $3$๊ฐœ์˜ ์ƒํƒœ๋ฅผ ๊ฐ€์ง‘๋‹ˆ๋‹ค.

  • Free ์ƒํƒœ: ์–ด๋– ํ•œ ๋ฐ์ดํ„ฐ๋„ ์ €์žฅํ•˜๊ณ  ์žˆ์ง€ ์•Š์•„ ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ
  • Valid ์ƒํƒœ: ์ด๋ฏธ ์œ ํšจํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ณ  ์žˆ์–ด ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์—†๋Š” ์ƒํƒœ
  • Invalid ์ƒํƒœ: ์œ ํšจํ•˜์ง€ ์•Š์€ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ณ  ์žˆ๋Š” ์ƒํƒœ๋กœ Garbage Collection์„ ์ด์šฉํ•ด Valid ์ƒํƒœ์˜ Page๋งŒ ์ƒˆ๋กœ์šด Block์œผ๋กœ ๋ณต์‚ฌํ•œ ํ›„ ๊ธฐ์กด Block์„ ์‚ญ์ œํ•˜์—ฌ ๊ณต๊ฐ„์„ ์ •๋ฆฌํ•ด์•ผ ํ•˜๋Š” ์ƒํƒœ

๐Ÿ–ฅ๏ธ RAID(Redundant Array of Independent Disks)

RAID๋Š” ๋ฐ์ดํ„ฐ์˜ ์•ˆ์ •์„ฑ ํ˜น์€ ๋†’์€ ์„ฑ๋Šฅ์„ ์œ„ํ•ด ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๋ฌผ๋ฆฌ์  ๋ณด์กฐ๊ธฐ์–ต์žฅ์น˜(HDD, SSD)๋ฅผ ๋งˆ์น˜ ํ•˜๋‚˜์˜ ๋…ผ๋ฆฌ์  ๋ณด์กฐ๊ธฐ์–ต์žฅ์น˜์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•˜๋Š” ๊ธฐ์ˆ ์„ ๋งํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ–ฅ๏ธ RAID $0$

RAID $0$์€ ์—ฌ๋Ÿฌ ๊ฐœ์˜ HDD์— ๋ฐ์ดํ„ฐ๋ฅผ ๋‹จ์ˆœํžˆ ๋‚˜๋ˆ„์–ด ์ €์žฅํ•˜๋Š” ๊ตฌ์„ฑ ๋ฐฉ์‹์ด๊ธฐ ๋•Œ๋ฌธ์— ์ €์žฅ๋˜๋Š” ๋ฐ์ดํ„ฐ๊ฐ€ HDD ๊ฐœ์ˆ˜๋งŒํผ ๋‚˜๋‰˜์–ด ์ €์žฅ๋ฉ๋‹ˆ๋‹ค.

  • ์žฅ์ : Striping ๋˜๋ฉด ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ๊ณ  ์“ฐ๋Š” ์†๋„๊ฐ€ ๋นจ๋ผ์ง
  • ๋‹จ์ : ํ•˜๋‚˜์˜ HDD๊ฐ€ ๊ณ ์žฅ๋‚œ๋‹ค๋ฉด ๋…ผ๋ฆฌ์  ์—ฐ๊ฒฐ์ด ๋Š๊ธฐ๊ธฐ ๋•Œ๋ฌธ์— ์ €์žฅ๋œ ์ •๋ณด๊ฐ€ ์•ˆ์ „ํ•˜์ง€ ์•Š์Œ
  • Stripe: ๋งˆ์น˜ ์ค„๋ฌด๋Šฌ์ฒ˜๋Ÿผ ๋ถ„์‚ฐ๋˜์–ด ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ
  • Striping: ๋ฐ์ดํ„ฐ๋ฅผ ๋ถ„์‚ฐํ•˜์—ฌ ์ €์žฅํ•˜๋Š” ๊ฒƒ

๐Ÿ–ฅ๏ธ RAID $1$(Mirroring)

RAID $1$์€ RAID0์˜ ๋‹จ์ ์„ ๋ณด์™„ํ•˜๊ธฐ ์œ„ํ•ด ๋ณต์‚ฌ๋ณธ์„ ๋งŒ๋“œ๋Š” ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค.

  • ์žฅ์ : ๋ณต๊ตฌ๊ฐ€ ๊ฐ„๋‹จํ•จ
  • ๋‹จ์ : ๋” ๋งŽ์€ HDD ์šฉ๋Ÿ‰์ด ํ•„์š” | ๋น„์šฉ์ด ์ฆ๊ฐ€ | ์“ฐ๊ธฐ ์†๋„๊ฐ€ RAID $0$ ๋ณด๋‹ค ๋Š๋ฆผ

๐Ÿ–ฅ๏ธ RAID $4$

RAID $4$๋Š” RAID $1$์ฒ˜๋Ÿผ ์™„์ „ํ•œ ๋ณต์‚ฌ๋ณธ์„ ๋งŒ๋“œ๋Š” ๋Œ€์‹  Parity Bit๋ฅผ ์ €์žฅํ•œ ์žฅ์น˜๋ฅผ ๋‘๋Š” ๊ตฌ์„ฑ ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค.

  • ์žฅ์ : RAID $1$๋ณด๋‹ค ์ ์€ ์šฉ๋Ÿ‰์˜ HDD๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋ณด๊ด€ํ•  ์ˆ˜ ์žˆ์Œ
  • ๋‹จ์ : ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ๋  ๋•Œ๋งˆ๋‹ค Parity Bit๋ฅผ ์ €์žฅํ•˜๋Š” HDD์—๋„ ๋ฐ์ดํ„ฐ๋ฅผ ์“ฐ๊ฒŒ ๋˜๋ฏ€๋กœ Parity Bit๋ฅผ ์ €์žฅํ•˜๋Š” HDD์— ๋ณ‘๋ชฉ ํ˜„์ƒ์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Œ

Parity Bit: ์˜ค๋ฅ˜๋ฅผ ๊ฒ€์ถœํ•˜๊ณ  ๋ณต๊ตฌํ•˜๊ธฐ ์œ„ํ•œ ์ •๋ณด

๐Ÿ–ฅ๏ธ RAID $5$

RAID $5$๋Š” RAID $4$์˜ ๋‹จ์ ์„ ํ•ด๊ฒฐํ•˜๊ณ ์ž Parity Bit๋ฅผ ๋ถ„์‚ฐํ•˜์—ฌ ์ €์žฅํ•˜๋Š” ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค.

๐Ÿ–ฅ๏ธ RAID $6$

RAID $6$์€ RAID $5$์™€ ๊ฐ™์ด Parity Bit๋ฅผ ๋ถ„์‚ฐํ•˜์—ฌ ์ €์žฅํ•˜๋Š” ๋ฐฉ์‹์ด์ง€๋งŒ ์„œ๋กœ ๋‹ค๋ฅธ ๋‘ ๊ฐœ์˜ Parity Bit๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค. ์ฃผ๋กœ ์ €์žฅ ์†๋„๋ฅผ ์กฐ๊ธˆ ํฌ์ƒํ•˜๋”๋ผ๋„ ๋ฐ์ดํ„ฐ๋ฅผ ๋”์šฑ ์•ˆ์ „ํ•˜๊ฒŒ ๋ณด๊ด€ํ•˜๊ณ  ์‹ถ์„ ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

  • ์žฅ์ : RAID $4$๋‚˜ RAID $5$๋ณด๋‹ค ์•ˆ์ „ํ•œ ๊ตฌ์„ฑ
  • ๋‹จ์ : ์“ฐ๊ธฐ ์†๋„๊ฐ€ RAID $4$๋‚˜ RAID $5$๋ณด๋‹ค ๋Š๋ฆผ
This post is licensed under CC BY 4.0 by the author.

๐Ÿ–ฅ๏ธ [Computer Architecture] Memory ๐Ÿ–ฅ๏ธ

๐Ÿ–ฅ๏ธ [Computer Architecture] I/O Device ๐Ÿ–ฅ๏ธ