Started outlining the CS480 Simulator 2 project, analyzed a testfile, and added SimTimer stuff

++ simtimer.c/h
++ testfile-dnw.mdf
+- simulator.c/h
-- Sim01 Grading
This commit is contained in:
Charles Descamps 2024-02-14 13:20:04 -07:00
parent 460705a9e1
commit 93904cb2f3
6 changed files with 415 additions and 3 deletions

View file

@ -15,6 +15,29 @@ Dependencies: ???
*/
void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
{
// initialize function/variables
// need a FILE * for file operations
// need two working pointers, one for master loop, one for internal loop
// currentTime variable that stores the time.
// create the process list with createProcessList
// function holds master loop, loops until sys end opcode found OR PCB List != NULL
// will have a loop that goes from app start to app end for a PCB
// (checks to see if the next instruction is NOT app end), using getNextProcess?
// this will getNextOpCode
// this will checkForIO and run the IO operations, outputting to FILE * and/or monitor
// checkForIO will need the FILE * passed, will need timer access, and ???
// this will checkForCPU and run the CPU operations, outputting to FILE * and/or monitor
// checkForCPU will need the FILE * passed, will need timer access, and ???
//
// deallocate the process list with destroyProcessList
printf("runSim called here");
// void function, no return.
}
}
// getNextProcess/scheduler/dispatcher run here, loads/"runs" the process
// getNextOpCode, not needed for Sim02 apparently, keep in mind.
// checkForIO, I think this gets passed the current process and runs the IO ops
// checkForCPU, I think this gets passed the current process and runs the CPU ops
// checkForMemory, I think this gets passed the current process
// and runs mem ops (not needed for Sim02)
// cpuIdler (not needed for Sim02)