Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Stop and Wait arq


Published on

Published in: Technology, Education
  • Be the first to comment

Stop and Wait arq

  1. 1. GROUP B
  2. 2. TEAM MEMBERS <ul><li>GROUP 14: INDIGO </li></ul><ul><li>AMULYA GURURAJ 1MS07IS006 </li></ul><ul><li>BHARGAVI C S 1MS07IS013 </li></ul><ul><li>MEGHANA N 1MS07IS050 </li></ul><ul><li>TANUSHREE A G 1MS07IS139 </li></ul><ul><li>GROUP 21: DYNAMIC NETWORKS </li></ul><ul><li>AMEET GONDALI 1MS07IS003 </li></ul><ul><li>BHUJANG R 1MS07IS016 </li></ul><ul><li>KAUSHIK N 1MS07IS037 </li></ul><ul><li>PRAMOD M 1MS07IS070 </li></ul>
  3. 3. CONTENTS <ul><li>Introduction </li></ul><ul><li>Stop And Wait ARQ </li></ul><ul><li>Sender Algorithm. </li></ul><ul><li>Receiver Algorithm </li></ul><ul><li>Efficiency </li></ul><ul><li>Advantages & Disadvantages </li></ul><ul><li>Applications </li></ul><ul><li>Demo </li></ul>
  4. 4. INTRODUCTION <ul><li>Data Communication channels are divided into two major types :- </li></ul><ul><li>(a)Noisy Channels. </li></ul><ul><li>(b)Noiseless Channels. </li></ul><ul><li>Noiseless Channels :- An ideal case channel put forth by Niquest. </li></ul><ul><li>Noisy Channel :- Practical case channels , put forth by Shannon. </li></ul>
  5. 5. Continued <ul><li>Noiseless Channels :- </li></ul><ul><li>(1) Simplest </li></ul><ul><li>(2) Stop and Wait </li></ul><ul><li>Noisy Channels </li></ul><ul><li>(1) Stop and wait ARQ </li></ul><ul><li>(2) Go Back N ARQ </li></ul><ul><li>(3)Selective Repeat ARQ </li></ul>
  6. 6. STOP AND WAIT ARQ <ul><li>Design </li></ul><ul><li>Implementation . </li></ul>
  7. 7. SENDER ALGORITHM <ul><li>Sn =0 </li></ul><ul><li>cansend = true; </li></ul><ul><li>While(true) </li></ul><ul><li>{ </li></ul><ul><li>WaitForEvent(); </li></ul><ul><li>If(event(RequesTtoSend) AND cansend) </li></ul><ul><li>{ </li></ul><ul><li>Getdata(); </li></ul><ul><li>MakeFrame(Sn); </li></ul><ul><li>StoreFrame(Sn); </li></ul><ul><li>SendFrame(Sn); </li></ul><ul><li>StartTimer(); </li></ul><ul><li>Sn =Sn+1; </li></ul><ul><li>Cansend =false; </li></ul><ul><li>} </li></ul>
  8. 8. SENDER ALGORITHM (CONT..) <ul><li>WaitForEvent(); </li></ul><ul><li>if( event ( Arrival notification)) </li></ul><ul><li>{ </li></ul><ul><li>ReceiveFrame(ackno); </li></ul><ul><li>If(not corrupted AND ackno == Sn) </li></ul><ul><li>{ </li></ul><ul><li>Stop Timer(); </li></ul><ul><li>PurgeFrame(Sn-1) </li></ul><ul><li>cansend =true; </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>If(event(Timeout)) </li></ul><ul><li>{ StartTimer(); </li></ul><ul><li>ResendFrame(Sn-1); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  9. 9. RECEIVER SIDE ALGORITHM <ul><li>Rn =0; </li></ul><ul><li>While(true) </li></ul><ul><li>{ WaitForEvent(); </li></ul><ul><li>If(event(ArrivalNotification)) </li></ul><ul><li>{ </li></ul><ul><li>ReceiveFrame(); </li></ul><ul><li>If( corrupted ( Frame)); </li></ul><ul><li>Sleep(); </li></ul><ul><li>If ( seqNo ==Rn) </li></ul><ul><li>{ </li></ul><ul><li>Extract data(); </li></ul><ul><li>Deliver data(); </li></ul><ul><li>Rn =Rn+1; </li></ul><ul><li>} </li></ul><ul><li>SendFrame(Rn); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  10. 10. EFFICIENCY <ul><li>Performance Analysis of Stop and Wait ARQ </li></ul><ul><li>Parameters: </li></ul><ul><li>TRANSF : Frame transmission time at sender side </li></ul><ul><li>TRANSA : ACK transmission time at receiver side </li></ul><ul><li>PROP : propagation delay </li></ul><ul><li>PROC : Frame processing time </li></ul><ul><li>p : Probability of frame error at sender side </li></ul><ul><li>q : Probability of frame error at receiver side </li></ul><ul><li>TIMEOUT : Sender time out </li></ul>
  11. 11. Calculations <ul><li>Case 1 : Efficiency in transmitting an error free packet </li></ul><ul><li>Time taken to transmit an error free packet is: </li></ul><ul><li>Ts = TRANSF + TRANSA + 2(PROC+PROP) </li></ul><ul><li>In this case efficiency is: </li></ul><ul><li>E = TRANSF/Ts </li></ul><ul><li>This occurs with the probability (1-p)*(1-q) </li></ul>
  12. 12. Case 2: Efficiency in transmitting an error packet The delivery of an error packet takes place with the probability: r = p + (1-p)*q The average packet delay in ARQ scheme is D = TS + TIMEOUT(p/(1-p)) In this case efficiency is: E = TRANSF/D
  13. 13. ADVANTAGES <ul><li>Simple to implement. </li></ul><ul><li>Frames numbering is modulo-2 i.e, only 1 bit is required. </li></ul><ul><li>Can be used for noisy channels. </li></ul><ul><li>Has both error and flow control mechanism. </li></ul><ul><li>Has timer implementation. </li></ul>
  14. 14. DISADVANTAGES <ul><li>When propagation delay is long, it is extremely inefficient. </li></ul><ul><li>Only one frame is sent at a time. </li></ul><ul><li>Timer should be set for each individual frame. </li></ul><ul><li>No pipelining. </li></ul><ul><li>Sender window size is 1( disadvantage over Go back n ARQ). </li></ul><ul><li>Receiver window size is 1( disadvantage over selective repeat ARQ). </li></ul>
  15. 15. APPLICATIONS <ul><li>IBM Binary Synchronous Communications protocol (Bisync): character-oriented protocol </li></ul><ul><li>XModem : modem file transfer protocol </li></ul><ul><li>Trivial File Transfer Protocol : simple protocol for file transfer over UDP </li></ul>
  16. 16. <ul><li>THANK YOU </li></ul>