ecsimsw

Process Management / job queue 본문

Process Management / job queue

JinHwan Kim 2019. 9. 23. 17:17

Process

 

   - Program in execution

 

   - states : new / ready/ running / waiting / terminated

 

process states

Process Control Block (PCB)

 

   - 하나의 프로세스 당 하나의 PCB 할당. 프로세스의 정보를 저장한다.

 

   - state, pc, register information, mmu information, cpu time, pID, list of open files

 

   - 레지스터 정보는 인터럽트 이후 복구 시 이전 레지스터 상태를 알아야하기 때문에 저장하고, pID는 프로세스 ID, pc는 program counter로 명령어의 위치 주소를 가리킨다.

 

Job Queue

 

job queue

Scheduler 

 

   Queue안의 process(job)의 할당 순서를 정해주는 프로세스. term 주기가 길고 짧음에 따라 아래와 같이 분류됨.

 

   - Long term scheduler : job queue의 프로세스 순서를 정하여 메모리에 할당.

 

   - Short term scheduler : ready queue의 프로세스 순서를 정하여 cpu에 할당.

 

   - Medium term scheduler : 메모리 상에 idle한 프로세스를 swap out 하거나 backing store에서 다시 swap in 시킴.

 

Swapping

 

   - swap out : 메모리 상의 idle한 프로세스를 hdd, backing store으로 swapping 쫓아냄.

  

   - swap in : backing store (swap device) 에서 메인 메모리로 돌아옴

 

Context switch 

 

   - 현재 프로세스 처리를 중단하고 다른 프로세스를 처리함. Dispatch 과정에서 context switch overhead 발생.

 

Dispatcher 

 

   - 프로세스의 상황을 해당 PCB에 저장하고, 다음 처리할 프로세스의 PCB를 읽어 이전 상황을 복구한다. 

'Computer Science > Operating system' 카테고리의 다른 글

Process / Thread  (0) 2019.09.26
Cpu scheduling  (0) 2019.09.24
Interrupt  (0) 2019.09.23
Introduction  (0) 2019.09.23
Operating System Concepts - Abraham Silberschatz  (0) 2019.09.23
Comments