enabling internet “suspend/resume” with session continuations alex c. snoeren mit laboratory for...

10
Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek, and Jon Salz)

Upload: melinda-barrett

Post on 25-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Enabling Internet “Suspend/Resume”

with Session Continuations

Alex C. Snoeren

MIT Laboratory for Computer Science(with Hari Balakrishnan, Frans Kaashoek, and Jon Salz)

Page 2: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Challenges of “Suspend/Resume”

What happens to the “other” end?

How does the session resume?

It’s a state management problem.

Page 3: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Suspend/Resume Tasks

• Intelligent disconnection handling Buffer otherwise lost communications Emulate remote services locally Release resources while disconnected

• Graceful resumption handling Reallocate resources and restore state Adapt to new network conditions Indicate how to resume processing

Page 4: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Motivating Continuations

• Observation: complete context inappropriate Some previous state irrelevant, or, even worse, Invalidated due to change in conditions

• Similar problem in programming languages Block when state and context is complex Pass continuation if state and context is small

• Continuations can request blocking behavior

Page 5: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Using Continuations

User level

App

Kernel

SL

• Expand session notion Align with application Annotate state, resources, associated computation Include system state

• Provide synchronization and preservation assistance Shared attribute/value store Persist local system IPC, file descriptors

• System invokes continuation at session resumption Generated in response to disconnection notification

Page 6: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

An Example: SSH Session

• Remote log in / port forwarding Provides secure remote communication Data compressed and encrypted as a stream

SSHd

shell

emacs

Xapp

serverclient

ssh

Page 7: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Conserving Session Resources

SSHd

emacs

SocketBuffers

NetworkPorts

OpenFiles

Kernel

Resources dedicated toactive session

>>Resources dedicated to

suspended session

Release systemresources as well

Continuation generation is recursive!

Page 8: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

SSH Continuation

• Don’t suspend until it’s convenient Process pending data, deliver to app or network

• Only a minimum of state to preserve Auth, crypto, and compression state Preserve IPC to child processes

• Notify child processes of disconnection Tunneled apps share connectivity fate

Added ~250 LOC in an afternoon

Page 9: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Continuation Efficiency

Anecdotal evidence of size and speed

SSHd FTPd0

200

400

600

800

1000

1200

1400

1600

1800

2000

Mem

ory

Usa

ge (

KB

)

0

50

100

150

200

250

300

Res

tart

Lat

ency

(m

sec)

SSHd FTPd

System Resources

Shared Pages

Non-Shared Pages

Startup Latency

Session Overhead

SessionContinuation

Page 10: Enabling Internet “Suspend/Resume” with Session Continuations Alex C. Snoeren MIT Laboratory for Computer Science (with Hari Balakrishnan, Frans Kaashoek,

Conclusion & Future Directions

• Continuations enable “suspend/resume” Integrates well with session model Support intelligent application adaptation Enable system resource conservation

• Useful for mobility across hosts? Continuations eliminate dependencies An area for future exploration…