lab6(stride scheduling)

Stride调度分析

论文链接:Stride Scheduling

在实验中使用的Stride算法是结合时间片的一种优先级调度策略。每一个时间片结束时,选择就绪状态的进程中Pass值最小的进程分配一个时间片,在一个时间段中进程所获得的时间片数量和进程的优先级大致成正比。

 

 Resource rights are represented by tickets – abstract, first-class objects that can be issued in different amounts and passed between clients.

Throughput rates for active clients are directly proportional to their ticket allocations. Thus, a client with twice as many tickets as another will receive twice as much of a resource in a given time interval. Client response times are inversely proportional to ticket allocations. Therefore a client with twice as many tickets as another will wait only half as long before acquiring a resource. 

 

resource right:进程获得时间片的权利。

ticket:在一个系统中,所有进程的ticket总和是固定的。根据进程的优先级将一定总量的ticket分配给各进程,可以将ticket数量看作进程优先级的一个体现,优先级越高,ticket值越大。ticket值越大,resource right越大,一定时间内获得的时间片越多。

 

The stride field is inversely proportional to tickets, and represents the interval between selections, measured in passes. The pass field represents the virtual time index for the client’s next selection. 

 stride:可翻译为步幅,和进程的ticket值成反比,每当一个进程获得一个时间片,pass值会增大一个stride,因此stride是pass值增长的单位。    stride=\frac{stride_{1}}{ticket}, stride_{1}为大整数。

pass:进程通过的虚拟距离,以stride为单位增长。是选择进程分配时间片的指标,每次选择pass值最小的进程分配。

 

 上图时表示随着时间的推移各进程的pass值的变化,每一个时间单位相当于一个时间片结束,选择一个进程分配时间片,□、○、△分别代表三个进程。

stride_{1}=6

ticket 比例:□ : ○ : △ = 1 : 2 : 3

stride 比例:□ : ○ : △ = 6 : 3 : 2

可以看到,在每个时间点,三个进程的pass值都非常接近,因此个进程获得调度的次数和ticket成正比。因此可以通过优先级给进程指定ticket值,从而较为精确地控制进程获得时间片地数量。

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值