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
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
//
|
||||
printf("--------------------------------------------------\n");
|
||||
printf("After memory clear\n");
|
||||
printf("No memory configured");
|
||||
printf("No memory configured\n");
|
||||
printf("--------------------------------------------------\n");
|
||||
}
|
||||
break;
|
||||
|
|
@ -590,8 +601,7 @@ void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
|
|||
// Operating System start timer goes here, log it.
|
||||
sprintf(simulatorOutput, "%f, OS: Simulator start\n", accessTimer(LAP_TIMER, timeStringy));
|
||||
logOutput(configPtr, simulatorOutput, false);
|
||||
|
||||
// int variable for process to run
|
||||
// int variable for process to run
|
||||
int currentPid;
|
||||
// create the process list with createProcessList, store the pointed to address
|
||||
pcbList = createProcessList();
|
||||
|
|
@ -652,6 +662,8 @@ void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
|
|||
pcbPtr = pcbList->headPtr;
|
||||
}
|
||||
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));
|
||||
logOutput(configPtr, simulatorOutput, false);
|
||||
sprintf(simulatorOutput, "%f, OS: Simulation End\n", accessTimer(LAP_TIMER, timeStringy));
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ typedef enum{
|
|||
MEMORY_INITIALIZE = 0,
|
||||
MEMORY_ACCESS,
|
||||
MEMORY_ALLOCATE,
|
||||
MEMORY_CLEAR,
|
||||
MEMORY_DEALLOCATE
|
||||
} MEMORY_SIGNALS;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue