Page 176 - DCAP207_NETWORKS_DCAP406_COMPUTER_NETWORKS
P. 176

Unit 11: Transport Layer




          transport entity suspends transparently within to_net until there is room in the window. Apart  Notes
          from this transparent suspension mechanism, some explicit procedures called by the transport
          entity to block/unblock itself are given above:
               sleep() – This procedure is called when the transport entity logically needs to wait for an
               external event to happen. After calling the sleep procedure, the (main stream of the) transport
               entity is blocked.
               wakeup() – This procedure is called by the event handling procedure (i.e., packet_arrival() )
               – To unblock the sleeping (main stream of the) transport entity.
          User programs call most of procedures in the transport entity directly. However, there are two
          procedures that are effectively (software) interrupt routines and are called only when the main
          stream of the transport entity is sleeping. They are given as below:
               packet_arrival() – This is triggered by the packet arrival event. The underlying network
               layer creates this procedure.

               clock() – The clock ticking event triggers this procedure.
          A flow control mechanism based on credit is used in the example transport entity:
               When an application calls RECEIVE, a special credit message is sent to the transport entity
               on the source machine and is recorded in the conn array.

               When SEND is called, the transport entity checks to see if a credit has received on the
               specified connection.
                    If so, the message is transmitted in multiple packets, if needed, and the credit
                    decremented;
                    If not, the transport entity changes itself to sleep until a credit receives.
          In the transport entity, each connection is expresses in one of the following seven states:
          Idle – Connection not established yet.

          Waiting – CONNECT has been executed, CALL REQUEST sent.
          Queued – A CALL REQUEST has arrived; no LISTEN yet.
          Established – The connection has been established.
          Sending – The user is waiting for permission to send a packet.
          Receiving – A RECEIVE has been done.

          Disconnecting – A Disconnect has been done locally.
          11.3.3 The Example as a Finite State Machine


          Figure 11.1 shows an example of finite state machine. In the finite state machine, each entry has
          an optional predicate, an optional action and the new state.




              Task  What is the difference between flow control and congestion control?
          The key protocols of the Transport Layer are Transmission Control Protocol (TCP) and User
          Datagram Protocol (UDP). TCP enables reliable data delivery service with end-to-end error
          detection and correction. UDP facilitates low-overhead, connectionless datagram delivery service.
          Both protocols are responsible for delivering data between the session layer and the network
          layer.



                                           LOVELY PROFESSIONAL UNIVERSITY                                   169
   171   172   173   174   175   176   177   178   179   180   181