p=j;
flag=abs(queue[j]
}
}
}
if(p!=
cout< //磁頭初始向外 for(i=0;i queue[i].visited=0; } total=0; cout<<"磁頭初始向外的訪問磁道號順序流:"; current=start; for(i=0;i flag=1000; p=-1; for(j=0;j if((queue[j].visited==0)&&(queue[j].go<=current)){ if(abs(queue[j].go-current) p=j; flag=abs(queue[j].go-current); } } } if(p!=-1){ cout< }
[1] [2] [3] [4] [5] [6]
From:http://tw.wingwit.com/Article/program/czxt/201311/24024.html