ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

๋ฐ˜์‘ํ˜•

OS(Operating System, ์šด์˜์ฒด์ œ)๐ŸŒž


ํ„ฐ๋ฏธ๋„ ์‚ฌ์šฉ๋ฒ• ๋ฐ ๊ธฐ๋ณธ ๋ช…๋ น๐ŸŒŸ

  • grep, awk, sed, lsof, curl, wget, tail, head, less, find, ssh, kill

Reference

16 Terminal commands every user should know

35 Linux Basic Commands Every User Should Know

Linux ๋ช…๋ น์–ด ๋ชจ์Œ Best 50


OS์˜ ์ผ๋ฐ˜์ ์ธ ์ž‘๋™ ์›๋ฆฌ๐ŸŒŸ

Operating System

  • Computer User์™€ Computer Hardware(CPU, I/O) ์‚ฌ์ด์˜ ์ธํ„ฐํŽ˜์ด์Šค ์—ญํ• 
  • ์ž์›์ด ํ•„์š”ํ•œ ํ”„๋กœ๊ทธ๋žจ์— ์ž์›์„ ํ• ๋‹นํ•ด์ฃผ๊ณ , ์ž์›์„ ํ• ๋‹น๋ฐ›์€ ํ”„๋กœ๊ทธ๋žจ๋“ค์˜ ์‹คํ–‰์„ ์ œ์–ด
  • ์šด์˜์ฒด์ œ๊ฐ€ ํ•˜๋Š” ์ผ
    • Process management
    • Memory management
    • Storage management
    • Protection and Security

Works

  • ๊ธฐ๋ณธ์ ์ธ ๋™์ž‘ ์›๋ฆฌ๋กœ OS๋Š” ์‚ฌ์šฉ์ž์˜ ์š”์ฒญ(Event ํ˜น์€ Interrupt, H/W interrupt or S/W interrupt)์ด ๋ฐœ์ƒํ•˜๋ฉด ์ ์ ˆํ•˜๊ฒŒ ์ž์›(CPU, I/O, ๋ฉ”๋ชจ๋ฆฌ ๋“ฑ)์„ ๋ถ„๋ฐฐํ•˜์—ฌ ๊ทธ ์š”์ฒญ์„ ์ฒ˜๋ฆฌ
  • OS Loading
    1. ์ปดํ“จํ„ฐ ์ „์›์ด ์ผœ์ง€๋ฉด CPU๋Š” ROM(Read Only Memory)์— ์ €์žฅ๋œ ๋‚ด์šฉ์„ ์ฝ๋Š”๋‹ค.
      • ROM์—๋Š” POST(Power ON Self-Test)์™€ ๋ถ€ํŠธ๋กœ๋”(Boot Loader)๊ฐ€ ์ €์žฅ
      • POST : ์ปดํ“จํ„ฐ ์ „์›์ด ์ผœ์ง€๋ฉด ๊ฐ€์žฅ ๋จผ์ € ์‹คํ–‰๋˜๋Š” ํ”„๋กœ๊ทธ๋žจ์œผ๋กœ ์ปดํ“จํ„ฐ์— ์ด์ƒ์ด ์žˆ๋Š” ์ง€ ์ฒดํฌ
      • Boot Loader : ํ•˜๋“œ๋””์Šคํฌ์— ์ €์žฅ๋˜์–ด ์žˆ๋Š” OS ํ”„๋กœ๊ทธ๋žจ์„ ๊ฐ€์ ธ์™€์„œ RAM์— ๋„˜๊ฒจ์ฃผ๋Š” ์—ญํ• 
    2. CPU๋Š” ์ดˆ๊ธฐํ™”๋ฅผ ์œ„ํ•ด Boot Loader์— ๋ชจ์ธ ๋ช…๋ น๋“ค์„ ์ฝ๊ณ , Dist(SSD, HDD)์— ์žˆ๋Š” ํ”„๋กœ๊ทธ๋žจ๋“ค(OS..)์„ RAM(Random Access Memory)์— ์˜ฌ๋ฆฐ๋‹ค.
    3. ํ”„๋กœ๊ทธ๋žจ๋“ค์ด ๋ฉ”๋ชจ๋ฆฌ์— ์˜ฌ๋ผ์˜ค๋ฉด CPU๊ฐ€ ํ•ด๋‹น ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘๋™์‹œํ‚จ๋‹ค.

Reference

