1 / 34

Prefetching for Mobile Computers Using Shape Graphs

Prefetching for Mobile Computers Using Shape Graphs. Kristian Kvilekval and Ambuj Singh University of California, Santa Barbara. Cache. Prefetching for Mobile Applications. Application on Mobile Computer Access remote store objects Periodic interruption Object Oriented Databases

sabina
Download Presentation

Prefetching for Mobile Computers Using Shape Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Prefetching for Mobile Computers Using Shape Graphs Kristian Kvilekval and Ambuj Singh University of California, Santa Barbara Kristian Kvilekval UCSB

  2. Cache Prefetching for Mobile Applications • Application on Mobile Computer • Access remote store objects • Periodic interruption • Object Oriented Databases • Distributed Object system Kristian Kvilekval UCSB

  3. Our Approach • Code-based prefetching • Prefetch only those objects accessed by the code • Extract program access patterns • Provide runtime system with future accesses • Advantages • Complex pointer-based structures • Prefetches cold misses • Good accuracy Kristian Kvilekval UCSB

  4. Capturing Access Pattern Statically • Shape Analysis • Represents runtime data structures at compile time as graphs • Applications: extracts properties of programs • Synchronization[Bogda99][Ruf00] • Parallelization[Corbera99] • Safety[Ghiya96][Nurit98][Wilhem00] Kristian Kvilekval UCSB

  5. Basic Shape Analysis • Graph • Abstract locations (heap cells) • Edges labeled with with field names • Abstract interpretation • Extend graph through field references • Combine graphs when heap location is shared Kristian Kvilekval UCSB

  6. part part connector right material Example shape classConnector{ Part a,b; } class Part { Connector left,right,up,down; Material m Supplier s; … int volume(); } weight=0; while (part) { weight+=(part.material.density *part.volume()); part=part.right.b; } Kristian Kvilekval UCSB

  7. Construction of Shape Graphs x Kristian Kvilekval UCSB

  8. Construction of Shape Graphs x.f = s; F Kristian Kvilekval UCSB

  9. Construction of Shape Graphs x.f = s; t = x.f.g; F G Kristian Kvilekval UCSB

  10. Construction of Shape Graphs x.f = s; x.f.g = t; x = x.n; N F ? G Kristian Kvilekval UCSB

  11. N F G Construction of Shape Graphs x.f = s; x.f.g = t; if (x != null) x = x.n; Kristian Kvilekval UCSB

  12. N F J F G K Combining Shape Graphs x = y; Kristian Kvilekval UCSB

  13. N F J F G K Combining Shape Graphs • Unify graphs recursively Kristian Kvilekval UCSB

  14. N F J F G K Unification of Shape Graphs • Unify graphs recursively N F J G K Kristian Kvilekval UCSB

  15. Shape Analysis Algorithm •  methods Interpret basic blocks • Create shapes for basic blocks • Run until fixed-point is reached • Propagate in static callgraph Kristian Kvilekval UCSB

  16. Static Call Graphs main Static representation of calls m2 m3 m4 m3{ a.f = s; o.m4(a) } Class C { m4(F f) { … } Unify(a,f) f Kristian Kvilekval UCSB

  17. Call Graphs m1 • Propagate bottom up • Merge polymorphic calls • Recursive Calls • Fixed point • Merge SCC[Ruf00] m2 B.m4 m3 m4 D1.m4 D2.m4 m1 m2 m1 Kristian Kvilekval UCSB

  18. Prefetching with shape graphs • Compile Time • Generate shapes for method references • Self, arguments, and global variables • Label shape edges with earliest access • Annotate programs to pass visible references and method ID to runtime • Runtime • Interpret shape graph on the actual object graph Kristian Kvilekval UCSB

  19. Prefetching with Shape Graphs N:5 a1 N N o1:0 o4:5 o6:10 J:10 F:10 F J J o2:10 o5:15 a2 a4 K G:5 K:10 o3:20 a3 a5 (o1,a1) » (o4,a1) » (o2,a2) » (o6,a1) » (o5,a4) » (o3,a5) Kristian Kvilekval UCSB

  20. Evaluation • Java specjvm benchmarks • Track all objects accesses • Disconnects • Poisson/Gaussian • Duration: 500 • Prefetching • Interval: 2 • Lookahead: 512 • Cache: 2048 Cache Kristian Kvilekval UCSB

  21. mtrt cold-misses Kristian Kvilekval UCSB

  22. OO7 all cold-misses Kristian Kvilekval UCSB

  23. OO7 Startup cold-misses Kristian Kvilekval UCSB

  24. Benchmarks Infinite lookahead with infinite cache Kristian Kvilekval UCSB

  25. Effect of Varying Disconnect Cost Kristian Kvilekval UCSB

  26. Effect of Varying Cache Size Kristian Kvilekval UCSB

  27. Prefetcher Overhead Kristian Kvilekval UCSB

  28. Future Extensions • Accuracy and Overhead • Dynamic runtime values (hashtable) • Find high-payoff points (callgraph,history) • Balancing prefetching with • cache, bandwidth, and power. • Tuning prefetcher to link stability • And phase behavior of programs • Extend shape analysis to work at runtime • Apply to non-mobile systems. Kristian Kvilekval UCSB

  29. Similar Approaches • Classfiles [Krintz98] • Earliest method invocation through callgraph and block analysis • Slices for multithreaded processors [Collins01][Zilles01] • Preexecute data operations ahead of program • I/O extraction[Mitra00] • Extract I/O related variables and execute in separate thread. Kristian Kvilekval UCSB

  30. Conclusions • Code-based prefetching technique for complex pointer-based structures • Able to prefetch cold misses • Good accuracy kris@cs.ucsb.edu Kristian Kvilekval UCSB

  31. New Style Applications Disconnections Sharing Distribution Network-topology Mobile Collaborative Serverless Dynamic Kristian Kvilekval UCSB

  32. Collaborative Mobile Applications • Calendar, Whiteboard, Bibliographer • Cooperative Web cache • Emergency services • Games • Construction/Filming/Concerts Kristian Kvilekval UCSB

  33. Prefetching for availability • File Systems • Explicit or Structured • Coda [Kistler92], Ficus/Rumor/Roam [Guy98] • Prediction (SEER[Keunning97]) • Cluster based on file opens • Databases • Attributes [Phatak99] • Checkout [Holliday00] • Object Bases[Knafla99] • Access patterns applied to object structure Kristian Kvilekval UCSB

  34. Mobile Model Groups Wireless Portable Kristian Kvilekval UCSB

More Related