Protocol Specification. Using Finite State Machines

Similar documents
Protocol Specification

Specification of Protocol Using FSM

Chapter 3: Transport Layer

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

CS 3516: Computer Networks

Chapter 3 Transport Layer

Last time. Mobility in Cellular networks. Transport Layer. HLR, VLR, MSC Handoff. Introduction Multiplexing / demultiplexing UDP 14-1

Chapter 3: Transport Layer Part A

CSC 401 Data and Computer Communications Networks

CSE 3214: Computer Network Protocols and Applications Transport Layer (Part 2) Chapter 3 outline. UDP checksum. Port numbers

Chapter 3 Transport Layer

Lecture 9: Transpor Layer Overview and UDP

Chapter III: Transport Layer

CSC358 Week 4. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

CSCE 463/612 Networks and Distributed Processing Spring 2018

CS 3516: Advanced Computer Networks

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

CMSC 332 Computer Networks Reliable Data Transfer

Announcement. Homework 1 due last night, how is that? Will discuss some problems in the lecture next week

ELEN Network Fundamentals Lecture 15

CSC 4900 Computer Networks: Reliable Data Transport

COSC4377. Useful Linux Tool: screen

Transport services and protocols. Chapter 3 outline. Internet transport-layer protocols Chapter 3 outline. Multiplexing/demultiplexing

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 7

CSCD 330 Network Programming

Lecture 10: Transpor Layer Principles of Reliable Data Transfer

TDTS06: Computer Networks

Protocoles et Interconnexions

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

Problem 7. Problem 8. Problem 9

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

The GBN sender must respond to three types of events:

Transport layer. Our goals: Understand principles behind transport layer services: Learn about transport layer protocols in the Internet:

Principles of Reliable Data Transfer

The flow of data must not be allowed to overwhelm the receiver

Computer Networking: A Top Down Approach

CC451 Computer Networks

Distributed Information Processing

Lecture 5. Transport Layer. Transport Layer 1-1

Transport layer: Outline

UNIT IV -- TRANSPORT LAYER

Distributed Systems Inter-Process Communication (IPC) in distributed systems

COM-208: Computer Networks - Homework 3

Communication. Overview

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 8

Congestion Control 3/16/09

Computer Networks & Security 2016/2017

Basic Protocols and Error Control Mechanisms

Chapter 3 Transport Layer

10.1 REVIEW QUESTIONS

ES623 Networked Embedded Systems

Process groups and message ordering

Chapter 4 Communication

ETSF10 Internet Protocols Transport Layer Protocols

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)

UNIVERSITÄT DES SAARLANDES Fachrichtung 6.2 Informatik Prof. Dr.-Ing. Holger Hermanns

Data Communications. Automatic Repeat Request Medium Access Control

Answers to Sample Questions on Transport Layer

ECE 650 Systems Programming & Engineering. Spring 2018

Chapter 4 Communication

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

The Transport Layer Multiplexing, Error Detection, & UDP

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

Reliable Transport : Fundamentals of Computer Networks Bill Nace

Peer entities. Protocol Layering. Protocols. Example

Last Class: RPCs and RMI. Today: Communication Issues

Reliable Data Transfer

Chapter 3 outline. TDTS06 Computer networks. Principles of Reliable data transfer. Reliable data transfer: getting started

Chapter 11 Data Link Control 11.1

Request for Comments: 938 February 1985

Design and Performance Evaluation of a New Spatial Reuse FireWire Protocol. Master s thesis defense by Vijay Chandramohan

Data & Computer Communication

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

Rdt2.0: channel with packet errors (no loss!)

DATA LINK LAYER UNIT 7.

William Stallings Data and Computer Communications. Chapter 10 Packet Switching

rdt2.0 has a fatal flaw!

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

L12: end to end layer

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Network Protocols. Sarah Diesburg Operating Systems CS 3430

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

CSC 4900 Computer Networks: TCP

Lecture 07 The Transport Layer (TCP & UDP) Dr. Anis Koubaa

Data Link Control Protocols

Lab 2: Implementing a Reliable Transport Protocol (30 points)

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

3. Quality of Service

CPE 548 Exam #1 (50 pts) February 17, 2016

The Transport Layer Reliability

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Lecture 7: Flow Control"

Transport Layer Protocols TCP

Chapter III: Transport Layer

Data and Computer Communications. Protocols and Architecture

Communication. Distributed Systems Santa Clara University 2016

Transcription:

Protocol Specification Using Finite State Machines

Introduction Specification Phase of Protocol Design allows the designer to prepare an abstract model of the protocol for testing and analysis. Finite State Machine is a tool to model the desired behavior of a communciation system. The advantage of communicating finite state machines is that they make it possible to decide many properties in communication protocols, beyond the level of just detecting such properties. A FSM consists of several states. Inputs into the machine are combined with the current state of the machine to determine the new state or next state of the machine. Depending on the state of the machine, outputs are generated based on either the state or the state and inputs of the machine.

FSM

States of FSM

Transition Triggered by input events the FSM moves from one state to other based on the Transition Function Transition Function produces the Output and Next State depending on Current State and Input Event While in particular state FSM is not active, it is waiting for an input to perform next activity

The two communication mechanisms for concurrent processes can be categorized into Message Passing and Shared Data Message passing involves sending and receiving messages through a channel In the Shared Memory approach memory is common to both processes, and they can read and write to the memory

