A pipeline algorithm is implemented so that a stream of data elements of type T produced by
Question:
a. Define a generalized message buffer that contains all the partially consumed data elements and write an algorithm for process Pi (0 ≤ i ≤ n - 1), of the form
repeat
receive from predecessor;
consume element;
send to successor:
forever
Assume P0 receives input elements sent by Pn - 1. The algorithm should enable the processes to operate directly on messages stored in the buffer so that copying is unnecessary.
b. Show that the processes cannot be deadlocked with respect to the common buffer.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Operating Systems Internals and Design Principles
ISBN: 978-0133805918
8th edition
Authors: William Stallings
Question Posted: