0% found this document useful (0 votes)
43 views

Protocol Implementation

The document discusses different approaches to implementing computer networking protocols. It covers partitioning strategies such as putting functionality in user space versus kernel space. It also discusses different interface strategies such as using single-context, tasks, or upcalls. Additionally, it provides some metrics on timing costs for different networking operations and rules of thumb for optimizing protocol implementation.

Uploaded by

Madhava Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Protocol Implementation

The document discusses different approaches to implementing computer networking protocols. It covers partitioning strategies such as putting functionality in user space versus kernel space. It also discusses different interface strategies such as using single-context, tasks, or upcalls. Additionally, it provides some metrics on timing costs for different networking operations and rules of thumb for optimizing protocol implementation.

Uploaded by

Madhava Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Protocol Implementation

An Engineering Approach to Computer Networking

Protocol implementation
I I

Depends on structure and environment Structure N partitioning of functionality between user and kernel N separation of layer processing (interface) Environment N data copy cost N interrupt overhead N context switch time N latency in accessing memory N cache effects

Partitioning strategies
I

I I I

How much to put in user space, and how much in kernel space? N tradeoff between ! software engineering ! customizability ! security ! performance Monolithic in kernel space Monolithic in user space Per-process in user space

Interface strategies
I I I

Single-context Tasks Upcalls

Monolithic in kernel

Monolithic in user space

Per-process in user space

Interfaces
I I I

Single-context Tasks Upcalls

Single context

Tasks

Upcalls

Protocol implementation

Some numbers
I I I I I I I I

10 Kbps 400 ms 100 Kbps, 40 ms 1 Mbps, 4 ms 100 Mbps, 40 s User-to-kernel context switch Copying the packet Checksum in software Scheduling delays workload) Interrupt handling bus) Protocol processing protocol complexity)

~40 s ~25 s ~40 s ~150 s (depends on ~10-50 s (depends on the ~15 -100 s (depends on

Rules of thumb
I I I I I I I I I I

Optimize common case Watch out for bottlenecks Fine tune inner loops Choose good data structures Beware of data touching Minimize # packets sent Send largest packets possible Cache hints Use hardware Exploit application properties

You might also like