Ch. 3 - Interprocess Communication Flashcards
True or False: The wait() primitive can be used to convey information between processes
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.
Files (IPC)
A way of communicating between processes using a shared file.
Pipes (IPC)
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 do pipes allow processes to communicate without the need for a shared file?
The output of first process becomes the input of the next process.
Signal (IPC)
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.
kill()
Send the specified signal to a process with the specified PID.
How can a process react to a signal() system call?
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
Why might a print statement not be printed out to the terminal or specified file?
The print was buffered into a buffer, but the program crashed before the print could be printed.