-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
91 lines (86 loc) · 1.14 KB
/
test.sh
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
clear
echo -e "\n********** Scenario 1 **********\n"
./bufcache <<EOS
hash
free
getblk 4
hash
free
EOS
echo -e "\n\n"
read -r -p "Press Enter key to continue ..." key
echo -e "\n\n\n\n\n\n\n\n"
clear
echo -e "\n ********** Scenario 2 **********\n"
./bufcache <<EOS
hash
free
getblk 18
hash
free
EOS
echo -e "\n\n"
read -r -p "Press Enter key to continue ..." key
echo -e "\n\n\n\n\n\n\n\n"
clear
echo -e "\n ********** Scenario 3 **********\n"
./bufcache <<EOS
hash
free
set 3 stat D
set 5 stat D
hash
free
getblk 18
hash
free
EOS
echo -e "\n\n"
read -r -p "Press Enter key to continue ..." key
echo -e "\n\n\n\n\n\n\n\n"
clear
echo -e "\n ********** Scenario 4 **********\n"
./bufcache <<EOS
hash
free
getblk 3
getblk 5
getblk 4
getblk 28
getblk 97
getblk 10
free
getblk 18
hash
free
wait
brelse 28
hash
free
wait
EOS
echo -e "\n\n"
read -r -p "Press Enter key to continue ..." key
echo -e "\n\n\n\n\n\n\n\n"
clear
echo -e "\n ********** Scenario 5 **********\n"
./bufcache <<EOS
hash
free
getblk 64
hash
free
wait
brelse 17
hash
free
wait
brelse 64
hash
free
wait
EOS
echo -e "\n\n"
read -r -p "Press Enter key to continue ..." key
echo -e "\n\n"