Trying out how to fix the sjf errors.
This commit is contained in:
parent
022ca3ac06
commit
e3441e9fbd
3 changed files with 4 additions and 9 deletions
|
|
@ -1,7 +0,0 @@
|
|||
0.000000, OS: Simulator start
|
||||
READY state from NEW state
|
||||
ate
|
||||
|
||||
ate
|
||||
|
||||
|
||||
BIN
Sim03/sim03
BIN
Sim03/sim03
Binary file not shown.
|
|
@ -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)
|
||||
{
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue