diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-19 16:27:10 -0400 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-19 16:27:10 -0400 |
| commit | 2e38d7072c8c6ab21349db87cc21255c81c3cd19 (patch) | |
| tree | d3c460fa39d93cd1e4af912d2eb1625800c631a1 | |
| parent | 7875daab4c236841ec03322c130fc2b0927745de (diff) | |
Formatted rest of README.
| -rw-r--r-- | README.md | 263 |
1 files changed, 100 insertions, 163 deletions
| @@ -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 | ||
| 75 | This 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. | 75 | This 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 | ||
| 93 | b) python format | 93 | 2. 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} | |||
| 142 | A longer form can be used for proc entries not under `/proc/litmus`: | 142 | A 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} |
| 146 | 10 20" > test.sched | 146 | 10 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 | ||
| 155 | You 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): | 155 | You 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 | ||
| 176 | Finally, 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' | 176 | Finally, 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: |
| 177 | Kernel name does not match '.*linux.*'. | ||
| 178 | Experiments 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 |
| 186 | 3.0.0-litmus | 180 | 3.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 |
| 190 | Invalid environment for experiment 'test.sched' | 183 | Invalid environment for experiment 'test.sched' |
| 191 | Kernel name does not match '.*linux.*'. | 184 | Kernel 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 | ||
| 202 | The second property is kernel configuration options. These assume the configuration is stored at `/boot/config-```uname -r`` `. You can specify these like so: | 194 | The 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 | ||
| 212 | III. GEN_EXPS | 204 | ## gen_exps.py |
| 213 | Usage: gen_exps.py [options] [files...] [generators...] [param=val[,val]...] | 205 | *Usage*: `gen_exps.py [options] [files...] [generators...] [param=val[,val]...]` |
| 214 | Output: exps/EXP_DIRS which each contain sched.py and params.py | ||
| 215 | Defaults: generators = G-EDF P-EDF C-EDF | ||
| 216 | 206 | ||
| 217 | The gen_exps.py script uses 'generators', one for each LITMUS | 207 | *Output*: OUT_DIR/EXP_DIRS which each contain sched.py and params.py |
| 218 | scheduler supported, which each have different properties which can be | ||
| 219 | varied to generate different types of schedules. Each of these | ||
| 220 | properties has a default value which can be modified on the command | ||
| 221 | line for quick and easy experiment generation. | ||
| 222 | 208 | ||
| 223 | This script as written should be used to create debugging task sets, | 209 | *Defaults*: `generators = G-EDF P-EDF C-EDF`, `OUT_DIR = exps/` |
| 224 | but not for creating task sets for experiments shown in papers. That | ||
| 225 | is because the safety features of run_exps.py described above (uname, | ||
| 226 | config-options) are not used here. If you are creating experiments for | ||
| 227 | a paper, you should create your own generator which outputs values for | ||
| 228 | 'config-options' required for your plugin so that you cannot ruin your | ||
| 229 | experiments at run time. | ||
| 230 | 210 | ||
| 231 | The -l option lists the supported generators which can be specified: | 211 | This 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 | ||
| 213 | This 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 | |||
| 215 | The `-l` option lists the supported generators which can be specified: | ||
| 216 | |||
| 217 | ```bash | ||
| 233 | $ gen_exps.py -l | 218 | $ gen_exps.py -l |
| 234 | G-EDF, P-EDF, C-EDF | 219 | G-EDF, P-EDF, C-EDF |
| 220 | ``` | ||
| 235 | 221 | ||
| 236 | The -d option will describe the properties of a generator or | 222 | The `-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. |
| 237 | generators and their default values. Note that some of these defaults | ||
| 238 | will 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 | ||
| 240 | example 24. | ||
| 241 | 223 | ||
| 224 | ```bash | ||
| 242 | $ gen_exps.py -d G-EDF,P-EDF | 225 | $ gen_exps.py -d G-EDF,P-EDF |
| 243 | Generator GSN-EDF: | 226 | Generator 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 | ||
| 258 | You create experiments by specifying a generator. The following will | 242 | You 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). |
| 259 | create experiments 4 schedules with 24, 48, 72, and 96 tasks, because | ||
| 260 | the 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/ |
| 264 | sched=GSN-EDF_num-tasks=24/ sched=GSN-EDF_num-tasks=48/ | 247 | sched=GSN-EDF_num-tasks=24/ sched=GSN-EDF_num-tasks=48/ |
| 265 | sched=GSN-EDF_num-tasks=72/ sched=GSN-EDF_num-tasks=96/ | 248 | sched=GSN-EDF_num-tasks=72/ sched=GSN-EDF_num-tasks=96/ |
| 249 | ``` | ||
| 266 | 250 | ||
| 267 | You can modify the default using a single value (the -f option deletes | 251 | You can modify the default using a single value (the `-f` option deletes previous experiments in the output directory, defaulting to `exps/`, changeable with `-o`): |
| 268 | previous experiments in the output directory, defaulting to 'exps/', | ||
| 269 | changeable 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/ |
| 273 | sched=GSN-EDF_num-tasks=24/ | 256 | sched=GSN-EDF_num-tasks=24/ |
| 257 | ``` | ||
| 274 | 258 | ||
| 275 | Or with an array of values, specified as a comma-seperated list: | 259 | Or 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 |
| 278 | sched=PSN-EDF_num-tasks=24/ sched=PSN-EDF_num-tasks=26/ | 263 | sched=PSN-EDF_num-tasks=24/ sched=PSN-EDF_num-tasks=26/ |
| 279 | sched=PSN-EDF_num-tasks=28/ sched=PSN-EDF_num-tasks=30/ | 264 | sched=PSN-EDF_num-tasks=28/ sched=PSN-EDF_num-tasks=30/ |
| 265 | ``` | ||
| 280 | 266 | ||
| 281 | The generator will create a different directory for each possible | 267 | The 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: |
| 282 | configuration of the parameters. Each parameter which is varied is | ||
| 283 | included in the name of the schedule directory. For example, to vary | ||
| 284 | the number of CPUs but not the number of tasks: | ||
