프로세스와 스레드
ComputerScience/System Programming

프로세스와 스레드

아무것도 실행하고 있지 않다…



 

아래 prcess 실행 중

  -> context switching

위 process 윗thread 실행 중

 

 

위 process 윗thread 실행 중

  -> 그 다음 thread 할당 받기

윗 process 아래 thread실행 중

  - 다음 thread는 이전 thread와 code data, heap은 공유하고 있기 때문에
  - pcb에 있던 register block : 이것만 바뀐다. thread별로 존재하므로

 

 

 

 

  - multi Thread가 multi processing보다 context switching 비용이 적다.