HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📝
남득윤 학습 저장소
/
쉽게 배우는 운영체제
쉽게 배우는 운영체제
/
3️⃣
챕터 03. 프로세스와 스레드
3️⃣

챕터 03. 프로세스와 스레드

 

01 프로세스의 개요

프로세스

  • 운영체제로부터 시스템 자원을 할당 받아 작업을 실행하는 단위
  • 프로그램이 메모리에 올라 간 것
 
시스템 자원
  • cpu 타임
  • 메인 메모리 (램)
  • 2차 메모리 (HDD, SDD, …)
  • …
 

프로그램 → 프로세스

notion image
Process = 프로그램 + PCB
 

프로세스의 상태

notion image
 

02 PCB와 Context Switch

PCB 의 구성

notion image
  • 포인터 : ready status 나 blocking 상태의 queue 를 관리하기 위한 포인터
  • 프로세스 상태 : new, ready, running, wait, suspended wait, suspended ready…
  • PID
  • PC : Program Counter
  • 프로세스 우선순위 (queue 에서 활용되는 우선순위)
  • 각종 레지스터
    • accumulator
    • index register
    • stack pointer, …
  • 메모리 관리 정보
    • 메모리 위치 정보
    • 경계 레지스터 값, 한계 레지스터 값
    • segemetation table, paging table, …
  • 할당된 자원 정보
  • 계정 정보
  • PPID, CPID
 

Context Switching

두 프로세스의 PCB를 교환하는 작업
notion image
 
 

04 스레드

스레드 (a.k.a 경량 프로세스!)

def. 프로세스의 코드에 정의된 절차에 따라 CPU에 작업 요청을 하는 실행 흐름의 단위
💡 job > task(프로세스) > operation(스레드)
 
💡 스레드 : Virtual Memory Space 를 공유한다.
스레드는 code, data, heap 영역을 공유한다.
notion image