showJobList(jobs); open,\、cl\ fprintf(fp,\、\ printf(\、\ scanf(\ fprintf(fp,\ getJobInfo(jobs,id,&size,&status); switch(status) { case 0: printf(\ fprintf(fp,\!The job's status is correct !\ case 1: printf(\ fprintf(fp,\job was in the memory !\ case 2: printf(\ fprintf(fp,\label; default:printf(\job status 、Please check you job file、\ fprintf(fp,\job status 、Please check you job file、\ fclose(fp);errorMessage(); } switch(fitMethod) { case '1': order(&empty,0,0);break; case '2': order(&empty,0,1);break; case '3': order(&empty,1,0);break; case '4': order(&empty,1,1);break; } startAddress = allocate(&empty,size); if(startAddress != -1) { insertUsedNode(&used,id,startAddress); updateJobStatus(&jobs,id,1);
updateJob); } } label : ;
break; case '3': if(memoryStartAddress < 0 || memorySize < 1) { printf(\ break; } do{ int i; open,\、cl\ fprintf(fp,\、 、、、\ fclose(fp);
if(showUsedList(jobs,used) == 0) break; open,\、cl\ fprintf(fp,\、\\nInput -1 to end the finish job task 、\ printf(\、\\nInput -1 to end the finish job task 、\ scanf(\ fprintf(fp,\ fclose(fp); if(id == -1) break; getJobInfo(jobs,id,&size,&status); if(status == 1) { i = finishJob(&used,id,&startAddress); if(i) { insertFreeNode(&empty,startAddress,size); updateJobStatus(&jobs,id,2); updateJob); } } else { if(status == 0 || status == 2) { if(status == 0)
printf(\ else printf(\ } else { printf(\、\\ Please check you job file、\ errorMessage(); }
}
}while(1); break; case '4': open,\、cl\ fprintf(fp,\、 、、、\ fclose(fp); showFreeList(empty); break; case '5': open,\、cl\ fprintf(fp,\、 fclose(fp); showUsedList(jobs,used); break; case '6': open,\、cl\ fprintf(fp,\、 、、、\ fclose(fp); moveFragment(jobs,&empty,&used); break; case '7': open,\、cl\ fprintf(fp,\ :(\ fclose(fp); exit(0);
default: printf(\
} }
getch();
、、\ 、}