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

Post on 15-Jan-2016

62 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

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

TRANSCRIPT

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

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

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

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

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

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

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

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

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(( ⃞� ⃞�

השולח

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

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

המקבל

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

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.

המערכת השלמה

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

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

rvalrqueue

rnum

rtmtarg

rrcvval

squeue

snum

sarg

stmtarg

srcvval

top related