Prefetching for Mobile Computers Using Shape Graphs - PowerPoint PPT Presentation

About This Presentation
Title:

Prefetching for Mobile Computers Using Shape Graphs

Description:

Prefetching for Mobile Computers Using Shape Graphs ... { Static representation of calls. f. Unify(a,f) LCR'02. Kristian Kvilekval UCSB. 17. Call Graphs ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 35
Provided by: kri8
Category:

less

Transcript and Presenter's Notes

Title: Prefetching for Mobile Computers Using Shape Graphs


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

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

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

4
Capturing Access Pattern Statically
  • Shape Analysis
  • Represents runtime data structures at compile
    time as graphs
  • Applications extracts properties of programs
  • SynchronizationBogda99Ruf00
  • ParallelizationCorbera99
  • SafetyGhiya96Nurit98Wilhem00

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

6
Example shape
class Connector Part a,b class Part
Connector left,right,up,down Material m
Supplier s int volume() weight0 while
(part) weight(part.material.density
part.volume()) partpart.right.b
7
Construction of Shape Graphs
x
8
Construction of Shape Graphs
x.f s
F
9
Construction of Shape Graphs
x.f s t x.f.g
F
G
10
Construction of Shape Graphs
x.f s x.f.g t x x.n
N
F
?
G
11
Construction of Shape Graphs
x.f s x.f.g t if (x ! null) x x.n

12
Combining Shape Graphs
x y
13
Combining Shape Graphs
  • Unify graphs recursively

14
Unification of Shape Graphs
  • Unify graphs recursively

N
F
J
G
K
15
Shape Analysis Algorithm
  • ? methods Interpret basic blocks
  • Create shapes for basic blocks
  • Run until fixed-point is reached
  • Propagate in static callgraph

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
17
Call Graphs
m1
  • Propagate bottom up
  • Merge polymorphic calls
  • Recursive Calls
  • Fixed point
  • Merge SCCRuf00

m2
B.m4
m3
m4
D1.m4
D2.m4
m1
m2
m1
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

19
Prefetching with Shape Graphs
N5
a1
N
N
o10
o45
o610
J10
F10
F
J
J
o210
o515
a2
a4
K
G5
K10
o320
a5
a3
(o1,a1) (o4,a1) (o2,a2) (o6,a1) (o5,a4)
(o3,a5)
20
Evaluation
  • Java specjvm benchmarks
  • Track all objects accesses
  • Disconnects
  • Poisson/Gaussian
  • Duration 500
  • Prefetching
  • Interval 2
  • Lookahead 512
  • Cache 2048

Cache
jess Expert System
db Address DB
mtrt ray tracer
OO7 OO database
21
mtrt cold-misses
22
OO7 all cold-misses
23
OO7 Startup cold-misses
24
Benchmarks
Benchmark Initialized INFcold PREcold Time INF Time PRE
jess 11196 1182 27 328K 310K
Db 528 51 1 11002 3982
mtrt 179527 2498 3 1803K 1222K
OO7 228535 107550 1 3133K 2547K
Infinite lookahead with infinite cache
25
Effect of Varying Disconnect Cost
26
Effect of Varying Cache Size
27
Prefetcher Overhead
benchmark jess mtrt
objects 26462 209630
cache 1024 2048 4096 10240 20480 40960
Discards cache 34386 10941 6707 24132 21073 30748
Discards pre 73350 5335 1243 48432 16496 13213
Jess \ Lookahead 0 64 256 512 1024 2048
Runtime 401K 375K 358K 357K 346K 346K
Discards 0 10K 6K 7K 7K 8.4K
wait 0 79 82 83 83 83
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.

29
Similar Approaches
  • Classfiles Krintz98
  • Earliest method invocation through callgraph and
    block analysis
  • Slices for multithreaded processors
    Collins01Zilles01
  • Preexecute data operations ahead of program
  • I/O extractionMitra00
  • Extract I/O related variables and execute in
    separate thread.

30
Conclusions
  • Code-based prefetching technique for complex
    pointer-based structures
  • Able to prefetch cold misses
  • Good accuracy
  • kris_at_cs.ucsb.edu

31
New Style Applications
Disconnections Sharing Distribution Network-topolo
gy
Mobile Collaborative Serverless Dynamic
32
Collaborative Mobile Applications
  • Calendar, Whiteboard, Bibliographer
  • Cooperative Web cache
  • Emergency services
  • Games
  • Construction/Filming/Concerts

33
Prefetching for availability
  • File Systems
  • Explicit or Structured
  • Coda Kistler92, Ficus/Rumor/Roam Guy98
  • Prediction (SEERKeunning97)
  • Cluster based on file opens
  • Databases
  • Attributes Phatak99
  • Checkout Holliday00
  • Object BasesKnafla99
  • Access patterns applied to object structure

34
Mobile Model
Groups
Wireless
Portable
Write a Comment
User Comments (0)
About PowerShow.com