Exceptions Flashcards

1
Q

what is an exception

A

circumstance outside of normal operation flow

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

what exceptions are handled by the OS

A

ones that originate from hardware

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

what examples of hardware exceptions are there

A
reset
system calls
emulator trap
memory fault
interrupt
privilege violation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what happens upon an exception

A

system call to OS
raise privilege level of processor
execute trusted code to get more info and take action

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

what action would be taken upon a segmentation fault

A

exterminate the process

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

what action would be taken upon a page fault

A

corrective action e.g. fetch from memory

and resume

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

describe exact and inexact exceptions

A

exact- occur at a fixed position

inexact- occur at unknown position e.g. interrupt

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

what is an interrupt

A

caused by hardware to take control of the processor

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

what is an interrupt service routine

A

trusted piece of code that does not affect anything- no context switch or anything, just borrows the processor.

determines the interrupt source using hardware or software

quick and lightweight
urgent- latency kept low

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

when is enable/disabling interrupts especially imporant

A

during reset and boot

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

what is a system call

A

allows user applications to request a service

an exception

atomic action

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

give example system calls

A

access to file system

IPC

resource management

process management

access to private variables such as time

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

what is reset

A

this is the highest priority exception in any system.

used at start up to get the boot process going

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

describe the steps of a reset

A

set to highest privilege level

disable all interrupts

turn off memory mapping

disable cache

OS can then initialise before enabling each of these

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

how does an ISR determine the source of an interrupt (2 methods)

A

hardware- there is hardware that provides a vector to the relevant ISR when interrupting

software- a missive switch statement

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