chapter 5: process API Flashcards

1
Q

the four main calls in Process API

A

fork, wait, exec, kill

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

how does fork() work?

A

creates a child process that is almost an exact copy of the parent with a DIFFERENT pid, has its own registers, own PC, the return value however is 0.

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

return value of fork()

A

0 for child.
< 0 failed.
>0 is parent

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

how does the wait() call work?

A

parent calls it to wait for child to return. so parent can act after the children returns

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

how does the exec() call work?

A

run a program that is different from the calling program.

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

how does the kill() call work

A

send signals to a process, including directives to go to sleep, die and other useful imperatives.

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