Upload Sim02 files for Syncronization.

+- simulator.c/h
This commit is contained in:
Charles Descamps 2024-02-19 18:43:06 -07:00
parent 62418ec35a
commit c828913809
2 changed files with 62 additions and 7 deletions

View file

@ -78,9 +78,15 @@ Dependencies: ???
// Sim02 only requires FCFS working atm.
// need a function called createProcessList
// this makes a linked list of PCBs, loads the first instruction after app start
// this initializes the process control block ll.
// need a function called fillProcessList
// this fills the linked list of PCBs,
// loads the first instruction after app start
// and ...
// reads through the opcode struct to fill out the linked list of PCBs
// need a function called destroyProcessList
// deallocated the ll of PCBs recursively, frees the rest of the struct.
@ -90,15 +96,15 @@ Dependencies: ???
/*
Name: createProcessList
Process: reads through the opcode struct to fill out the linked list of PCBs
Function Input/Parameters: metadata (OpCodeType *)
Process: initializes head pointer to the PCBs
Function Input/Parameters: none
Function Output/Parameters: none
Function Output/Returned: head pointer to the PCBs
Device Input/Device: none
Device Output/Device: none
Dependencies: malloc, sizeof, ???
*/
ProcessControlBlockLL *createProcessList(OpCodeType *metadataPtr);
ProcessControlBlockLL *createProcessList();
/*
Name: destroyProcessList
@ -124,11 +130,23 @@ Dependencies: free, destroyProcessListHelper(recursively), ???
*/
ProcessControlBlock *destroyProcessListHelper(ProcessControlBlock *nodePtr);
/*
Name: fillProcessList
Process: iterates through the metadata LL, fills out each process as needed.
Function Input/Parameters: metadata (OpCodeType *)
Function Output/Parameters: none
Function Output/Returned: none
Device Input/Device: none
Device Output/Device: none
Dependencies: ???
*/
ProcessControlBlock *fillProcessList(OpCodeType *metadataPtr);
/*
Name: runSim
Process: primary simulation driver
Function Input/Parameters: configuration data (ConfigDataType *),
metadata (OpCodeType *)
metadata (OpCodeType *)
Function Output/Parameters: none
Function Output/Returned: none
Device Input/Device: none