OS์˜ ๊ตฌ์กฐ ๋ฐ ์›๋ฆฌ


ํ”„๋กœ์„ธ์Šค ๊ด€๋ฆฌ๐ŸŒŸ

  • ํ”„๋กœ์„ธ์Šค: ๋ฉ”์ธ ๋ฉ”๋ชจ๋ฆฌ์— ํ• ๋‹น๋˜์–ด ์‹คํ–‰์ค‘์ธ ์ƒํƒœ์ธ ํ”„๋กœ๊ทธ๋žจ
    • PCB(Process Control Block): ํ”„๋กœ์„ธ์Šค์— ๋Œ€ํ•œ ๋ชจ๋“  ์ •๋ณด๊ฐ€ ๋ชจ์—ฌ์žˆ๋Š” ๊ณณ
    • ํ”„๋กœ์„ธ์Šค์˜ ์ƒํƒœ, ํ”„๋กœ์„ธ์Šค ๋ฒˆํ˜ธ(PID), ํ•ด๋‹น ํ”„๋กœ์„ธ์Šค์˜ program counter(pc), register๊ฐ’, MMU์ •๋ณด, CPU์ ์œ  ์‹œ๊ฐ„ ๋“ฑ์ด ํฌํ•จ
    • CPU๋Š” ํ•œ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์ข…๋ฃŒ๋  ๋•Œ๊นŒ์ง€ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ์—ฌ๋Ÿฌ ํ”„๋กœ์„ธ์Šค๋ฅผ ์ค‘๊ฐ„ ์ค‘๊ฐ„์— ๋ฐ”๊ฟ”๊ฐ€๋ฉด์„œ ์ˆ˜ํ–‰
      • ๊ทธ๋Ÿฌ๋ฏ€๋กœ CPU๋Š” ์ˆ˜ํ–‰์ค‘์ธ ํ”„๋กœ์„ธ์Šค๋ฅผ ๋‚˜๊ฐˆ ๋•Œ, ์ด ํ”„๋กœ์„ธ์Šค์˜ ์ •๋ณด๋ฅผ ์–ด๋”˜๊ฐ€์— ์ €์žฅํ•˜๊ณ  ์žˆ์–ด์•ผ ๋‹ค์Œ์— ์ด ํ”„๋กœ์„ธ์Šค๋ฅผ ์ˆ˜ํ–‰ํ•  ๋•Œ ์ด์ „์— ์ˆ˜ํ–‰ํ•œ ๊ทธ ๋‹ค์Œ๋ถ€ํ„ฐ ์ด์–ด์„œ ์ž‘์—…ํ•  ์ˆ˜ ์žˆ๋‹ค.
      • ์ด๋Ÿฌํ•œ ์ •๋ณด๋ฅผ ์ €์žฅํ•˜๋Š” ๊ณณ์ด PCB

Reference

ํ”„๋กœ์„ธ์Šค ๊ด€๋ฆฌ


