multi-process systems Flashcards

1
Q

what are the 3 types of multi-process systems

A

batch
real time
interactive

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

what are real time systems and what are the 2 types

A

time critical elements to operation of processes
soft and hard

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

how do batch systems work

A

they run a job periodically e.g. a payroll

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

how are batch systems non pre-emptive

A

it allows a job to fully complete before starting another one

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

what is the role of scheduling policies

A

decide which job to run next

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

how does the shortest job scheduling policy give higher throughput

A

as you are quickly able to submit more jobs

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

negative of shortest job first

A

unfair on longer jobs

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

negatives of longest job first

A

starves the shorter jobs of processing time
if the job isnt critical then the user may think that the system is unresponsive

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

what are the 2 types of processes and explain them

A

cpu bound: spend most of the time processing data e.g. doing calculations
i/o bound: spends most time waiting for data

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

what is a negative of cpu bound processes

A

they usually run for a longer time before releasing control which prevents other processes from getting access to the processor

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

what is a positive of io bound processes

A

v frequently give up control and are usually blocked whilst waiting on a device

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

what is scheduling overhead

A

the cost of every process switch: time to handle the interrupt, save the current process , select the next process and recover its process control block

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

negative of io bound processes

A

can have lots of scheduling overhead if switching often

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

what are the two types of interactive systems

A

cooperative multitasking system
pre-emptive multitasking system

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

cooperative multitasking system

A

yield operations that are inserted every few lines in the code invoke the scheduler giving the system a choice to move to another operation

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

pre-emptive multitasking system

A

scheduler forcibly takes control at regular intervals

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

cooperative multitasking system positive

A

stops the cpu processes from blocking others for too long

18
Q

priority scheduling

A

each process has a priority with separate queues for each priority (usually round robin)

19
Q

what is priority inversion and in what case would we use it

A

inverting the priority of processes so that low priority get a burst of cpu time ( this happens at intervals)
a high priority process needs a recourse held by a low priority in a critical selection they both cant run as the hp needs the recourse and the lp is being blocked by the hp

20
Q

what are deferred procedure calls

A

the isr does the essential work and the rest of the work is deferred to another process
this still runs but just later

21
Q

what kind of privileges does a deferred system have

A

the least in the system

22
Q

why do we use deferred procedure calls

A

due to a large number of interrupts per second and failure to complete them can cause system failure
but dont want to spend all the process time doing interrupts

23
Q

what are the three types of schedulers

A

long term
medium term/high level
short term/low level

24
Q

long term scheduler

A

decides whether a job should be allowed on the system
e.g. are there enough resources on the system for it

25
Q

medium term/high level scheduler

A

which set of jobs should be in memory at any given time
which process should run on which processor

26
Q

short term/low level scheduler

A

called at every time slice and decides which process should run next

27
Q

dispatcher

A

the code that actually switches the process control blocks

28
Q

what are the 5 things we look for in scheduling criteias

A

cpu utilisation
throughput
turnaround time
waiting time
response time

29
Q

cpu utilisation

A

the % of time the cpu is running app code

30
Q

throughput

A

how many jobs are being complete in a certain time

31
Q

turnaround time

A

how long it takes a job to complete after submission

32
Q

waiting time

A

how long a job is in the ready queue

33
Q

response time

A

the time between starting a job and when it begins to do something useful

34
Q

how do we calculate the waiting time

A

dispatch time - arrival time
avg = total dispatch time / number of processes

35
Q

how do we calculate the turnaround time

A

completion time - arrival time

36
Q

how is round robin scheduling pre-emptive

A

the scheduler forces a context switch at defined intervals

37
Q

scheduling quantum

A

the time each process is allowed to run in round robin

38
Q

how do we calculate the avg wait time in round robin

A

must account for each time its back in the ready queue as its places back there when the quantum runs out

39
Q

how does round robin scheduling work

A

once we get an interrupt we add it to the scheduling function
we loop through processes in order and when one is de-scheduled at the end of the time slice then we place the process at the back of the queue

40
Q

what is the role of scheduling function

A

decides which process should run next

41
Q

what happens when we have a long scheduling quantum

A

the system will seem less interactive as there will be fewer context switched
however this is more efficient

42
Q

what happens when we have a short scheduling quantum

A

more interactive but more switches makes it less efficient as there will be more scheduling overhead