CPU Scheduler
the scheduler selects a process from the processes in memory that are ready to execute and allocates the CPU to that process
Dispatcher
module that gives actual control of the CPU to the process selected by the scheduler.
dispatch latency = time it takes for the dispatcher to stop one process an dstart another process.
CPU- scheduling decisions may take place under the following 4 circumstances
- running state to waiting state (I/O event)
- running state to ready state (interrupt occurs)
- waiting state to ready state (completion of I/O)
- when a process terminate
In 1,4 situation decision are not needed , if new process exists it will be selected for execution. == non preemptive
In 2,3 situation == preemptive , CPU can be taken away and give it to another process.
Scheduling Criteria
we want to maximize CPU utilization.
Throughput = number of process that are completed per time unit, called throughput.
Turnaround time = sum of the periods spen waiting to get into memory , waiting in the ready queue, executing on the cpu, and doing I/O == The time period from submitting the process to entire completion.
Waiting time = sum of the periods spent waiting in the ready queue. == CPU Scheduler only affect this time. not execution time or I/O.
Response time = time from the submission of a request unti the first response is produced.
FCFS Scheduling
Process that request the CPU first is allocated the CPU first.
if CPU burst times vary greatly , average waiting time might not be minimal.
Non preemptive
'Operating System > O.S(Neso Academy, HPC Lab. KOREATECH)' 카테고리의 다른 글
HPC Lab) Semaphore + event count , Monitor (0) | 2021.05.18 |
---|---|
12)FCFS Scheduling , Shortest Job First , Priority (0) | 2021.05.14 |
10)Threading issue (fork , cancellation) , CPU and I/O burst cycles (0) | 2021.05.10 |
9)Threads , Hyper-threading , fork() and exec() System call (0) | 2021.05.09 |
8) Sockets , Remote Procedure Call(RPC) (0) | 2021.05.06 |