Scheduling Flashcards
what is meant by IO bound and CPU bound processes?
an io bound process:
the rate at which a process progresses is limited by the speed of the I/O subsystem
a CPU bound process:
the rate at which a process progresses is limited by the speed of the CPU
what is nonpre-emptive scheduling? what is preemtpive?
processes giving up the CPU voluntarily
the cpu forcing processes to stop
what issues can arrise in preemtpive scheduling? what’s the solution?
inconsistency. if a process is premepted during a system call it may leave the OS or Driver data partially updated or inconsistent
we preempt only on IO block or after the completion of system calls, or disable interupts
what 5 metrics do we use to evaluate scheduling?
CPU utilisation - % of time the CPU is busy
throughput - num of processes complete in a given time
turnaround time - time from submission of a process to its completion
waiting time - total time in the ready queue
response time - time from submission of process to time f first response
what is the dispatcher?
switches from one task to another, perfoming needed tasks such as
- context switching
- switching to user mode
- jumping to memory locations
what is SJF?
shortest job first
an optimal scheduler, in terms of waiting time
not possible to implement because we cant predict the future
how do we predict burst length?
an exponential average of the previous burst lengths
what is priority scheduling?
assign a priority to each process
potential problem of starvation
we use aging to prevent this
determine priority based on memory requirement, CPU/IO burst ratio, system vs user process, set by user
what is a multilevel queue
used whne processes can be easily classified into groups
group members have similar scheduling needs, foreground or background eg
the queue is partitioned into severeal seprate queues
feedback queues allow movement between queues, moving down if they take too long or up if they starve
what is a context switch?
saving the state of the current process in its PCB, with info such as the current values in the registers, and then loading the state of a different process which is scheduled to run