lecture 4
lecture 4
LECTURE 4
PROCESS CONCEPT
A process includes:
program counter
stack
data section
PROCESS STATE
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
Context-switch time is overhead; the system does no useful work
while switching
Time dependent on hardware support
PROCESS CREATION
Operations
create a new mailbox
send and receive messages through mailbox
destroy a mailbox
Mailbox sharing
P1, P2,andP3share mailbox A
P1, sends; P2andP3receive
Who gets the message?
Solutions
Allow a link to be associated with at most two processes
Allow only one process at a time to execute a receive operation
Allow the system to select arbitrarily the receiver. Sender is
notified who the receiver was.
Thank you