Signals/Interrupts Flashcards

1
Q

Can signal handlers be interrupted by signals?

A

Yes, just not of same type

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

SIGSTP

A

Cannot be overridden, pauses a process

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

SIGKILL

A

Cannot be overridden, kills an orphan - I mean process

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

(Do or Don’t) Call library functions like printf

A

Don’t

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

(Do or Don’t) Use the signal() function to register your handlers

A

Don’t

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

(Do or Don’t) Use the sigaction() function to register your handlers

A

Do

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

(Registering signal handler) sa_handler

A

Specifies handling function

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

(Registering signal handler) sa_flags

A

Clear by setting to 0 i guess

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

(Registering signal handler) sigaction(1, 2, 3)

A

1) Signal number e.g SIGINT
2) Sigaction object pointer
3) Sigaction object pointer to old handler

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

SIGINT

A

keyboard interrupt

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

SIGSEGV

A

Segmentation fault

Causes: being stupid, or making illegal memory references

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

SIGFPE

A

Arithmetic/computational exception

Causes: being stupid, or dividing by 0

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

Mode bit

A

Indicates current mode, 1=kernel, 0=user

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

(Exceptional Events) Interrupt

A

Signal from device to notify attention is needed, always returns to next instruction

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

(Exceptional Events) TRAP

A

Intentional exception, usually utilizing some kind of sys call, always returns to next instruction

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

(Exceptional Events) Fault

A

Potentially recoverable error, may return to current instruction to retry

17
Q

(Exceptional Events) Abort

A

Non-recoverable error, kills orphans, aborts program

18
Q

(Sync or Async) Interrupt

A

Async

19
Q

(Sync or Async) Trap

A

Sync

20
Q

(Sync or Async) Fault

A

Sync

21
Q

(Sync or Async) Abort

A

Async

22
Q

Interrupt handler

A

starts when exceptional event occurs

23
Q

Scheduler

A

starts/stops/saves processes