1 / 10

Introduction to AP Notation

Introduction to AP Notation. So far we have discussed the Internet Protocol informally Now, we need to learn about a formal notation, called the Abstract Protocol notation (AP notation for short), that can be used in specifying network protocols formally

bary
Download Presentation

Introduction to AP Notation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to AP Notation • So far we have discussed the Internet Protocol informally • Now, we need to learn about a formal notation, called the Abstract Protocol notation (AP notation for short), that can be used in specifying network protocols formally • Later, we use this notation to formally specify many interesting protocols

  2. A Protocol in AP Notation channel pq • A channel pq is an unbounded, FIFO queue for storing all messages sent by p until each of them is received by q • Next, we discuss a protocol in AP notation process q process p channel qp

  3. The Request/Reply Protocol • It is between two processes p and q • Each process can send request message to the other process • When a process receives a request message from the other process, it sends back a reply message

  4. Problems and Remedies ofRequest/Reply Protocol • Number of request messages in the two channels can grow beyond any bound?  At every instant, each process is either ready or not ready; a ready process can send one request message to the other process and become not ready • How to make a process ready once it has become not ready?  When a process receives a reply message, it becomes ready

  5. The Architecture of Request/Reply Protocol channel pq process q • Each process has a variable: readyp in process p and ready q in process q • Variable readyp in p has a value true iff p can send the next request message to q • Variable readyp in p becomes false after p sends a request message to q and before p receives next reply message from q process p readyp readyq channel qp

  6. Process p process p var readyp : boolean {initially true} begin <action> [] <action> … [] <action> end • Each <action> consists of three components <guard>  <statement>

  7. Actions of Process p process p var readyp : boolean {initially true} begin readyp  send request to q; readyp := false [] rcv request from q  send reply to q [] rcv reply from q  readyp := true end • Process q is symmetric; just change each appearance of p to q • Next, we introduce the concept of network state and discuss how a network of processes is executed

  8. Network State • A network state is defined by one value for each constant, input, variable in each process in network and by the content of each channel in network • An action gd  sm in a process p in network is enabled at a network state S iff • gd is a local or timeout guard whose value is true at S; or • gd is of the form rcv m from q and the first message in channel from q to p is m at S

  9. Three Conditions of Network Execution • Nondeterministic selection: At a network state, any enabled action can be selected for execution • Action atomicity: Enabled actions are executed one at a time • Fair execution: to be discussed later

  10. Network States of Request/Reply Protocol S.0 = readyp  readyq  ch.p.q=<>  ch.q.p=<> S.1 = ~readyp  readyq  ch.p.q=<request>  ch.q.p=<> S.2 = readyp  ~readyq  ch.p.q=<>  ch.q.p=<request> S.3 = ~readyp  readyq  ch.p.q=<>  ch.q.p=<reply> S.4 = ~readyp  ~readyq  ch.p.q=<request>  ch.q.p=<request> S.5 = readyp  ~readyq  ch.p.q=<reply>  ch.q.p=<> S.6 = ~readyp  ~readyq  ch.p.q=<>  ch.q.p=<reply;request> S.7 = ~readyp  ~readyq  ch.p.q=<reply; request>  ch.q.p=<> S.8 = ~readyp  ~readyq  ch.p.q=<>  ch.q.p=<request;reply> S.9 = ~readyp  ~readyq  ch.p.q=<request; reply>  ch.q.p=<> S.10=~readyp  ~readyq  ch.p.q=<reply>  ch.q.p=<reply> S.0 S.1 S.2 S.3 S.4 S.5 S.6 S.7 S.8 S.9 S.10

More Related