io interrupts Flashcards

1
Q

polling/ busy waiting/ synchronous io

A

constantly reading the device status to see if the status has changed in order to control the flow of information

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

what is a negative of polling/ busy waiting/ synchronous io

A

you cant do anything else whilst doing this which is a waste of the processors time as io devices are quite slow

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

how does interrupt driven/ asynchronous io work

A

an operation is initiated
the main program continues
when the operation completes an interrupt
is sent in
the main program stops and control is transferred to the interrupt service routine which reads in information from the device
the information is processed
the main program is resumed

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

what is the benefit of asynchronous io

A

lose less time from the main processor

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

why do interrupts have a priority system

A

so lower priority interrupts are able to be interrupted by higher priority but not the other way round

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

how does an interrupt service routine work

A

the interrupt comes in on an electrical signal/ line into the processor
the processor goes to a defined rest in a specific memory address where the starting address of the isr is stored
it executes the instruction at the start of that address
the processor then disables interrupts of a lower priority
the isr stores all registers onto the stack
the interrupt handler is called and when it returns the values on the stack are recovered
we return from the interrupt and back onto the main program

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

when doing an isr why do we store the registers onto the stack

A

the main program doesnt know where the interrupt will occur therefore it cant prepare for it before the routine runs
the routine may have to use the processor registers and when they are returned the processor will find the wrong data in them therefore we need a way to restore the correct values

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

when we get an interrupt how do we avoid polling through all devices to find which one sent it

A

we have multiple interrupt lines and can group things together so we only have to poll a small amount of devices
we have multiple isr so the processor isnt back to checking everything for the right isr

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

how do we make having multiple interrupt lines even more efficient

A

have all the devices on one line be the same

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

what is the negative of having all the devices on one interrupt line be the same

A

more support required on the processor which means an increase in cost and complexity

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

how can we limit the number of isr

A

at the start of the isr we push a number representing the interrupt line that caused the interrupt
then we can call the common interrupt handler that can check that value and it knows which particular interrupt to handle

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

what causes a double fault

A

if there isnt an isr for the interrupt

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

what causes a triple fault

A

if there isnt an isr for the double fault

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

what happens when a triple fault occurs

A

the machine restarts

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

what happens when a double fault occurs

A

debugging information is given

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

what is the point of the program interrupt controller

A

want to avoid having lots of wires going to the cpu as itll make it too big

17
Q

what does the program interrupt controller do and how

A

multiplexes interrupt lines; generates a single electronic signal when an interrupt occurs allowing the processor to only have one interrupt line
the interrupt handler queries the controller for which interrupt line actually caused the interrupt and gets a numeric value

18
Q

nested interrupts

A

when interrupts get interrupted due to a higher priority

19
Q

what are two negative of nested interrupts

A

complicates the code and timing
have to make sure that you can still get back to the correct state

20
Q

exceptions

A

a type of interrupt for internal processor problems

21
Q

software interrupts

A

particular instruction initiating interrupts

22
Q

what is an example of a software interrupt

A

system call

23
Q

why do we use interrupts

A

we need to know when unexpected event occur

24
Q

mask-able system/interrupts

A

one that can allow interrupts to be disabled or ignored

25
Q

unmask-able system/interrupts

A

interrupts cant be disabled or ignored

26
Q

what is a negative of maskable interrupts

A

since machines now rely on them heavily interrupts being ignored can cause massive problems
e.g. missing time sensitive events