Congestion Control, Data Encodings
- additive increase/multiplicative decrease
- available bit rate in ATM
- presentation layer
- integer encodings
- array and structure encodings
- encodings systems:
fast recovery
- don't want to empty the pipe when a single packet is lost
- fast retransmit the packet
- set window to W0/2+3
- for every ack, increase window by MTU
- after W0/2 worth of acks, can start retransmitting
- by the time the lost packet is acked, there are W0/2 more
packets in the pipe
- allows incoming acks to "clock" new outgoing packets, avoids
slow start
additive increase/multiplicative decrease
- additive increase: each round-trip time, add a fixed amount (e.g. 1 MTU)
to the window
- multiplicative decrease: when congestion is detected, reduce window
by constant factor
- reduces large windows more than small windows
- gives everyone equal opportunity to increase (modulo different
round-trip times)
- multiplicative increase would be unstable and unfair
Presentation Layer
- above session layer (which is above transport layer)
- data encodings
- security
- compression
- in practice, often distributed among:
- the application (e.g. XDR)
- the transport layer (e.g. SLIP compression)
- the network layer (e.g. security)
Data Encodings
- marshal: convert an "in-memory" structure to a linearized
form in a byte array
- unmarshal: convert a byte array to an in-memory structure
integer encodings
- bits-in-byte byte ordering for bit-serial channels (usually MSB first)
- little-endian: least-significant byte first (Intel, DEC)
- big-endian: most-significant byte first (Motorola, Apple, Sun, IBM,
Internet)
- either: (MIPS, X-windows)
- agreement as to integer size (number of bytes), alignment, position
array and structure encodings
- structures:
- as laid out in memory
- padding
- arrays:
- fixed length
- length explicitly encoded:
- sentinel element (e.g. '\0')
- integer length (e.g. packet length)
- unions:
- encoding of discriminant
- encoding of value
- reserve space for largest possible value?
XDR
- eXternal Data Representation
- type declaration specifies possible values
- single "type" is union of possible messages
- compiler (xdr) converts this into encoding/decoding routines
- same routine encodes and decodes depending on boolean flag
- arguments include buffer pointer, encode/decode
- size of encoding depends only on type declaration
- big-endian 32-bit integers, padding for alignment,
explicit length for arrays
ASN.1
- self-describing tagged data
- no alignment
- space efficient
- tag, length, value
- length is one byte if byte < 128; otherwise,
byte - 128 is length in bytes of actual length field
- SNMP (Simple Network Management Protocol)