1 | (* This is a picture of the Concurrent, low-latency checkpointing algorithm. *)
|
---|
2 |
|
---|
3 | newgraph
|
---|
4 | xaxis min 0 max 3 size 2.5 nodraw
|
---|
5 | yaxis min 0 max 2.0 size 2.0 nodraw
|
---|
6 |
|
---|
7 | (* Draw the address space *)
|
---|
8 | newstring fontsize 9 hjc vjt x 0.25 y -0.07 : Address\
|
---|
9 | Space
|
---|
10 |
|
---|
11 | newcurve marktype ellipse marksize 0.1 .14 fill 1 pts
|
---|
12 | shell : echo "" | awk '{ for (i = 0.67; i < 1.37; i += 0.14) printf("0.5 %f\n", i, i);}'
|
---|
13 |
|
---|
14 | newcurve marktype box fill 1 marksize 0.5 0.6 pts 0.25 0.3
|
---|
15 | newcurve marktype box fill 0.5 marksize 0.5 0.14 pts
|
---|
16 |
|
---|
17 |
|
---|
18 | shell : echo "" | awk '{ for (i = 0.67; i < 1.37; i += 0.14) printf("0.25 %f\n", i);}'
|
---|
19 | copycurve fill 1 pts
|
---|
20 | shell : echo "" | awk '{ for (i = 1.37; i < 2.00; i += 0.14) printf("0.25 %f\n", i);}'
|
---|
21 |
|
---|
22 | (* Draw the registers *)
|
---|
23 | newline pts 0.0 0.6 0.5 0.6
|
---|
24 | shell : echo "0.7 0" | awk -f regs.awk
|
---|
25 | newstring hjc vjc fontsize 7 x 1.3 y 0.3 : . . .
|
---|
26 | newstring fontsize 9 hjc vjt x 1.05 y -0.07 : CPU\
|
---|
27 | States
|
---|
28 |
|
---|
29 | (* Draw the pool of page buffers *)
|
---|
30 |
|
---|
31 | newcurve marktype ellipse fill 1 marksize 0.1 0.14 pts
|
---|
32 | shell : echo "" | awk '{ for (i = 0.67; i < 1.09; i += 0.14) printf("2.2 %f\n", i);}'
|
---|
33 | newcurve marktype box marksize 0.5 0.14 fill 1 pts
|
---|
34 | shell : echo "" | awk '{ for (i = 0.67; i < 1.09; i += 0.14) printf("1.95 %f\n", i);}'
|
---|
35 | shell : echo "" | awk '{ for (i = 1.51; i < 1.79; i += 0.14) printf("1.95 %f\n", i);}'
|
---|
36 | copycurve fill .5 pts
|
---|
37 | shell : echo "" | awk '{ for (i = 1.09; i < 1.51; i += 0.14) printf("1.95 %f\n", i);}'
|
---|
38 | newstring fontsize 9 hjc vjt x 1.95 y 0.53 : Page\
|
---|
39 | Pool
|
---|
40 |
|
---|
41 |
|
---|
42 | (* Draw arrows *)
|
---|
43 | newcurve marktype text hjl vjc x 0 y 0 rotate 90 fontsize 7 : . . .
|
---|
44 | pts 0.9 1.35 2.5 1.05
|
---|
45 | shell : echo "" | awk '{ for (i = 0.67; i < 1.37; i += 0.14) printf("newline linetype dotted rarrow asize .07 .04 pts 0.55 %f 1.6 %f\n", i, i+.14);}'
|
---|
46 |
|
---|
47 | newline pts 1.3 0.635 1.22 0.4
|
---|
48 | newline pts 1.3 0.635 1.3 0.4
|
---|
49 | newline pts 1.3 0.635 1.38 0.4
|
---|
50 | newline rarrow asize .07 .04 pts 1.0 0.6 1.3 0.635 1.6 0.67
|
---|
51 |
|
---|
52 | (* Draw the bezier to disk *)
|
---|
53 |
|
---|
54 | newline linetype dotted
|
---|
55 | shell : echo "" | awk '{ for (i = 0.67; i < 1.09; i += 0.14) printf("copycurve bezier pts 2.25 %f 2.6 %f 2.7 %f 2.7 %f\n", i, i+.1, i, i-.1);}'
|
---|
56 | copycurve nobezier rarrow asize .07 .04 pts 2.7 0.85 2.7 0.45
|
---|
57 |
|
---|
58 | (* Draw the disk *)
|
---|
59 | shell : echo "2.5 0.0" | awk -f disk.awk
|
---|