์Šค๋ ˆ๋“œ์™€ ๋™์‹œ์„ฑ๐ŸŒŸ

  • Thread : ์‹คํ–‰๋˜๋Š” ํ๋ฆ„์˜ ๋‹จ์œ„
    • ์ผ๋ฐ˜์ ์œผ๋กœ ํ•œ ํ”„๋กœ๊ทธ๋žจ์€ ํ•˜๋‚˜์˜ ์‹คํ–‰๋˜๋Š” ํ๋ฆ„์ด ์กด์žฌ
    • ์ด ํ๋ฆ„์ด ์—ฌ๋Ÿฌ๊ฐœ ์žˆ๋‹ค๋ฉด Multi-Thread-Programming
  • Process : ์ปดํ“จํ„ฐ์—์„œ ์—ฐ์†์ ์œผ๋กœ ์‹คํ–‰๋˜๊ณ  ์žˆ๋Š” ์ปดํ“จํ„ฐ ํ”„๋กœ๊ทธ๋žจ
    • ์—ฌ๋Ÿฌ๊ฐœ์˜ Processor(Process์˜ ์ธ์นญํ™”)๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฑธ Multi-processing
  • Parallelism(๋ณ‘๋ ฌ์„ฑ) : ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์ž‘์—…์„ ์—ฌ๋Ÿฌ CPU์—์„œ ๋™์‹œ์— ๋ณ‘๋ ฌ๋กœ ์ž‘์—…ํ•  ์ˆ˜ ์žˆ๋Š” Process ๋‹จ์œ„๋กœ ๋ถ„ํ• 
    • ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์“ฐ๋ ˆ๋“œ๊ฐ€ ์žˆ์œผ๋ฉด ๋ฐ์ดํ„ฐ ๋ฐ ๋ฆฌ์†Œ์Šค ์ธก๋ฉด์—์„œ ์„œ๋กœ ๋…๋ฆฝ์ ์œผ๋กœ ์œ ์‚ฌํ•œ ์ž‘์—…์„ ์ฒ˜๋ฆฌ
  • Concurrency(๋™์‹œ์„ฑ): ์„œ๋กœ ๋…๋ฆฝ์ ์ธ ์ž‘์—…์„ ์ž‘์€ ๋‹จ์œ„์˜ ์—ฐ์‚ฐ์œผ๋กœ ๋‚˜๋ˆ„๊ณ  ์‹œ๊ฐ„ ๋ถ„ํ•  ํ˜•ํƒœ๋กœ ์—ฐ์‚ฐํ•˜์—ฌ ๋…ผ๋ฆฌ์ ์œผ๋กœ ๋™์‹œ์— ์‹คํ–‰๋˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์—ฌ์ฃผ๋Š” ๊ฒƒ (๋…ผ๋ฆฌ์ ์ธ ๊ฐœ๋…์ด๊ธฐ ๋•Œ๋ฌธ์— ๋‹จ์ผ ์“ฐ๋ ˆ๋“œ์—์„œ๋„ ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•œ ๊ฐœ๋…)

Reference

Concurrency and Thread


๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ๐ŸŒŸ

  • ๊ฐ€์žฅ ๋‹จ์ˆœํ•œ ํ˜•ํƒœ์˜ ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ ๋ฐฉ๋ฒ•์€ ํ”„๋กœ๊ทธ๋žจ์˜ ์š”์ฒญ์ด ์žˆ์„ ๋•Œ, ๋ฉ”๋ชจ๋ฆฌ์˜ ์ผ๋ถ€๋ฅผ ํ•ด๋‹น ํ”„๋กœ๊ทธ๋žจ์— ํ• ๋‹นํ•˜๊ณ , ๋” ์ด์ƒ ํ•„์š”ํ•˜์ง€ ์•Š์„ ๋•Œ ๋‚˜์ค‘์— ๋‹ค์‹œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ• ๋‹น์„ ํ•ด์ œํ•˜๋Š” ๊ฒƒ

Reference

๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ


IPC

  • ํ”„๋กœ์„ธ์Šค ๊ฐ„ ํ†ต์‹ (Inter Process Communication)๐ŸŒŸ
    • ํ”„๋กœ์„ธ์Šค๋Š” ๋ณธ๋ž˜ ๋…๋ฆฝ์ ์ด๋‚˜, ์ƒํ™ฉ์— ๋”ฐ๋ผ ํ”„๋กœ์„ธ์Šค๋ผ๋ฆฌ ํ˜‘๋ ฅํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ์ด ๊ฒฝ์šฐ, ํ”„๋กœ์„ธ์Šค ๊ฐ„ ์ž์›/๋ฐ์ดํ„ฐ ๊ณต์œ ๊ฐ€ ํ•„์š”ํ•œ๋ฐ, ์ด๋•Œ ํ•„์š”ํ•œ ๊ฒƒ์ด IPC
  • IPC ๊ธฐ๋ฒ•์˜ ์ข…๋ฅ˜
    • ๋ฉ”์‹œ์ง€ ์ „๋‹ฌ
    • ๊ณต์œ  ๋ฉ”๋ชจ๋ฆฌ

Reference

ํ”„๋กœ์„ธ์Šค ๊ฐ„ ํ†ต์‹ 


