Interrupts Flashcards

1
Q

What is an interrupt?

A

Signals generated by a software or hardware to notify the processor a process requires attention

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

How does an interrupt work?

A

obtains processor time via generating a signal or message as an indicator to processor they need to be serviced. it stops the processor and causes a break in the execution of the current routine

each interrupt has a priortiy and OS takes them into account when allocating processor time

theyre stored within abstract data structures called priortiy queues or an interrupt register

an interrupt can only interrupt lower priortiy taks to avoid any delays or loss of data to ensure most urgent tasks are performed first

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

When does an interrupt start?

A

When the current FDE cycle has finished to ensure the most efficienct use of the processor

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

Give an example of an interrupt

A

printer signalling completion of a job print or perpripheral signalling power failure

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

What is a ISR? and explain process of how interrupts are executed

A

Interrupt Service Routine

checks interrupt register at end of each FDE cycle

it compares priority levels of the interrupt and current task and if it is lower or equal priority to current task, then task continues

if it is higher priority the contents of special purpose registers in CPU is temporarily transferred into a stack stored in memory

location of appropriate ISR is loaded by loading relevant value into PC

flag is set to signal ISR has begun

once interrupt is serviced flag is reset. interrupt queue is checked for further interrupts of higher priority to process originally executed and if there is the process is repeated

if not, previous contents are popped from the stack and loaded back in the registers to resume processing

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