Savepoint available
This commit is contained in:
parent
67df0ceeaf
commit
6446272063
4 changed files with 17 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
0.000001, OS: Simulator start
|
0.000000, OS: Simulator start
|
||||||
READY state from NEW state
|
READY state from NEW state
|
||||||
ate
|
ate
|
||||||
|
|
||||||
|
|
|
||||||
BIN
Sim03/sim03
BIN
Sim03/sim03
Binary file not shown.
|
|
@ -440,12 +440,23 @@ void memManager(ProcessControlBlockLL *pcbList, MEMORY_SIGNALS memCode, int offs
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MEMORY_DEALLOCATE:
|
case MEMORY_DEALLOCATE:
|
||||||
|
if (memDisplay)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
printf("--------------------------------------------------\n");
|
||||||
|
printf("After memory deallocate\n");
|
||||||
|
printf("Deallocated memory chunk.\n");
|
||||||
|
printf("--------------------------------------------------\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MEMORY_CLEAR:
|
||||||
if (memDisplay)
|
if (memDisplay)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
printf("--------------------------------------------------\n");
|
printf("--------------------------------------------------\n");
|
||||||
printf("After memory clear\n");
|
printf("After memory clear\n");
|
||||||
printf("No memory configured");
|
printf("No memory configured\n");
|
||||||
printf("--------------------------------------------------\n");
|
printf("--------------------------------------------------\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -590,7 +601,6 @@ void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
|
||||||
// Operating System start timer goes here, log it.
|
// Operating System start timer goes here, log it.
|
||||||
sprintf(simulatorOutput, "%f, OS: Simulator start\n", accessTimer(LAP_TIMER, timeStringy));
|
sprintf(simulatorOutput, "%f, OS: Simulator start\n", accessTimer(LAP_TIMER, timeStringy));
|
||||||
logOutput(configPtr, simulatorOutput, false);
|
logOutput(configPtr, simulatorOutput, false);
|
||||||
|
|
||||||
// int variable for process to run
|
// int variable for process to run
|
||||||
int currentPid;
|
int currentPid;
|
||||||
// create the process list with createProcessList, store the pointed to address
|
// create the process list with createProcessList, store the pointed to address
|
||||||
|
|
@ -652,6 +662,8 @@ void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
|
||||||
pcbPtr = pcbList->headPtr;
|
pcbPtr = pcbList->headPtr;
|
||||||
}
|
}
|
||||||
pthread_join(cpuThread, NULL);
|
pthread_join(cpuThread, NULL);
|
||||||
|
// deallocate all the memory for each process.
|
||||||
|
memManager(pcbList, MEMORY_CLEAR, memoryOffset, memorySize, configPtr);
|
||||||
sprintf(simulatorOutput, "%f, OS: System Stop\n", accessTimer(LAP_TIMER, timeStringy));
|
sprintf(simulatorOutput, "%f, OS: System Stop\n", accessTimer(LAP_TIMER, timeStringy));
|
||||||
logOutput(configPtr, simulatorOutput, false);
|
logOutput(configPtr, simulatorOutput, false);
|
||||||
sprintf(simulatorOutput, "%f, OS: Simulation End\n", accessTimer(LAP_TIMER, timeStringy));
|
sprintf(simulatorOutput, "%f, OS: Simulation End\n", accessTimer(LAP_TIMER, timeStringy));
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ typedef enum{
|
||||||
MEMORY_INITIALIZE = 0,
|
MEMORY_INITIALIZE = 0,
|
||||||
MEMORY_ACCESS,
|
MEMORY_ACCESS,
|
||||||
MEMORY_ALLOCATE,
|
MEMORY_ALLOCATE,
|
||||||
|
MEMORY_CLEAR,
|
||||||
MEMORY_DEALLOCATE
|
MEMORY_DEALLOCATE
|
||||||
} MEMORY_SIGNALS;
|
} MEMORY_SIGNALS;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue