diff --git a/Sim03/logfile_1.lgf b/Sim03/logfile_1.lgf index 52b0e91..e69de29 100644 --- a/Sim03/logfile_1.lgf +++ b/Sim03/logfile_1.lgf @@ -1,7 +0,0 @@ -0.000000, OS: Simulator start - READY state from NEW state -ate - -ate - - diff --git a/Sim03/sim03 b/Sim03/sim03 index 047dfc9..8d57268 100755 Binary files a/Sim03/sim03 and b/Sim03/sim03 differ diff --git a/Sim03/simulator.c b/Sim03/simulator.c index 5aeda88..db2ba8f 100644 --- a/Sim03/simulator.c +++ b/Sim03/simulator.c @@ -865,6 +865,9 @@ int scheduleProcess(ProcessControlBlockLL *headPointer, ConfigDataType *configPt char timeStringy[MAX_STR_LEN]; int processCount = 0; + int shortestJob = 0; + int shortestJobProcNum = 0; + while (wkgPtr != NULL) { if(wkgPtr->process_state != PROCESS_STATE_TERMINATED) @@ -928,8 +931,7 @@ int scheduleProcess(ProcessControlBlockLL *headPointer, ConfigDataType *configPt // need to find shortest job, maybe using a find min function? // reuse the previous code to set each process to READY from NEW // will select the process that is in the READY state, with the shortest time. - int shortestJob = 0; - int shortestJobProcNum = 0; + while (wkgPtr != NULL) { //