chapter 5: process API Flashcards
1
Q
the four main calls in Process API
A
fork, wait, exec, kill
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.
3
Q
return value of fork()
A
0 for child.
< 0 failed.
>0 is parent
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
5
Q
how does the exec() call work?
A
run a program that is different from the calling program.
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.