File: cll.jgr

package info (click to toggle)
jgraph 83-25
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,008 kB
  • sloc: ansic: 4,596; makefile: 145; sh: 106; awk: 104
file content (59 lines) | stat: -rw-r--r-- 2,238 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(* This is a picture of the Concurrent, low-latency checkpointing algorithm. *)

newgraph
xaxis min 0 max 3 size 2.5 nodraw
yaxis min 0 max 2.0 size 2.0 nodraw

(* Draw the address space *)
newstring fontsize 9 hjc vjt x 0.25 y -0.07 : Address\
Space

newcurve marktype ellipse marksize 0.1 .14 fill 1 pts
shell : echo "" | awk '{ for (i = 0.67; i < 1.37; i += 0.14) printf("0.5 %f\n", i, i);}'

newcurve marktype box fill 1 marksize 0.5 0.6 pts 0.25 0.3
newcurve marktype box fill 0.5 marksize 0.5 0.14 pts 


shell : echo "" | awk '{ for (i = 0.67; i < 1.37; i += 0.14) printf("0.25 %f\n", i);}'
copycurve fill 1 pts
shell : echo "" | awk '{ for (i = 1.37; i < 2.00; i += 0.14) printf("0.25 %f\n", i);}'

(* Draw the registers *)
newline pts 0.0 0.6    0.5 0.6
shell : echo "0.7 0" | awk -f regs.awk
newstring hjc vjc fontsize 7 x 1.3 y 0.3 : . . .
newstring fontsize 9 hjc vjt x 1.05 y -0.07 : CPU\
States

(* Draw the pool of page buffers *)

newcurve marktype ellipse fill 1 marksize 0.1 0.14 pts
shell : echo "" | awk '{ for (i = 0.67; i < 1.09; i += 0.14) printf("2.2 %f\n", i);}'
newcurve marktype box marksize 0.5 0.14 fill 1 pts
shell : echo "" | awk '{ for (i = 0.67; i < 1.09; i += 0.14) printf("1.95 %f\n", i);}'
shell : echo "" | awk '{ for (i = 1.51; i < 1.79; i += 0.14) printf("1.95 %f\n", i);}'
copycurve fill .5 pts
shell : echo "" | awk '{ for (i = 1.09; i < 1.51; i += 0.14) printf("1.95 %f\n", i);}'
newstring fontsize 9 hjc vjt x 1.95 y 0.53 : Page\
Pool


(* Draw arrows *)
newcurve marktype text hjl vjc x 0 y 0 rotate 90 fontsize 7 : . . . 
  pts 0.9 1.35   2.5 1.05
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);}'

newline pts 1.3 0.635   1.22  0.4
newline pts 1.3 0.635   1.3  0.4
newline pts 1.3 0.635   1.38  0.4
newline rarrow asize .07 .04  pts 1.0 0.6   1.3 0.635   1.6 0.67

(* Draw the bezier to disk *)

newline linetype dotted 
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);}' 
copycurve nobezier rarrow asize .07 .04  pts 2.7 0.85 2.7 0.45

(* Draw the disk *)
shell : echo "2.5 0.0" | awk -f disk.awk