Functional Units Session Services

www.pragsoft.com Chapter 6: The Session Layer 79 look at various protocol-related concepts which primarily deal with the data transfer phase.

6.2.1. Tokens

Tokens provide a mechanism for limiting the use of certain session services to one of the two session users at a time. Four tokens are provided: • Data Token . This is used for half-duplex connections. The service user possessing the token has the exclusive right to issue S-DATA requests. Data exchanges using S-EXPEDITED-DATA and S-TYPED-DATA requests are not affected by this token. This token is irrelevant to and unavailable in full- duplex connections. • Release Token . This is used for connections which have successfully negotiated the use of the Negotiated Release functional unit. The service user possessing the token has the exclusive right to issue an S-RELEASE request. Disconnections using S-U-ABORT requests are not affected by this token. • Sync-Minor Token . This is used for connections which have successfully negotiated the use of the Minor Synchronize functional unit. The service user possessing the token has the exclusive right to issue S-SYNC-MINOR requests. This token is irrelevant and unavailable when the Symmetric Synchronize functional unit is being used instead. • Sync-MajorActivity Token . This is used for connections which have successfully negotiated the use of the Major Synchronize or the Activity Management functional unit. The service user possessing the token has the exclusive right to issue S-SYNC-MAJOR and S-ACTIVITY requests. Token distribution is managed by three service primitives. S-TOKEN-PLEASE is used by a service user to request the possession of one or more tokens from the other user. S-TOKEN-GIVE is used by the possessor of the tokens to forward them to the other user. Finally, S-CONTROL-GIVE enables a service user to forward all its tokens to the other user.

6.2.2. Activities and Dialogue Units

An activity represents a convenient way of referring to a set of related tasks as a single entity. It has a clear beginning and a clear end, both of which are marked by major synchronization points. An activity consists of one or more atomic tasks, called dialogue units. Like an activity, the beginning and end of each dialogue unit is marked by a major synchronization point. Dialogue units and therefore activities can be interrupted and resumed later. 80 Communication Networks Copyright © 2005 PragSoft A transaction issued by a banking application to an account database is an example of an activity. It may consist of one or more records, each of which represents a dialogue unit see Figure 6.67. Figure 6.67 A transaction ‘activity’. Send Record 1 Send Record 2 Send Record 3 Dialogue unit Activity Major sync Major sync Major sync Major sync Transaction Starts Transaction Ends The activity service is based on seven service primitives for managing activities. An S-ACTIVITY-START request is issued by one service user to another to indicate the commencement of an activity. It causes the synchronization serial numbers to be set to 1. Each activity is identified by a user-specified identifier. An activity is completed by the service user issuing an S-ACTIVITY-END request, subject to confirmation. Both the activity start and end primitives involve implicit major synchronization points. A service user may interrupt an activity by issuing an S-INTERRUPT-ACTIVITY request, subject to confirmation. Data in transit may be lost, but the activity can be later resumed by issuing an S-ACTIVITY-RESUME request and specifying the identifier of the interrupted activity. A current activity can be discarded by issuing an A-ACTIVITY-DISCARD request, subject to confirmation. The rest of an activity is occupied by data transfer using mostly S-DATA and synchronization, which is discussed next.

6.2.3. Synchronization

The synchronization service of the session layer is based upon the use of synchronization points. These are markers that are inserted in the data flow to coordinate the exchange of data between applications. There are two types of synchronization points: • Major Synchronization Points . These are used to delimit dialogue units, and hence activities see Figure 6.5. This service is supported by the S-SYNC- MAJOR primitive. When this request is used by a service user, no further data exchange can take place until it is confirmed by the receiving user. The primitive takes two parameters: a serial number and an arbitrary block of user data.