week 3 Flashcards

1
Q

scheduler

A

decides which job to allocate the CPU to
must make efficient use of the CPU because process switching is expensive

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

events to switch between processes

A

switch from user mode to kernel mode
state of current process saved
store registers in the process table
process selected by running scheduling algorithm
MMU reloaded with memory map of new process
start new process

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

behaviours of different processes

A

i/o bound processes have short bursts, frequent i/o waits
cpu bound processes have long bursts , infrequent i/o waits

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

two types of scheduling algorithms

A

pre-emptive - picks a process and lets it run for some quantum (amount of time)
non pre-emptive - picks a process and runs it until it blocks or voluntarily releases the CPU

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

three environments for scheduling algorithms

A
  1. batch - non pre-emptive or pre-emptive
  2. interactive - pre-emptive
  3. real time - non pre-emptive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

scheduling algorithm goals

A

all systems
fairness - give each process fair share of CPU
policy enforcement - stated policy is carried out
balance - keep all parts of the system busy

batch
throughput - maximise number of jobs per hour
turnaround time - minimise time between submission and termination
CPU utilisation - keep the CPU busy at all times

interactive
response time - respond to requests quickly
proportionality - meet user expectations

real time systems
meeting deadlines - avoid losing data
predictability - avoid quality degradation in multimedia systems

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

scheduling algorithms for batch systems

A

fcfs (first come, first served)
- non pre-emptive
- processes assigned CPU in order they request it
- queue formed, head of queue runs, new processes added to the end of the queue
PROS: simple to program
CONS: i/o bound processes take a long time and slow down compute bound processes

shortest job first
- non pre-emptive
- job with shortest execution time runs first
PROS:
CONS: only works when all jobs are available simultaneously

shortest remaining time next
- pre-emptive
- scheduler choses job with shortest remaining run time
CONS: runtime must be known

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

schdeuling algorithms for interactive systems

A

round robin
- each process runs for specific quantum
- long quantum: less context switching, poor response times to short requests
- short quantum: too much context switching, short jobs benefit

priority scheduling
- each process assigned a priority, process with highest priority runs for quantum
- scheduler to decrease priority at each clock tick to avoid high priority processes from running indefinitely

multiple queues
shortest process next

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