6. Scheduling : Introduction

이석환·2022년 10월 20일

OS

목록 보기
6/6

Process Scheduling

What is process shceduling ?

  • Ready queue에 있는 process를 대상으로 next를 선택하는 것
    OS에 의해 다음 실행을 선택한다.

Which "scheduling" is best ?

  • User-oriented: Turnaround time(TAT), Response time, Deadline ...
  • System-oriented:Throughput, Processor utilization ...
  • Fairness, Balacing resources, Enforcing priority ...

User-oriented - 사용자 관점에서 바라보자 !

  • Turnaround time : 처음부터 끝까지 걸리는 시간
  • Response time : 요청을 시작해서 첫 번째 요청을 받을때까지의 시간

System-oriented - 시스템 관점

  • Throughput : 처리량

Fairness - 공정하게 하기 위함 !

Impossible to optimize all of them simultaneously
Ex) Good response time -> frequent context switching -> increase overhead -> lower system throughput

좋은 Schedulig을 선택하기 위한 기준을 동시에 만족할 수 없다 !
기준을 정하고 선택하는 것이 중요 !!

  • Long-term scheduling
    - 어떤 process를 새로운 process로 만들지
  • Mid-term scheduling
    - swap 후 어떤 process를 올릴지
  • Short-term scheduling (일반적으로 사용)
    - ready queue 내에서 순서를 결정하자

Terminology For Scheduling

  • Non preemptive (cooperative) scheduling
    - 한 번 process가 Running state로 들어가면 그 process는 스스로 CPU에 대한 권한을 OS에게 주기 전 까지 계속 진행
  • Preemptive scheduling
    - 일반적으로 많이 사용하며 중간에 멈췄다가 OS가 원하는 순간 다시 진행한다.
    contexet switching이 자주 일어나기 때문에 최적화를 해야한다.
profile
반갑습니다.

0개의 댓글