ENVS 1800 Lecture Notes - Lecture 19: Message Passing

24 views2 pages
ENVS 1800 Tutorial 19 Notes Synchronization
Introduction
In others, there may be a complex message passing arrangement, with mailboxes set up
for each process.
Inter process communication has increased in importance over the past few years
Due to the desire to move data and program execution more easily from one application
to another
One form of communication that is sometimes very important is the ability to
synchronize processes with each other.
Two or more processes may be cooperating on the solution of a complex problem, and
one may be dependent on the solution provided by another.
Furthermore, both may be required to access the same data, the order and timing in
which access takes place can be critical, and these conditions can affect the overall
results.
This requires a solution to the problem of process synchronization.
As a simple example, consider an address card file shared by you and your roommate or
partner.
A friend calls to tell you that she has moved and to give you her new phone number.
You place a new card with this information in the card file box.
Meanwhile, your roommate has taken the old card from the box and has used it to write
a letter.
He returns to the box, sees the new card, figures that it must be obsolete, and so throws
it away and replaces it with the original.
The new data is now lost.
Similar situations can occur with data being shared by more than one process.
As another simple example, consider two processes, with the goal to produce the result
c, where process 1 solves the program statement a = a + b with initial values a = 2 and b
= 3.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents