【问题标题】:Scheduler simulator linsched调度程序模拟器 linsched
【发布时间】:2012-01-11 18:31:07
【问题描述】:

如何使用 linsched(Linux 调度程序模拟器)?需要一个关于如何运行和检查输出的示例。一直在寻找教程,也浏览了 README 文件。不明白如何运行和检查输出。尝试运行 basic_tests 脚本(如 ./basic_tests trivial_bal UNIPROCESSOR)但是,它没有显示任何内容,..提前谢谢..

【问题讨论】:

    标签: linux simulator scheduler


    【解决方案1】:

    你不可能是唯一一个遇到这个问题的人!运行一个小示例并非易事。

    对于您想要输出的每个测试(每个人都想要输出,显然编写测试的人除外),在测试末尾添加 linsched_print_task_stats(); 并重新编译。

    如果您想添加自己的测试,例如 http://www.ibm.com/developerworks/linux/library/l-linux-scheduler-simulator/ 中的清单 4,请这样做:

    1. 将清单 4 中的代码复制到 basic_test.c 的底部
    2. 将变量count 初始化为零或其他合适的值。
    3. topo_db 更改为linsched_topo_db
    4. 将函数名改为test_new_test
    5. TEST(new_test), 添加到struct test tests[],但不要在底部,因为最后一个在打印时用作标记。
    6. 在文件void test_new_test(int argc, char **argv);的顶部添加函数作为前向声明
    7. 编译运行:/basic_tests list
      trivial_bal
      basic_bal1
      basic_bal2
      bal1
      new_test
    8. 试试你的新命令。 ./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
    

    我上面提到的链接对如何解释数字有很好的解释。 祝你安排好运!

    【讨论】:

      猜你喜欢
      • 2021-11-19
      • 2013-01-17
      • 1970-01-01
      • 1970-01-01
      • 2011-04-22
      • 1970-01-01
      • 2012-05-01
      • 2019-04-01
      • 2012-02-09
      相关资源
      最近更新 更多