zoukankan      html  css  js  c++  java
  • OSTEP第七章代码

    1. Compute the response time and turnaround time when running three jobs of length 200 with the SJF and FIFO schedulers.

     没区别,

              响应时间 周转时间 等待时间
       1     0    200     0
       2    200    400    200
       3    400    600    400
     平均    200    400    200
    2. Now do the same but with jobs of different lengths: 100, 200, and 300.

     FIFO和SJF都很好算出来,所以不用了

    3. Now do the same, but also with the RR scheduler and a time-slice of 1.

     加个-c 输出细节 命令和上面差不多: ./scheduler.py -p RR -l 200,200,200 -c
    可以很详细的得到response time 和turnaround time

    4. For what types of workloads does SJF deliver the same turnaround times as FIFO?

    只要-l 后的序列长度满足l1<l2<l3<..<ln,这样通过最前任务执行最短时间,总是有相同的周转时间

    5. For what types of workloads and quantum lengths does SJF deliver the same response times as RR?

    每个任务的时间长度和时间片相等时候

    6. What happens to response time with SJF as job lengths increase? Can you use the simulator to demonstrate the trend?

    会增加,模仿的话。。。可以用matlibplot但是不想

    7. What happens to response time with RR as quantum lengths increase? Can youwrite an equation that gives theworst-case response time, given N jobs?

     可以看出是随着时间片长大的

    Time(N)=N1q

    average Time=N1q/2,N=N(max)

  • 相关阅读:
    开源.NET FTP组件edtFTPnet 用法
    C#开发的较好的FTP类
    C# 配置文件读取与修改
    对于List的All,Any,Where,FirstOrDefault,Average,Sum,Distinct,Union,AddRange,RemoveRange,InsertRange,GetRange操作
    一次性打印多个C1FlexGrid
    Word自动生成目录页码靠右对齐
    Windows Workflow学习文档
    Windows Workflow开发演练
    Boo who
    Missing letters
  • 原文地址:https://www.cnblogs.com/otakus/p/13185379.html
Copyright © 2011-2022 走看看