์ž…์ถœ๋ ฅ ๊ด€๋ฆฌ๐ŸŒŸ

  • ์—ฌ๋Ÿฌ ์ž…์ถœ๋ ฅ ์žฅ์น˜๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์กด์žฌ
  • ์ž…์ถœ๋ ฅ ์žฅ์น˜์˜ ์„ฑ๋Šฅ ํ–ฅ์ƒ์„ ์œ„ํ•ด Buffering, Caching, Spooling ์‚ฌ์šฉ
  • Buffering : CPU์˜ ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ ์†๋„์™€ ์ž…์ถœ๋ ฅ ์žฅ์น˜์˜ ๋ฐ์ดํ„ฐ ์ „์†ก ์†๋„์˜ ์ฐจ์ด๋กœ ์ธํ•œ ๋ฌธ์ œ ํ•ด๊ฒฐ
    • ์ž…์ถœ๋ ฅ ๋ฐ์ดํ„ฐ ์ „์†ก ์‹œ ์ผ์‹œ์ ์œผ๋กœ Buffer์— ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅ
    • ๋‹จ์ผ ๋ฒ„ํผ๋ง : ์ €์žฅ๊ณผ ์ฒ˜๋ฆฌ๊ฐ€ ๋™์‹œ์— X
    • ์ด์ค‘ ๋ฒ„ํผ๋ง : ์ €์žฅ๊ณผ ์ฒ˜๋ฆฌ๊ฐ€ ๋™์‹œ์— O
    • ์ˆœํ™˜ ๋ฒ„ํผ๋ง : ์ด์ค‘ ๋ฒ„ํผ๋ง ํ™•์žฅ
  • Spooling
    • Simultaneous Peripheral Operation On Lien(SPOOL)
    • ์ปดํ“จํ„ฐ ์‹œ์Šคํ…œ์—์„œ ์ค‘์•™์ฒ˜๋ฆฌ์žฅ์น˜์™€ ์ž…์ถœ๋ ฅ์žฅ์น˜๊ฐ€ ๋…๋ฆฝ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋„๋ก ํ•จ์œผ๋กœ์จ ์ค‘์•™์ฒ˜๋ฆฌ์žฅ์น˜์— ๋น„ํ•ด ์ฃผ๋ณ€์žฅ์น˜์˜ ์ฒ˜๋ฆฌ์†๋„๊ฐ€ ๋Š๋ ค์„œ ๋ฐœ์ƒํ•˜๋Š” ๋Œ€๊ธฐ์‹œ๊ฐ„์„ ์ค„์ด๊ธฐ ์œ„ํ•ด ๊ณ ์•ˆ๋œ ๊ธฐ๋ฒ•
    • ์ž…์ถœ๋ ฅ ํ”„๋กœ์„ธ์Šค์™€ ์ €์† ์ž…์ถœ๋ ฅ์žฅ์น˜ ์‚ฌ์ด์˜ ๋ฐ์ดํ„ฐ ์ „์†ก์„ ์ž๊ธฐ ๋””์Šคํฌ์™€ ๊ฐ™์€ ๊ณ ์† ์žฅ์น˜๋ฅผ ํ†ตํ•˜๋„๋ก ํ•จ

Reference

์šด์˜์ฒด์ œ ์„œ๋น„์Šค

์ž…์ถœ๋ ฅ ๊ด€๋ฆฌ


POSIX ๊ธฐ์ดˆ๐ŸŒŸ

  • stdin, stdout, stderr, pipes ..
  • ์ด์‹ ๊ฐ€๋Šฅ ์šด์˜ ์ฒด์ œ ์ธํ„ฐํŽ˜์ด์Šค(portable operating system interface)์˜ ์•ฝ์ž
  • ์„œ๋กœ ๋‹ค๋ฅธ UNIX OS์˜ ๊ณตํ†ต API๋ฅผ ์ •๋ฆฌํ•˜์—ฌ ์ด์‹์„ฑ์ด ๋†’์€ ์œ ๋‹‰์Šค ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์„ ๊ฐœ๋ฐœํ•˜๊ธฐ ์œ„ํ•œ ๋ชฉ์ ์œผ๋กœ IEEE๊ฐ€ ์ฑ…์ •ํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ธํ„ฐํŽ˜์ด์Šค ๊ทœ๊ฒฉ
  • POSIX

Reference

POSIX ๊ธฐ์ดˆ


๋„คํŠธ์›Œํฌ ๊ธฐ๋ณธ ๊ฐœ๋…๐ŸŒŸ

Reference

๋„คํŠธ์›Œํฌ ๊ธฐ๋ณธ ๊ฐœ๋…(1)

๋„คํŠธ์›Œํฌ์˜ ๊ธฐ๋ณธ ๊ฐœ๋…

Computer Network ๊ธฐ๋ณธ ๊ฐœ๋…

thumbnail

๋ฐ˜์‘ํ˜•
๋Œ“๊ธ€
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
๋งํฌ
Total
Today
Yesterday