Service generally includes set of various primitives. A primitive simply means Operations.
A Service is specified by set of primitives that are available and given to user or other various entities to access the service. All these primitives simply tell the service to perform some action or to report on action that is taken by peer entity. Each of the protocol that communicates in layered architecture also communicates in peer-to-peer manner with some of its remote protocol entity.
Primitives are called calling functions between the layers that are used to manage communication among the adjacent protocol layers i.e., among the same communication node. The set of primitives that are available generally depends upon the nature of the service that is being provided.
Classification of Service Primitives :
|Request||It represent entity that wants or request service to perform some action or do some work (requesting for connection to remote computer).|
|Indication||It represent entity that is to be informed about event (receiver just have received request of connection).|
|Response||It represents entity that is responding to event (receiver is simply sending the permission or allowing to connect).|
|Confirm||It represent entity that acknowledges the response to earlier request that has come back (sender just acknowledge the permission to get connected to the remote host).|
In the above diagram, these four primitives work as following :
- Request –
This primitive is transferred or sent to Layer N by Layer (N+1) to just request for service.
- Indication –
This primitive is returned by Layer N to Layer (N+1) to just advise of activation of service that is being requested or of action that is initiated by the service of Layer N.
- Response –
This primitive is simply provided by Layer (N+1) in reply to indication primitive. It might acknowledge or complete action that is previously invoked by indication primitive.
- Confirm –
This primitive is returned by the Nth layer to the requesting (N+1)st layer to simply acknowledge or complete action that is previously invoked by request primitive.
Parameters of Service Primitives :
Some of the Service Primitives need parameters. These are given below :
- Connect. Request –
The initiating entity does this Connect.Request. It just specifies and determines machine that we want to get connected to, type of service that is being desired, and maximum size of packet or message that is used on connection.
- Connect. Indication –
The receiver gets this Connect.Indication. It just specifies caller’s identity service that we want to use like FTP and Telnet, etc., and maximum size of packets that are exchanged.
- Connect. Response –
It just specifies whether or not it wants to accept or simply reject connection that is being requested.
- Connect. Confirm –
It just finds out or determines what happened using the entity that is issuing the initial Connect. Request.
Primitives of Connection-Oriented Service :
|Listen||When server is ready to accept request of incoming connection, it simply put this primitive into action. Listen primitive simply waiting for incoming connection request.|
|Connect||This primitive is used to connect the server simply by creating or establishing connection with waiting peer.|
|Accept||This primitive simply accepts incoming connection form peer.|
|Receive||These primitive afterwards block the server. Receive primitive simply waits for incoming message.|
|Send||This primitive is put into action by the client to transmit its request that is followed by putting receive primitive into action to get the reply. Send primitive simply sends or transfer the message to the peer.|
|Disconnect||This primitive is simply used to terminate or end the connection after which no one will be able to send any of the message.|
Primitives of Connectionless Service :
|Unitdata||Unitdata primitive is simply required to send packet of data or information.|
|Facility, Report||This primitive is required for getting details about the performance and working of the network such as delivery statistics or report.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.