process
a program in execution
false
true or false: process execution must progress in parallel fashion. No sequential execution of instructions of a single process
program code/text section
current activity
stack
data section
heap
parts of a process
heap
it contains memory dynamically allocated during run time
stack
contains temporary data, such as function parameters, return addresses, local variables
process control block (PCB) / task control block
information associated with each process
process state
program counter
CPU registers
CPU scheduling information
memory-management information
accounting information
i/o status information
enumerate the parts of a process control block
process scheduling
Selects among available processes for next execution on CPU core
ready queue
set of all processes residing in main memory, ready and waiting to execute
wait queues
set of processes waiting for an event
context switch
occurs when the CPU switches from one process to another
true
true or false: When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a context switch
parent, children
____ process create ____ processes, which, in turn create other processes, forming a tree of processes
process identifier (PID)
Process are identified and manage via a ___ ___
fork()
a UNIX system call to create a new process
exec()
a UNIX system call used after a fork() to replace the process’ memory space with a new program
service
Android background processes use ___ to perform task. This can keep running even if background process is suspended.
wait()
a UNIX system call used to wait for the child to terminate
exit()
Process executes last statement and then asks the operating system to delete it using the ___ system call.
abort()
Parent may terminate the execution of children processes using the ___ system call.
child has exceeded allocated resources
task assigned to child is no longer required
the parent is exiting, and the operating systems does not allow a child to continue if its parent terminates
what are the reasons for parents to terminate the execution of children processes?
cascading termination
All children, grandchildren, etc., are terminated.
zombie
If no parent waiting (did not invoke wait()) process is a ___
orphan
If parent terminated without invoking wait(), process is an
browser process
A type of process found in a browser that manages user interface, disk and network I/O
renderer process
A type of process found in a browser that renders web pages, deals with HTML, Javascript. A new renderer created for each website opened
sandbox
restricts disk and network I/O, and minimizes the effect of security exploits
plug-in process
A type of process found in a browser that runs for each type of plug-in
cooperating process
a type of process that can affect or be affected by other processes, including sharing data
interprocess communication (IPC)
Cooperating processes need___ ___
shared memory
message passing
What are the two models of IPC?
producer, consumer
___ process produces information that is consumed by a ___ process
unbounded-buffer
places no practical limit on the size of the buffer:
producer never waits
consumer waits if there is no buffer to consume
bounded-buffer
assumes that there is a fixed buffer size
producer must wait if all buffers are full
consumer waits if there is no buffer to consume
IPC - shared memory
An area of memory shared among the processes that wish to communicate
IPC - message passing
Processes communicate with each other without resorting to shared variables
communication link
If processes P and Q wish to communicate, they need to establish a ___ ___ between them
direct communication
an implementation of a communication link wherein processes must name each other explicitly
indirect communication
an implementation of a communication link wherein messages are directed and received from mailboxes
blocking is considered synchronous, whereas non-blocking is considered asynchronous
What is the difference between blocking and non-blocking in message passing
rendezvous
If both send and receive are blocking, we have a ____
buffering
queue of messages attached to the link
zero capacity
an implementation of buffering wherein no messages are queued on a link. Sender must wait for receiver (rendezvous)
bounded capacity
an implementation of buffering wherein the length of n messages is finite. Sender must wait if link is full.
unbounded capacity
an implementation of buffering wherein the length of n messages is infinite. Sender never waits.
pipes
acts as a conduit that allows two processes to communicate
ordinary pipes
a type of pipe that cannot be accessed from outside the process that created it. Typically, a parent process creates a pipe and uses it to communicate with a child process it created.
named pipes
a type of pipe that can be accessed without a parent-child relationship
ordinary pipes (or anonymous pipes)
a unidirectional pipe where they allow communication in standard producer-consumer style
named pipes
a bidirectional pipe where several processes can use it for communication.
socket
an endpoint for communication, represented as a concatenation of IP addresses and port.
port
a number included at start of message packet to differentiate network services on a host
loopback
a special IP address to refer to system on which process is running
sockets
communication consists between a pair of ____
remote procedure calls (RPC)
abstracts procedure calls between processes on network systems
stubs
client-side proxy for the actual procedure on the server
marshalls
in the context of RPCs, the client-side stub locates the server and ____ the parameters
Microsoft Interface Definition Language (MIDL)
On Windows, stub code compile from specification written in
External Data Representation (XDL)
RPC data representation is handled via ___ ___ ___ format to account for different architectures
rendezvous/matchmaker
OS typically provides a ______ service to connect client and server
the program counter and other registers
the status of the current activity of a process is represented by?
ready
running
waiting
terminated
what are the four general states of a process?
process control block (PCB)
the kernel data structure that represents a process in an operating system
sockets
allow two processes on different machines to communicate over a network.
remote procedure calls (RPC)
They abstract the concept of function calls in such a way that a function can be invoked on another process that may reside on a separate computer.