July 10 Flashcards

(22 cards)

1
Q

Signals:

A

form of interprocess communication

unexpected asychronous events that can happen at an time

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

example of signals

A
floating point error
death of child
interval timer expired
termination request
suspend request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

events are called what

A

interrupts

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

when a kernal recognizes an event it does

A

signal to the process

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

can normal processes send signals

A

yes

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

what are signals for

A

when a program forks into 2 more processes, rarely do they execute independently

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

the forked processes need what

A

sychronization

this does not transfer data

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

example signals

A

SIGINT - terminates by ctr c

SIGSTOP - suspends process

death of child

interval timer (alarm clock) expires

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

SIGSEGV

A

segmantation fault

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

SigPipe

A

writing to a pipe whose read end is closed

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

SigPipe

A

writing to a pipe whose read end is closed

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

what is needed for signals

A

include

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

signal handler

A

when c program recieves a signal, control is imeeddiantly passed to a signal handler

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

how a process can deal with signal

A
  1. do a user defined action
  2. ignore signal
  3. take default action (usually termination of process)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

signal(SIGINT, SIG_IGN);

A

calls ignore signal, and does nothing if give SIGINT

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

signal(SIGFPE, SIGDFL)

A

default response

17
Q

can you change all signal responses uusing what fcn?

A

no SIGKILL and SIGSTOP cannot change using sig(action()

18
Q

can you change all signal responses uusing what fcn?

A

no SIGKILL and SIGSTOP cannot change using sig(action()

19
Q

blocking signals

A

can temporarily block it
signal is held until process unblocks it
when process ignores a signal it is throw away

20
Q

What happen if a signal is recieved when a handler is running

A

first is suspended and newly invoked handler runes then the first hanlder is resumed

21
Q

sa_mask

A

can be used to block out signals while one handler is running

22
Q

signal sets

A

are usetd to store sets of signals that are currently blocked and unblocked