Asynchronous & Synchronous Communications Two approaches to implement message passing Synchronous Communication The processes involved in communication are required to participate at the point of communication simultaneously If Process A attempts to send a message and Process B is not ready to receive it, Process A must wait until Process B is ready Asynchronous Communication The processes involved in communication are not required to participate at the point of communication simultaneously If Process A attempts to send a message and Process B is not ready to receive it, Process A sends it anyway

Asynchronous communication requires use of buffers to store messages The protocol specification methods studied in this course will be mostly based upon Asynchronous Communication In most communicating systems, a FIFO (First In First Out) discipline is enforced on sending and receiving messages During a send event the message is appended to the end of the queue while a receive event removes a message from the front It is possible to modify the communications channel to provide additional communication constructs such as priority signals

Communicating FSMs Model Protocol is described as a set of Communicating FSMs (CFSMs) Each CFSM represents a component (or process) of the network In OSI term, a protocol entity, e.g. sender, receiver Each process can be defined by a set of states The process waits in a state for an event to occur When this input event occurs, it transfers to another state, and in doing so can send out messages and performs other tasks Each CFSM is represented by a directed labeled graph where Nodes represent states (conditions) of the process Edges represent transitions (events) of the process This model is the model used by the ITU Specification and Description Language (SDL)

Transistion diagram

Communication service specification Service Specification Service primitives Request, response, indication and confirm Service primitive parameters: data size, checksum size, caller address etc.

Components of Protocol to be specified Protocol Specification Communication services: Describes type of communication services of a protocol. (Connectionless, connection oriented), channel, signals Peer Entities: Describes the behaviour of protocol and its relation with peer enity. Interfaces: Defines the way the service primitives provides services to its upper layer and uses services from lower layers. Interactions: Message exchange betweeen two process of a protocol. Can be synch or asynch in nature. Message format: Defines sub components of message which includes data and control information

Communication service specification Data Transfer phase specification using FSM: FSM of service specification for reliable data transfer

Develop sender, receiver sides of reliable data transfer protocol (rdt) consider only unidirectional data transfer but control info will flow on both directions! use finite state machines (FSM) to specify sender, receiver

reliable transfer over a reliable channel underlying channel perfectly reliable no bit errors no loss of packets separate FSMs for sender, receiver: sender sends data into underlying channel receiver read data from underlying channel

channel with bit errors To recover from errors: acknowledgements (ACKs): receiver explicitly tells sender that pkt received OK negative acknowledgements (NAKs): receiver explicitly tells sender that pkt had errors sender retransmits pkt on receipt of NAK

FSM specification

Specification with no errors

With error

Channel specifications communication paths used to connect one or more FSMs of protocol processes. lossless or lossy channel unbounded FIFO ( first in first out)

Channel specifications two messages (m0 and m1) transfer channel representation by using a FSM. The channel has four states: 0-idle 1-buffering m0 (msg 0) 2-buffering m1(msg 1) 3-buffering ack (ack) Initially channel will be in state 0, later moves to states 1, 2 and 3 and returns back, based on certain message transitions.

Interface Specifications Internal interfaces: mechanisms that are internal to the protocol; External interfaces: mechanisms that make it possible for other implementations like applications, higher or lower layer services or both, etc., to interact with the protocol being developed. A partial protocol implementation with internal and external interfaces

FSM of an interface of bus access protocol

FSM of an interface of bus access protocol States: Idle (state 1) indicates that bus access protocol is not active; wait for bus (state 2) denotes that the protocol is waiting for bus to be idle; get data (state 3) gets the data to be transferred on the bus; write data (state 4) denotes that, it writes data on the bus; and release bus (state 5), releases the bus. Transitions: bus req makes the FSM to transit from state 1 to state 2; bus idle allows the FSM to make transit from state 2 to state 3; data ready makes the FSM to transit from state 3 to state 4; data write makes the FSM to move from state 4 to state 5; bus release allows the FSM to transit from state 5 to state 1.

Interactions FSM of interactions between ISDN system and a user for activation of call forwarding service

Multimedia protocol specifications QoS (Quality of Service) requirements of multimedia streams: Throughput: the data transmission rate data compression several Mbps (Megabits per second). Transfer Delay: time between the production of data at the source and its presentation at the sink Jitter: variance of the transfer delay use of buffers to reduce jitter Error Rates: loss of data in a continuous data transfer

Multimedia protocol specifications FSM specifications Buffer requirements

Multimedia protocol specifications FSM specifications Synchronization X number of video frames are synch with y number of audio samples

Examples of Internet protocol specifications Alternating bit window protocol The Sender_ABP takes a message which is ready to be sent and transmits the message together with a sequence number via the Data Medium to the Receiver_ABP. The Sender_ABP waits for an acknowledgment from the Receiver_ABP containing the same sequence number. If the appropriate acknowledgment arrives, the Sender_ABP performs the same procedure for the next waiting message, but this time with an inverted sequence number (i.e., 0! 1; 1! 0). If the appropriate acknowledgment does not arrive within a certain period of time (timeout period), the Sender_ABP resends the same message. The Receiver_ABP, when in an idle state, acknowledges all incoming messages. After receiving a message with a correct sequence number, it will acknowledge (through Ack Medium) only packets with the last correct sequence number until a Receive signal is received. After that, it will invert the sequence number, and go back to the idle state.

Examples of Internet protocol specifications Alternating bit window protocol

Examples of Internet protocol specifications Alternating bit window protocol ABP is a link layer protocol. Works on FIFO channels only. Guarantees reliable message delivery with a 1-bit sequence number.