Exceptional Control Flow Flashcards

1
Q

fork()

A

creates new process, that is exact copy of parent process. fork() returns 0 in the child, and returns the pid of the child to the parent.

fork() returns twice.

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

Interrupts

A

interrupts occur asynchronously as a result of signals from IO devices that are external to the processor. they are not caused by a particular instruction.

return behavior: always returns to next instruction

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

Trap

A

intentional exceptions that are caused by executing an instruction. Traps provide an interface between user programs and the Kernel (in the form of system calls).

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

Examples of System calls

A

read (reading a file),
fork (creating a process),
execve (loading new program)
exit (terminating)

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

Faults

A

Fault result from error conditions that a handler might ne able to correct. When a fault occurs the processor transfers control to a handler that may or may not be able to recover from the fault. if recovery is possible return to faulting instruction. else abort.

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

Examples of Faults

A

page fault exception, Divide Error, General Protection Fault (seg-fault).

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

Aborts

A

unrecoverable fatal errors. Eg. hardware error. Aborts to not return control to the program, but terminate.

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

Def: Process

A

an instance of a running program

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

Process Abstractions

A

1) logical control flow, each process things it is only program running.
2) private address space

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

Process states

A

1) running
2) stopped, suspended and will not be scheduled until it get the signal todo so.
3) Terminated the process is stopped permanently. (terminated or returned from main, exited)

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

Reaping Child Process

A

The processor returns the childs exit status to the parent.

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