Free考研资料 - 免费考研论坛

 找回密码
 注册
打印 上一主题 下一主题

提问 关于And型信号量  的问题

[复制链接]
跳转到指定楼层
楼主
soogood 发表于 11-5-23 08:50:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
定义如下:

Swait(S1,S2, ... ,Sn)

        if Si>=1 and ... and Sn>=1 then

             for i:=1 to n do

             Si:=Si-1;

             endfor

        else

      
place the process in the waiting queue associated with the first Si found with Si<1,and set the
        program count of this process to the beginning of Swait operation
        endif

Ssignal(S1,S2, ... ,Sn)

         for i:=1 to n do

         Si:=Si+1;

Remove all the process waiting in the queue associated with Si into the ready queue.
endfor;
这里的红字部分是什么意思?????????????
您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系我们|Free考研资料 ( 苏ICP备05011575号 )

GMT+8, 24-9-30 09:22 , Processed in 0.091257 second(s), 12 queries , Gzip On, Xcache On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表