aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-03-19 16:27:10 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2013-03-19 16:27:10 -0400
commit2e38d7072c8c6ab21349db87cc21255c81c3cd19 (patch)
treed3c460fa39d93cd1e4af912d2eb1625800c631a1
parent7875daab4c236841ec03322c130fc2b0927745de (diff)
Formatted rest of README.
-rw-r--r--README.md263
1 files changed, 100 insertions, 163 deletions
diff --git a/README.md b/README.md
index 57d9afa..a9975d9 100644
--- a/README.md
+++ b/README.md
@@ -70,7 +70,7 @@ OUT_DIR/[SCHED_(FILE|DIR)/]
70 exec-err.txt # Standard err ''' 70 exec-err.txt # Standard err '''
71``` 71```
72 72
73*Defaults*: `SCHED_FILE = sched.py, PARAM_FILE = params.py, DURATION = 30, OUT_DIR = run-data/` 73*Defaults*: `SCHED_FILE = sched.py`, `PARAM_FILE = params.py`, `DURATION = 30`, `OUT_DIR = run-data/`
74 74
75This script reads *schedule files* (described below) and executes real-time task systems, recording all overhead, logging, and trace data which is enabled in the system. For example, if trace logging is enabled, rt-kernelshark is found in the path, but feather-trace is disabled (the devices are not present), only trace logs and rt-kernelshark logs will be recorded. 75This script reads *schedule files* (described below) and executes real-time task systems, recording all overhead, logging, and trace data which is enabled in the system. For example, if trace logging is enabled, rt-kernelshark is found in the path, but feather-trace is disabled (the devices are not present), only trace logs and rt-kernelshark logs will be recorded.
76 76
@@ -90,7 +90,7 @@ Schedule files have one of the following two formats:
90 [real_time_task] task_arguments... 90 [real_time_task] task_arguments...
91``` 91```
92 92
93b) python format 932. python format
94```python 94```python
95 {'proc':[ 95 {'proc':[
96 ('path/to/proc','proc_value'), 96 ('path/to/proc','proc_value'),
@@ -142,7 +142,7 @@ $ echo "release_master{2}
142A longer form can be used for proc entries not under `/proc/litmus`: 142A longer form can be used for proc entries not under `/proc/litmus`:
143 143
144```bash 144```bash
145$ echo "/proc/sys/something{hello}" 145$ echo "/proc/sys/something{hello}
14610 20" > test.sched 14610 20" > test.sched
147``` 147```
148 148
@@ -152,7 +152,7 @@ You can specify your own spin programs to run as well instead of rtspin by putti
152$ echo "colorspin -f color1.csv 10 20" > test.sched 152$ echo "colorspin -f color1.csv 10 20" > test.sched
153``` 153```
154 154
155You can specify parameters for an experiment in a file instead of on the command line using params.py (the `-p` option lets you choose the name of this file if params.py is not for you): 155You can specify parameters for an experiment in a file instead of on the command line using params.py (the `-p` option lets you choose the name of this file if `params.py` is not for you):
156 156
157```bash 157```bash
158$ echo "{'scheduler':'GSN-EDF', 'duration':10}" > params.py 158$ echo "{'scheduler':'GSN-EDF', 'duration':10}" > params.py
@@ -166,26 +166,19 @@ You can include non-relevant parameters which `run_exps.py` does not understand
166```bash 166```bash
167$ mkdir test1 167$ mkdir test1
168# The duration will default to 30 and need not be specified 168# The duration will default to 30 and need not be specified
169$ echo "{'scheduler':'C-EDF', 'test-param':1} > test1/params.py 169$ echo "{'scheduler':'C-EDF', 'test-param':1}" > test1/params.py
170$ echo "10 20" > test1/sched.py 170$ echo "10 20" > test1/sched.py
171$ cp -r test1 test2 171$ cp -r test1 test2
172$ echo "{'scheduler':'GSN-EDF', 'test-param':2}"> test2/params.py 172$ echo "{'scheduler':'GSN-EDF', 'test-param':2}"> test2/params.py
173$ run_exps.py test* 173$ run_exps.py test*
174``` 174```
175 175
176Finally, you can specify system properties in `params.py` which the environment must match for the experiment to run. These are useful if you have a large batch of experiments which must be run under different kernels or kernel configurations. The first property is a regular expression for the name of the kernel:Invalid environment for experiment 'test.sched' 176Finally, you can specify system properties in `params.py` which the environment must match for the experiment to run. These are useful if you have a large batch of experiments which must be run under different kernels or kernel configurations. The first property is a regular expression for the name of the kernel:
177Kernel name does not match '.*linux.*'.
178Experiments run: 1
179 Successful: 0
180 Failed: 0
181 Already Done: 0
182 Invalid Environment: 1
183 177
184```bash 178```bash
185$ uname -r 179$ uname -r
1863.0.0-litmus 1803.0.0-litmus
187$ cp params.py old_params.py 181$ echo "{'uname': r'.*linux.*'}" > params.py
188$ echo "{'uname': r'.*linux.*'}" >> params.py
189$ run_exps.py -s GSN-EDF test.sched 182$ run_exps.py -s GSN-EDF test.sched
190Invalid environment for experiment 'test.sched' 183Invalid environment for experiment 'test.sched'
191Kernel name does not match '.*linux.*'. 184Kernel name does not match '.*linux.*'.
@@ -194,51 +187,41 @@ Experiments run: 1
194 Failed: 0 187 Failed: 0
195 Already Done: 0 188 Already Done: 0
196 Invalid Environment: 1 189 Invalid Environment: 1
197$ cp old_params.py params.py 190$ echo "{'uname': r'.*litmus.*'}" > params.py
198$ echo "{'uname': r'.*litmus.*'}" >> params.py
199# run_exps.py will now succeed 191# run_exps.py will now succeed
200``` 192```
201 193
202The second property is kernel configuration options. These assume the configuration is stored at `/boot/config-```uname -r`` `. You can specify these like so: 194The second property is kernel configuration options. These assume the configuration is stored at `/boot/config-$(uname -r)`. You can specify these in `params.py` like so:
203 195
204```bash 196```python
205# Only executes on ARM systems with the release master enabled 197{'config-options':{
206$ echo "{'config-options':{ 198 'RELEASE_MASTER' : 'y',
207'RELEASE_MASTER' : 'y', 199 'ARM' : 'y'}
208'ARM' : 'y'}}" >> params.py 200}
209``` 201```
210 202
211 203
212III. GEN_EXPS 204## gen_exps.py
213Usage: gen_exps.py [options] [files...] [generators...] [param=val[,val]...] 205*Usage*: `gen_exps.py [options] [files...] [generators...] [param=val[,val]...]`
214Output: exps/EXP_DIRS which each contain sched.py and params.py
215Defaults: generators = G-EDF P-EDF C-EDF
216 206
217The gen_exps.py script uses 'generators', one for each LITMUS 207*Output*: OUT_DIR/EXP_DIRS which each contain sched.py and params.py
218scheduler supported, which each have different properties which can be
219varied to generate different types of schedules. Each of these
220properties has a default value which can be modified on the command
221line for quick and easy experiment generation.
222 208
223This script as written should be used to create debugging task sets, 209*Defaults*: `generators = G-EDF P-EDF C-EDF`, `OUT_DIR = exps/`
224but not for creating task sets for experiments shown in papers. That
225is because the safety features of run_exps.py described above (uname,
226config-options) are not used here. If you are creating experiments for
227a paper, you should create your own generator which outputs values for
228'config-options' required for your plugin so that you cannot ruin your
229experiments at run time.
230 210
231The -l option lists the supported generators which can be specified: 211This script uses *generators*, one for each LITMUS scheduler supported, which each have different properties which can be varied to generate different types of schedules. Each of these properties has a default value which can be modified on the command line for quick and easy experiment generation.
232 212
213This script as written should be used to create debugging task sets, but not for creating task sets for experiments shown in papers. That is because the safety features of `run_exps.py` described above (uname, config-options) are not used here. If you are creating experiments for a paper, you should create your own generator which outputs values for the `config-options` required for your plugin so that you cannot ruin your experiments at run time. Trust me, you will.
214
215The `-l` option lists the supported generators which can be specified:
216
217```bash
233$ gen_exps.py -l 218$ gen_exps.py -l
234G-EDF, P-EDF, C-EDF 219G-EDF, P-EDF, C-EDF
220```
235 221
236The -d option will describe the properties of a generator or 222The `-d` option will describe the properties of a generator or generators and their default values. Note that some of these defaults will vary depending on the system the script is run. For example, the `cpus` parameter defaults to the number of cpus on the current system, in this example 24.
237generators and their default values. Note that some of these defaults
238will vary depending on the system the script is run. For example,
239'cpus' defaults to the number of cpus on the current system, in this
240example 24.
241 223
224```bash
242$ gen_exps.py -d G-EDF,P-EDF 225$ gen_exps.py -d G-EDF,P-EDF
243Generator GSN-EDF: 226Generator GSN-EDF:
244 num_tasks -- Number of tasks per experiment. 227 num_tasks -- Number of tasks per experiment.
@@ -254,102 +237,80 @@ Generator PSN-EDF:
254 Default: [24] 237 Default: [24]
255 Allowed: <type 'int'> 238 Allowed: <type 'int'>
256 .... 239 ....
240```
257 241
258You create experiments by specifying a generator. The following will 242You create experiments by specifying a generator. The following will create experiments 4 schedules with 24, 48, 72, and 96 tasks, because the default value of `num_tasks` is an array of these values (see above).
259create experiments 4 schedules with 24, 48, 72, and 96 tasks, because
260the default value of num_tasks is an array of these values
261 243
244```bash
262$ gen_exps.py P-EDF 245$ gen_exps.py P-EDF
263$ ls exps/ 246$ ls exps/
264sched=GSN-EDF_num-tasks=24/ sched=GSN-EDF_num-tasks=48/ 247sched=GSN-EDF_num-tasks=24/ sched=GSN-EDF_num-tasks=48/
265sched=GSN-EDF_num-tasks=72/ sched=GSN-EDF_num-tasks=96/ 248sched=GSN-EDF_num-tasks=72/ sched=GSN-EDF_num-tasks=96/
249```
266 250
267You can modify the default using a single value (the -f option deletes 251You can modify the default using a single value (the `-f` option deletes previous experiments in the output directory, defaulting to `exps/`, changeable with `-o`):
268previous experiments in the output directory, defaulting to 'exps/',
269changeable with -o):
270 252
253```bash
271$ gen_exps.py -f P-EDF num_tasks=24 254$ gen_exps.py -f P-EDF num_tasks=24
272$ ls exps/ 255$ ls exps/
273sched=GSN-EDF_num-tasks=24/ 256sched=GSN-EDF_num-tasks=24/
257```
274 258
275Or with an array of values, specified as a comma-seperated list: 259Or with an array of values, specified as a comma-seperated list:
276 260
261```bash
277$ gen_exps.py -f num_tasks=`seq -s, 24 2 30` P-EDF 262$ gen_exps.py -f num_tasks=`seq -s, 24 2 30` P-EDF
278sched=PSN-EDF_num-tasks=24/ sched=PSN-EDF_num-tasks=26/ 263sched=PSN-EDF_num-tasks=24/ sched=PSN-EDF_num-tasks=26/
279sched=PSN-EDF_num-tasks=28/ sched=PSN-EDF_num-tasks=30/ 264sched=PSN-EDF_num-tasks=28/ sched=PSN-EDF_num-tasks=30/
265```
280 266
281The generator will create a different directory for each possible 267The generator will create a different directory for each possible configuration of the parameters. Each parameter which is varied is included in the name of the schedule directory. For example, to vary the number of CPUs but not the number of tasks:
282configuration of the parameters. Each parameter which is varied is
283included in the name of the schedule directory. For example, to vary
284the number of CPUs but not the number of tasks: