Docsity

Protocol Implementation - Engineering Approach to Computer Networking - Lecture Slides, Slides of Computer Science

Toggle sidebar
bg1
Protocol Implementation
An Engineering Approach to Computer Networking
An Engineering Approach to Computer Networking
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Protocol Implementation - Engineering Approach to Computer Networking - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Protocol Implementation

An Engineering Approach to Computer Networking An Engineering Approach to Computer Networking

Protocol implementation nn

Depends onDepends on

structure structure and

and

environment environment

n n

StructureStructure

u u

partitioning partitioning of functionality between user and kernel

of functionality between user and kernel

uu

separation of layer processing ( separation of layer processing (

interface interface)

nn

EnvironmentEnvironment

u u

data copy cost data copy cost

u u

interrupt overhead interrupt overhead

uu

context switch time context switch time

uu

latency in accessing memory latency in accessing memory

u u

cache effects cache effects

Interface strategiesn n

Single-contextSingle-context

n n

TasksTasks

nn

UpcallsUpcalls

Monolithic in kernel

Per-process in user space

Interfaces nn

Single-contextSingle-context

n n

TasksTasks

n n

UpcallsUpcalls

Tasks

Upcalls

Some numbers n

10 Kbps

400 ms

n

100 Kbps,

40 ms

n

1 Mbps,

4 ms

n

100 Mbps,

40 μs

n

User-to-kernel context switch

~40 μs

n

Copying the packet

~25 μs

n

Checksum in software

~40 μs

n

Scheduling delays

~150 μs (depends on

workload)

n

Interrupt handling

~10-50 μs (depends on the

bus)

n

Protocol processing

~15 -100 μs (depends on

protocol complexity)

Rules of thumb nn

Optimize common caseOptimize common case

n n

Watch out for bottlenecksWatch out for bottlenecks

n n

Fine tune inner loopsFine tune inner loops

nn

Choose good data structuresChoose good data structures

nn

Beware of data touchingBeware of data touching

n n

Minimize # packets sentMinimize # packets sent

n n

Send largest packets possibleSend largest packets possible

nn

Cache hintsCache hints

nn

Use hardwareUse hardware

n n

Exploit application propertiesExploit application properties