scheduler emulator linsched
How to use linsched (Linux scheduler emulator)? Need an example of how to run and check the output. Been looking for tutorials and also browsed the README file. Don’t understand how to run and check the output. TRY TO RUN A basic_tests SCRIPT SUCH AS ./basic_tests trivial_bal UNIPROCESSOR, BUT IT SHOWS NOTHING,.. Thanks in advance:
Solution
You can’t be the only one experiencing this issue! Running a small example is not an easy task.
For each test you want to output (everyone wants to output, except for the person who obviously wrote the test), add linsched_print_task_stats();
Recompile after the test is complete.
If you want to add your own tests, e.g. http://www.ibm.com/developerworks/linux/library/l-linux-scheduler-simulator/ in list 4 does this:
- Copy the code from list 4 to the bottom of basic_test.c
- Initialize the variable
count
to zero or some other good value. - Change
topo_db
tolinsched_topo_db
- Change the function name to
test_new_test
- Add
TEST(new_test),
tostruct test tests[]
, but not at the bottom, because the last one is used as a marker when printing. - Add the function at the top of the file as a forward declaration
void test_new_test(int argc, char **argv);
- Compile and run:
/basic_tests list
trivial_bal<br/>
basic_bal1<br/>
basic_bal2<br/>
bal1<br/>
new_test<br/>
- Try your new command.
./basic_tests new_test uniprocessor
Task id = 3 (1), exec_time = 7116000000, run_delay = 52092000000, Task id = 4 (2), exec_time = 7116000000, run_delay = 52093000000, Task id = 5 (3), exec_time = 7116000000, run_delay = 52094000000, Task id = 6 (4), exec_time = 7115000000, run_delay = 52095000000, Task id = 7 (5), exec_time = 7115000000, run_delay = 52091000000, Task id = 8 (6), exec_time = 3430000000, run_delay = 25771000000, Task id = 9 (7), exec_time = 3430000000, run_delay = 25772000000, Task id = 10 (8), exec_time = 3430000000, run_delay = 25773000000, Task id = 11 (9), exec_time = 3430000000, run_delay = 25774000000, Task id = 12 (10), exec_time = 3430000000, run_delay = 25775000000, Task id = 13 (11), exec_time = 7272000000, run_delay = 52725000000, Total exec_time = 60000000000
The link I mentioned above has a good explanation of how to interpret numbers.
Good luck with your schedule!