while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}这个算法要怎么修改使之能用到n个进程?
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 02:16:29
while(1){while(((in+1)%BUFFER-SIZE)==out)buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}这个算法要怎么修改使之能
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){} }