Ch. 3 - Interprocess Communication Flashcards

1
Q

True or False: The wait() primitive can be used to convey information between processes

A

False. wait() does not allow two processes to communicate information between each other. It only allows a process to know when the other process finishes.

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

Files (IPC)

A

A way of communicating between processes using a shared file.

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

Pipes (IPC)

A

A way of communicating for 2 processes (1 process writes data through one end and the other process reads data through the other end) without a shared file.

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

How do pipes allow processes to communicate without the need for a shared file?

A

The output of first process becomes the input of the next process.

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

Signal (IPC)

A

Used to notify a process of an event. A signal is generated when the event first occurs and delivered when the process takes an action on that signal.

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

kill()

A

Send the specified signal to a process with the specified PID.

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

How can a process react to a signal() system call?

A

Ignore the signal (can’t ignore SIGKILL and SIGSTOP)
Catch the signal and call a signal handler when the signal occurs
Let the default action apply

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

Why might a print statement not be printed out to the terminal or specified file?

A

The print was buffered into a buffer, but the program crashed before the print could be printed.

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