while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}这个算法要怎么修改使之能用到n个进程?
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/05 21:38:55
x)+I0T4442
5UB\t=\5lmKK4JR3bmR+J
SJSS3l1uY?ɎUMyexݳ);dgϧxڱ!Wt$U`s~`
{g+ ݓ~Oe)ө!dU@1k}|̼t-}3 K,KILIլV().O,дVMN,I+I-**-(IMqHN-(S U/.H̳ .:
while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}这个算法要怎么修改使之能用到n个进程?
while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}
这个算法要怎么修改使之能用到n个进程?
while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}这个算法要怎么修改使之能用到n个进程?
{ whicle(((in 1)%BOFFER_SIZE==out);/*do nothing*/ buffer[in{ while(available){ try{wait(); }catch(InterruptedException e){} }