Is connected to the left channel of q and the

Info icon This preview shows pages 16–21. Sign up to view the full content.

View Full Document Right Arrow Icon
is connected to the left channel of Q , and the sequence of messages output by P and input by Q on this internal channel is concealed from their common environment. The result of the connection is denoted P >> Q (3) constraints: α ( P >> Q ) = αleft ( P ) αright ( Q ) αright ( P ) = αleft ( Q ) 16
Image of page 16

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
& $ % 2. Examples: X1 A pipe which outputs each input value multiplied by four (4.2 X2) QUADRUPLE = DOUBLE >> DOUBLE X2 A process which inputs cards of eighty characters and outputs their text, tightly packed into lines of 125 characters each (4.2 X3, X4) UNPACK >> PACK X3 Same as X2, except that each pair of consecutive asterisks is replaced by ” ” (4.2 X5) UNPACK >> SQUASH >> PACK X4 Same as X2, except that the reading of cards may continue when the printer is held up, and the printing can continue when the card reader is held up (4.2 X9) UNPACK >> BUFFER >> PACK 17
Image of page 17
& $ % X5 In order to avoid undesirable expansion of buffers, it is usual to limit the number of messages buffered. Even the single buffer provided by the COPY process (4.2 X1) may be adequate. Here is a version of X4 which reads one card ahead on input and buffers one line on output COPY >> UNPACK >> PACK >> COPY X6 A double buffer, which accepts up to two messages before requiring output of the first COPY >> COPY Its behaviour is similar to that of CHAIN 2 (2.6 X4) and VMS2 (1.1.3 X6). 18
Image of page 18

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
& $ % 3. Laws L1 P >> ( Q >> R ) = ( P >> Q ) >> R L2 ( right ! v P ) >> ( left ? y Q ( y )) = P >> Q ( v ) L3 ( right ! v P ) >> ( right ! w Q ) = right ! w (( right ! v P ) >> Q ) L4 ( left ? x P ( x )) >> ( left ? y Q ( y )) = left ? x ( P ( x ) >> ( left ? y Q ( y ))) Note: There are several other similar laws. Please see page 134-135. 19
Image of page 19
& $ % 4. Livelock (a) Bad cases (Divergent behavious): Let P = ( right !1 P ) Q = ( left ? x Q ) ( P >> Q ) is obviously a useless process; it is even worse than STOP , in that like an endless loop it may consume unbounded computing resources without achieving anything. Another example: Let P = ( right !1 P | left ? x P 1( x )) Q = ( left ? x Q | right !1 Q 1) In this example, divergence derives from the mere possibility of infinite internal communication. 20
Image of page 20

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
& $ % (b) avoiding livelock: A simple method to prove ( P >> Q ) is free of livelock is to show that P is left-guarded in the sense that it can never output an infinite series of messages to the right without interspersing inputs from the left.
Image of page 21
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern