Computer Architecture Lecture 3: Implementation of Protocol Stack, Study notes of Computer Science

A part of the lecture notes for cs/ee5516 computer architecture course at va tech, spring 1994. It covers the implementation of a protocol stack, including the functions of each layer from the physical layer to the application layer.

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-gh2
koofers-user-gh2 🇺🇸

2

(1)

9 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS/EE5516 Computer Architecture
Dr. Abrams, Computer Science Dept, VA Tech
Spring 1994
Lecture 3
1
Lecture 3
Implentation of Protocol Stack
Application
Presentation
Session
Transport
Network
Data Link
Control
Physical
Subroutine Lib, User Code
(in OS Commit Protocol)
Subroutine Library
System Process Outside
OS or Subrotine Lib
In Operating
System
Network Adapter Card
Chipset(IEEE802.x)
MAC MAC
1
3
2
4
5
6
7User 7
Libs 7,6,5,4,3
OS 7,3,2
Hardware 1,2
Real Picture
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Computer Architecture Lecture 3: Implementation of Protocol Stack and more Study notes Computer Science in PDF only on Docsity!

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

Lecture 3

Implentation of Protocol Stack

Application Presentation

Session Transport Network DataLink Control Physical

Subroutine Lib, User Code (in OS Commit Protocol) Subroutine Library System Process Outside OS or Subrotine Lib In Operating System Network Adapter Card MAC (^) MAC Chipset(IEEE802.x)

1

3 2

4

5

6

7 User 7

Libs 7,6,5,4,

OS 7,3,

Hardware 1,

Real Picture

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

  • Layering (see Fig 1.8, Bertsekas Gallager)
    • General Concepts: -- Modules --- I/O description - blackbox --- off the shelf reusability

-- Service

-- Layered Protocol View

-- Distributed Black Box

-- Protocol = distributed algorithm

  • Physical Layer
    • Virtual Bit Pipe (characterized by R bits/sec with error rate of 10-4)
    • Modems = Interface (noop’s if digital medium)
    • DL interface: -- sync bit -- async bit -- async char
    • Simple Protocol needed -- how many wires, voltages, pins -- how many microsec’s a bit lasts, if simultaneous, 2-way communication is ok. -- how does communication start and end? -- RS232C: example (fig 1.9), - each end is Finite State Machine and stores state

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

  • Data Link Control Layer (or Data Link Layer)
    • Provides virtual, reliable, asynchronous variable length packet pipe on unreliable bit pipe
    • Packet = string of bits from layer 3
    • Asynchronous pipe in two ways -- Asynchronous delay through pipe due to: 1) error recovery 2) variable length packet

-- Asynchronous insertion of packets due to:

  1. No data
  2. pipe full, due to errors

packet

Asynchronous delay through pipe

packet

layer 2

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

  • Frame:

Header (^) Layer 2 bits Trailer

Lengthof data

Checksum

-- 3 types --- Data Frame --- Ack Frame --- Piggyback

  • DLC: -- may regulate traffic (slow sender to receive rate or if no receive buffer)

-- always guarantees ordering

-- usually (not always) guarantees reliability (detect corrupted, lost, duplicated frames)

  • Question: If layer 2 guarantees reliable pipe, does layer 3 & above need error detection?
  • Answer: Yes, since it resets if 1 endpoint’s layer 2 crashes. Also if multihop packet.
  • Runs over -- Point - to - point -- Multiaccess (add source, destination address to header) (satellite, radio, cable, optical fiber)

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

  • Layer 3: Network Layer

Transport

Network

DLC

Link 1

DLC

Link n

Couldbridge 2 LANs or, be a backbone switch

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

Encapsulation:

Transport Hdr Data

T-PDU

Network Hdr

Data plus N-PDU other stuff

TSDU

NSDU

TH

NH

DLC

Hdr

Network Header

DLC

Trailer DH (^) NH TH DT

Data plus other stuff

  • Network Layer’s jobs: -- Routing (which outgoing link?) -- Flow control
  • Miscellaneous -- Network gets hit by packets from 2 directions: layer 4 and layer 2

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3 --- In network layer in subnet node

-- Global problem --- Congestion control/management

-- Techniques --- Buffer management --- Access control to subnet --- Routing to spread load --- Bits in packets to pass info on congestion --- RTD measurement to detect congestion

-- Connection-oriented - easier, versus Connection-less - harder flow control

-- In higher data-rate, higher link capacity networks: --- no feedback before transmission ends maybe --- errant node can still flood net --- expect same utility, because new applications may eat up bandwidth

-- Internets (Internet sublayer) --- needed because there are multiple LAN protocols --- TCP/IP - SNA gateway

-- Question: If LAN uses 1500 byte DL packets, LAN2 uses 512, which layer splits/assembles packets?

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

  • Transport Layer (layer 4)
    • Reliable end-to-end delivery (if network is unreliable) (TCP)
    • Breaks messages into packets, reassembles
    • Multiplex low data rate sessions onto same network session

Low (^) Low (^) High

Transport

Network

Data

Physical

Endpoints

  • Split one high data rate transport session into multiple network sessions
  • End-to-end flow control, recovery from link/node failures
  • Sometimes transport flow-control/error recovery over- laps/fights network, DLC (want integrated solution)
  • Operating system implements transport

Dr. Abrams, Computer Science Dept, VA Tech Spring 1994 Lecture 3

  1. Synchronization: move session entities back to known state if an upper layer error occurs (layer 4 only recovers from common errors in layer 1 - 3). Roll back to last synchronization point and re-start.

  2. Activity management (partition message stream into files)

  3. Exception reporting.

  • Layer 6: Presentation
    • Translation to/from universal data representation (float, char) (Suns, XDR)
    • Encrypt, decrypt
    • Data compression, decompression (video file, image, multimedia network)
  • Layer 7: Application
    • File transfer
    • Mail exchange
    • Transaction protocol
    • RPC (requires processes to marshall data)
    • Virtual terminal (how to move curse)