1
65kviews
What are transport service primitives? Discuss in brief
1 Answer
3
2.0kviews

A service is specified by a set of primitives. A primitive means operation. To access the service a user process can access these primitives. These primitives are different for connection oriented service and connectionless service.

There are five types of service primitives:

  1. LISTEN : When a server is ready to accept an incoming connection it executes the LISTEN primitive. It blocks waiting for an incoming connection.
  2. CONNECT : It connects the server by establishing a connection. Response is awaited.
  3. RECIEVE: Then the RECIEVE call blocks the server.
  4. SEND : Then the client executes SEND primitive to transmit its request followed by the execution of RECIEVE to get the reply. Send the message.
  5. DISCONNECT : This primitive is used for terminating the connection. After this primitive one can’t send any message. When the client sends DISCONNECT packet then the server also sends the DISCONNECT packet to acknowledge the client. When the server package is received by client then the process is terminated.

Connection Oriented Service Primitives

  • There are 4 types of primitives for Connection Oriented Service :
CONNECT This primitive makes a connection
DATA, DATA-ACKNOWLEDGE, EXPEDITED-DATA Data and information is sent using thus primitive
CONNECT Primitive for closing the connection
RESET Primitive for reseting the connection

Connectionless Oriented Service Primitives

  • There are 2 types of primitives for Connectionless Oriented Service:
UNIDATA This primitive sends a packet of data
FACILITY, REPORT Primitive for enquiring about the performance of the network, like delivery statistics.
  • Consider an application with a server and a number of remote clients.

    a. To start with,the server executes a LISTEN primitive,typically by calling a library procedure that makes a system call to block the server until a client turns up.

    b. For lack of a better term,we will reluctantly use the somwhat ungainly acronym TPDU(Transport Protocol Data Unit) for message sent from transport entity to transport entity.

    c. Thus,TPDUs(exchanged by the transport layer) are contained in packets(exchanged by the network layer).

    d. In turn,packets are contained in frames(exchanged by the data link layer).

    e. When a frame arrives,the data link layer processes the frame header and passes the contents of the frame payload field up to the network entity.

enter image description here

f. When a client wants to talk to the server, it executes a CONNECT primitive.

g. The transport entity carries out this primitives by blocking the caller and sending a packet to the server.

h. Encapsulated in the payload of this packet is a transport layer message for the server’s transport entity.

i. The client’s CONNECT call causes a CONNECTION REQUEST TPDU to be sent to the server.

j. When it arrives, the transport entity checks to see that the server is blocked on a LISTEN.

k. It then unblocks the server and sends a CONNECTION ACCEPTED TPDU back to the client.

l. When this TPDU arrives, the client is unblocked and the connection is established. Data can now be exchanged using the SEND and RECEIVE primitives.

m. In the simplest form, either party can do a(blocking)RECEIVE to wait for the other party to do a SEND. When the TPDU arrives, the receiver is unblocked.

n. It can then process the TPDU and send a reply. As long as both sides can keep track of whose turn it is to send, this scheme works fine.

o. When a connection is no longer needed, it must be released to free up table space within the two transport entities.

Please log in to add an answer.