Fixed the minor bug with SJF Scheduling. Will start work on memory operations.
This commit is contained in:
parent
eb87c7f9b9
commit
3a21ea0275
2 changed files with 6 additions and 3 deletions
BIN
Sim03/sim03
BIN
Sim03/sim03
Binary file not shown.
|
|
@ -672,9 +672,12 @@ int scheduleProcess(ProcessControlBlockLL *headPointer, ConfigDataType *configPt
|
||||||
wkgPtr = wkgPtr->nextPtr;
|
wkgPtr = wkgPtr->nextPtr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(processCount != 0)
|
||||||
|
{
|
||||||
// printf("Process %d Selected with %.0f ms remaining\n", wkgPtr->uniquePid, wkgPtr->timeLeft);
|
// printf("Process %d Selected with %.0f ms remaining\n", wkgPtr->uniquePid, wkgPtr->timeLeft);
|
||||||
sprintf(loggingStr, "%f, OS: Process %d selected with %.0f ms remaining\n", accessTimer(LAP_TIMER, timeStringy), shortestJobProcNum, (double)shortestJob);
|
sprintf(loggingStr, "%f, OS: Process %d selected with %.0f ms remaining\n", accessTimer(LAP_TIMER, timeStringy), shortestJobProcNum, (double)shortestJob);
|
||||||
logOutput(configPtr, loggingStr, false);
|
logOutput(configPtr, loggingStr, false);
|
||||||
|
}
|
||||||
returnPid = shortestJobProcNum;
|
returnPid = shortestJobProcNum;
|
||||||
break;
|
break;
|
||||||
case CPU_SCHED_SRTF_P_CODE:
|
case CPU_SCHED_SRTF_P_CODE:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue