Scheduling Flashcards

1
Q

what is meant by IO bound and CPU bound processes?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is nonpre-emptive scheduling? what is preemtpive?

A

processes giving up the CPU voluntarily

the cpu forcing processes to stop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what issues can arrise in preemtpive scheduling? what’s the solution?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what 5 metrics do we use to evaluate scheduling?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is the dispatcher?

A

switches from one task to another, perfoming needed tasks such as

  • context switching
  • switching to user mode
  • jumping to memory locations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is SJF?

A

shortest job first
an optimal scheduler, in terms of waiting time
not possible to implement because we cant predict the future

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how do we predict burst length?

A

an exponential average of the previous burst lengths

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is priority scheduling?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is a multilevel queue

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a context switch?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly