teleport messaging for distributed stream programs
play

Teleport Messaging for Distributed Stream Programs William Thies, - PowerPoint PPT Presentation

1 Teleport Messaging for Distributed Stream Programs William Thies, Michal Karczmarek, Janis Sermulins, Rodric Rabbah and Saman Amarasinghe Massachusetts Institute of Technology PPoPP 2005 http://cag.lcs.mit.edu/streamit Please note: This


  1. 1 Teleport Messaging for Distributed Stream Programs William Thies, Michal Karczmarek, Janis Sermulins, Rodric Rabbah and Saman Amarasinghe Massachusetts Institute of Technology PPoPP 2005 http://cag.lcs.mit.edu/streamit Please note: This presentation was updated in September 2006 to simplify the timing of upstream messages. The corresponding update of the paper is available at http://cag.csail.mit.edu/commit/papers/05/thies-ppopp05.pdf

  2. Streaming Application Domain 2 AtoD • Based on a stream of data – Radar tracking, microphone arrays, Decode HDTV editing, cell phone base stations duplicate – Graphics, multimedia, software radio • Properties of stream programs LPF 1 LPF 2 LPF 3 – Regular and repeating computation – Parallel, independent actors HPF 1 HPF 2 HPF 3 with explicit communication roundrobin – Data items have short lifetimes Amenable to aggressive Encode compiler optimization [ASPLOS ’02, PLDI ’03, LCTES’03, LCTES ’05] Transmit

  3. Control Messages 3 AtoD • Occasionally, low-bandwidth control messages are sent between actors Decode • Often demands precise timing duplicate – Communications: adjust protocol, amplification, compression LPF 1 LPF 2 LPF 3 – Network router: cancel invalid packet – Adaptive beamformer: track a target HPF 1 HPF 2 HPF 3 – Respond to user input, runtime errors – Frequency hopping radio roundrobin What is the right programming model? Encode How to implement efficiently? Transmit

  4. Supporting Control Messages 4 • Option 1: Synchronous method call PRO: - delivery transparent to user CON: - timing is unclear - limits parallelism • Option 2: Embed message in stream PRO: - message arrives with data CON: - complicates filter code - complicates stream graph - runtime overhead

  5. Teleport Messaging 5 • Looks like method call, but timed relative to data in the stream TargetFilter x; if newProtocol(p) { x.setProtocol(p) @ 2; } void setProtocol(int p) { reconfig(p); } • PRO: – simple and precise for user • adjustable latency • can send upstream or downstream – exposes dependences to compiler

  6. Outline 6 • StreamIt • Teleport Messaging • Case Study • Related Work and Conclusion

  7. Outline 7 • StreamIt • Teleport Messaging • Case Study • Related Work and Conclusion

  8. Model of Computation 8 • Synchronous Dataflow [Lee 92] A/D – Graph of autonomous filters – Communicate via FIFO channels Band Pass – Static I/O rates Duplicate • Compiler decides on an order of execution (schedule) Detect Detect Detect Detect – Many legal schedules LED LED LED LED

  9. Example StreamIt Filter 9 float-> float filter LowPassFilter (int N, float[N] weights) { work peek N push 1 pop 1 { float result = 0; for (int i= 0; i< weights.length; i+ + ) { result + = weights[i] * peek (i); } N push (result); pop (); } filter }

  10. Example StreamIt Filter 10 float-> float filter LowPassFilter (int N, float[N] weights) { work peek N push 1 pop 1 { float result = 0; for (int i= 0; i< weights.length; i+ + ) { N result + = weights[i] * peek (i); } push (result); pop (); } filter handler setWeights(float[N] _weights) { weights = _weights; } }

  11. Example StreamIt Filter 11 float-> float filter LowPassFilter (int N, float[N] weights , Frontend f ) { work peek N push 1 pop 1 { float result = 0; for (int i= 0; i< weights.length; i+ + ) { N result + = weights[i] * peek (i); } if (result = = 0) { f.increaseGain() @ [2:5]; } filter push (result); pop (); } handler setWeights(float[N] _weights) { weights = _weights; } }

  12. StreamIt Language Overview 12 • StreamIt is a novel filter language for streaming pipeline – Exposes parallelism and may be communication any StreamIt language construct – Architecture independent splitjoin – Modular and composable parallel computation • Simple structures composed to creates complex graphs – Malleable splitter joiner • Change program behavior with small modifications feedback loop splitter joiner

  13. Outline 13 • StreamIt • Teleport Messaging • Case Study • Related Work and Conclusion

  14. Providing a Common Timeframe 14 • Control messages need precise timing with respect to data stream • However, there is no global clock in distributed systems – Filters execute independently, whenever input is available • Idea: define message timing with respect to data dependences – Must be robust to multiple datarates – Must be robust to splitting, joining

  15. Stream Dependence Function (SDEP) 15 • Describes data dependences between filters A B

  16. Stream Dependence Function (SDEP) 16 • Describes data dependences between filters A B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  17. Stream Dependence Function (SDEP) 17 • Describes data dependences between filters A n SDEP A � B ( n ) push 2 0 1 pop 3 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  18. Stream Dependence Function (SDEP) 18 • Describes data dependences between filters A n SDEP A � B ( n ) push 2 0 0 1 pop 3 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  19. Stream Dependence Function (SDEP) 19 • Describes data dependences between filters A × 1 n SDEP A � B ( n ) push 2 0 0 1 pop 3 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  20. Stream Dependence Function (SDEP) 20 • Describes data dependences between filters A × 2 n SDEP A � B ( n ) push 2 0 0 1 pop 3 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  21. Stream Dependence Function (SDEP) 21 • Describes data dependences between filters A × 2 n SDEP A � B ( n ) push 2 0 0 1 pop 3 × 1 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  22. Stream Dependence Function (SDEP) 22 • Describes data dependences between filters A × 2 n SDEP A � B ( n ) push 2 0 0 1 2 pop 3 × 1 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  23. Stream Dependence Function (SDEP) 23 • Describes data dependences between filters A × 3 n SDEP A � B ( n ) push 2 0 0 1 2 pop 3 × 1 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  24. Stream Dependence Function (SDEP) 24 • Describes data dependences between filters A × 3 n SDEP A � B ( n ) push 2 0 0 1 2 pop 3 × 2 2 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  25. Stream Dependence Function (SDEP) 25 • Describes data dependences between filters A × 3 n SDEP A � B ( n ) push 2 0 0 1 2 pop 3 × 2 2 3 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  26. Stream Dependence Function (SDEP) 26 • Describes data dependences between filters A × 3 n * 3 = n SDEP A � B ( n ) push 2 2 0 0 1 2 pop 3 × 2 2 3 B SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  27. Calculating SDEP: General Case 27 A SDEP A � C (n) = max [SDEP A � Bi (SDEP Bi � C (n))] B 1 B m i ∈ [1,m] SDEP is compositional C SDEP A � B ( n ): minimum number of times that A must execute to make it possible for B to execute n times

  28. Teleport Messaging using SDEP 28 • SDEP provides precise semantics for message timing S If S sends message to R : • on the n th execution of S • with latency range [ k 1 , k 2 ] X Then message is delivered to R : • on any iteration m such that n + k 1 · SDEP S � R ( m ) · n + k 2 R

  29. Teleport Messaging using SDEP 29 • SDEP provides precise semantics for message timing S push 1 If S sends message to R : • on the n th execution of S pop 1 • with latency range [ k 1 , k 2 ] X push 1 Then message is delivered to R : • on any iteration m such that pop 1 n + k 1 · SDEP S � R ( m ) · n + k 2 R

  30. Teleport Messaging using SDEP 30 • SDEP provides precise semantics for message timing × 1 S push 1 If S sends message to R : • on the n th execution of S pop 1 • with latency range [ k 1 , k 2 ] X push 1 Then message is delivered to R : • on any iteration m such that pop 1 n + k 1 · SDEP S � R ( m ) · n + k 2 R

  31. Teleport Messaging using SDEP 31 • SDEP provides precise semantics for message timing × 2 S push 1 If S sends message to R : • on the n th execution of S pop 1 • with latency range [ k 1 , k 2 ] X push 1 Then message is delivered to R : • on any iteration m such that pop 1 n + k 1 · SDEP S � R ( m ) · n + k 2 R

  32. Teleport Messaging using SDEP 32 • SDEP provides precise semantics for message timing × 3 S push 1 If S sends message to R : • on the n th execution of S pop 1 • with latency range [ k 1 , k 2 ] X push 1 Then message is delivered to R : • on any iteration m such that pop 1 n + k 1 · SDEP S � R ( m ) · n + k 2 R

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend