6
םםםםםם םםםםםםםםם םםםםםם םםםם10 םםםםםם- םםםםםם םםםםםםםםם םםם םםLamport םם םםםםםם- םםםםם םם םםםםם:“specifying concurrent program modules” by Leslie Lamport (ACM Transaction on programming languages and systems Vol. 5 April 1983, pages 190-222)

מפרטים פורמאליים תירגול מספר 10

  • Upload
    dragon

  • View
    60

  • Download
    0

Embed Size (px)

DESCRIPTION

מפרטים פורמאליים תירגול מספר 10. Lamport - רק התורים מבוסס על המאמר: “specifying concurrent program modules” by Leslie Lamport (ACM Transaction on programming languages and systems Vol. 5 April 1983, pages 190-222). מפרטים פורמאליים - תירגול. שחר דג. התור הרגיל (תזכורת). - PowerPoint PPT Presentation

Citation preview

Page 1: מפרטים פורמאליים תירגול מספר 10

מפרטים פורמאליים10תירגול מספר

שחר דגמפרטים פורמאליים - תירגול

Lamportרק התורים - מבוסס על המאמר:

“specifying concurrent program modules” by Leslie Lamport(ACM Transaction on programming languages and systems Vol. 5 April 1983, pages 190-222)

Page 2: מפרטים פורמאליים תירגול מספר 10

שחר דגמפרטים פורמאליים - תירגול

התור הרגיל)תזכורת(

Page 3: מפרטים פורמאליים תירגול מספר 10

שחר דגמפרטים פורמאליים - תירגול

התור שמאבד הודעות

TMT replaces PUTRCV replaces GET

In 3(c), ≺ denotes the relation “is a proper sub-sequence of”

In 5, if in(RCV) and infinitely often the queue is not empty, then eventually we will exit RCV

)reminder: p ⇝ q : )p → q(( ⃞� ⃞�

Page 4: מפרטים פורמאליים תירגול מספר 10

השולח

שחר דגמפרטים פורמאליים - תירגול

Squeue – the messages that we have to sendSnum – the current sequence numberSarg – the input parameter to SENDStmtarg – the argument for the next call to

MTMT or NULL if not known yetSrcvval – the returned value by the last call to

ARCV or NULL if the value was already processed

Page 5: מפרטים פורמאליים תירגול מספר 10

המקבל

שחר דגמפרטים פורמאליים - תירגול

rqueue - the queue of the received messages

rnum - the sequence number of the last message

rval - the returned value from RECEIVErtmtarg - the argument for the next call to

MTMT or NULL if not known yetrrcvval - the last received message or NULL

if it already been handled

The rezoning for the receiver is very similar to the rezoning for the sender and it is left to the reader.

Page 6: מפרטים פורמאליים תירגול מספר 10

המערכת השלמה

שחר דגמפרטים פורמאליים - תירגול

ערוץ שידור אמין )בעצם ממש תור רגיל(

rvalrqueue

rnum

rtmtarg

rrcvval

squeue

snum

sarg

stmtarg

srcvval