欢迎来到天天文库
浏览记录
ID:40489229
大小:15.48 KB
页数:8页
时间:2019-08-03
《import java》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、importjava.io.BufferedReader;importjava.io.InputStream;importjava.io.InputStreamReader;importjava.nio.ByteBuffer;importjava.util.concurrent.CountDownLatch;publicclassFCFSANDSJF{ private staticinti; private intj; privateintqiao[]; privateintqiao1[]; privateintprocess_number; privateintarri
2、val_time[]; privateintservices_time[]; privateintcompletion_time[]; privateintturn_around_time[]; privateintaverage_turn_around_time[]; privatedoubleadd1; privatedoubleadd2; privatedoubleadd3; privatedoubleadd4; privatedoubleaverage_add[]; privatedoubleaverage_add1[]; privatedoubleright
3、_turn_around_time[]; privateinta[]; privateintb[]; privateintc[]; privateintd[]; privateintexchange; privatevoid FCFSANDSJF(){ this.process_number=process_number; this.services_time=services_time; this.arrival_time=arrival_time; } private voidSet_process_number(intprocess_nuber) { thi
4、s.process_number=process_nuber; } privateintget_process_number(){ returnprocess_number; } privatevoidSet_arrival_time(intarrival_time[]){ for(i=0;i5、rival_time[i]; } returnqiao; } privatevoidSet_services_time(intservices_time[]){ for(i=0;i6、System.out.println("===FCFS先来先服务算法==="); System.out.println("完成时间是:"); for(i=0;i7、print(completion_time[i]+"t"); } System.out.println("周转时间是:"); for(i=0;i
5、rival_time[i]; } returnqiao; } privatevoidSet_services_time(intservices_time[]){ for(i=0;i6、System.out.println("===FCFS先来先服务算法==="); System.out.println("完成时间是:"); for(i=0;i7、print(completion_time[i]+"t"); } System.out.println("周转时间是:"); for(i=0;i
6、System.out.println("===FCFS先来先服务算法==="); System.out.println("完成时间是:"); for(i=0;i7、print(completion_time[i]+"t"); } System.out.println("周转时间是:"); for(i=0;i
7、print(completion_time[i]+"t"); } System.out.println("周转时间是:"); for(i=0;i
此文档下载收益归作者所有