Chapter 3 - Processes Flashcards
Cascading termination
If a process terminates in any fashion, then all children are also terminated. Seen in Windows.
Zombie
Process that has terminated, but whose parent has not yet called the WAIT() function. Every process is a zombie at some point, but generally only for a brief moment.
Orphan
Parent process does not call WAIT() and instead terminates, leaving its child process alone.
Shared memory
Page 122. Model of interprocess communication. A region of memory that is shared by cooperating processes. Processes can read/write data to the shared region. Can be faster than message passing.
Message passing
Page 122. Model of interprocess communication. Communication occurs by means of messages exchanged between cooperating processes. Useful for exchanging smaller amounts of data because no conflicts need to be avoided. Easier to implement in a distributed system. Used for Netflix, etc.
Non-blocking
Page 126. Send a message and move along – do not wait for RECEIVE(). Part of message passing.
Blocking
Page 126. Send a message and enter the [Waiting] state until RECEIVE() occurs. Part of message passing.
[Flowchart] Message passing mechanisms
Message passing mechanisms > Direct > Symmetric
MPM > Direct > Asymmetric
MPM > Indirect > OS owns mailbox
MPM > Indirect > Process owns mailbox
Direct interprocess communication (Symmetric)
SEND(PID1, message) . . . RECEIVE(PID2, message)
Need to know each other’s PID before communication.
Direct interprocess communication (Asymmetric)
SEND(PID1, message) . . . RECEIVE(&PID2, message)
OS supplies the sender’s PID in place of &PID2.
Need to know each other’s PID before communication.
Indirect interprocess communication (OS owns)
SEND(mailbox1, message) . . . RECEIVE(mailbox1, message)
SSC may create the mailbox, but the OS can own it – OS-owned mailboxes afford greater flexibility. Many processes can read/write to this mailbox. If the process is terminated, the mailbox may persist.
Indirect interprocess communication (Process owns)
SEND(mailbox1, message) . . . RECEIVE(mailbox1, message)
If the process owns it, only the process can read from the mailbox unless it allows other processes to read from it.
Mailbox
Also called port. An object into which messages can be placed by processes and from which messages can be removed (‘received’). Each mailbox has a unique ID. Used with indirect communication.
Blocking send
“If I can’t do what I want, I’m gonna go to sleep.”
The sending process is blocked until the message is received by the receiving process or by the mailbox.
Nonblocking send
The sending process sends the message and resumes operation without waiting for message receipt.