Started Memory operations on simulator
+- simulator.c
This commit is contained in:
parent
ee95d19bfe
commit
d5705e42a4
4 changed files with 97 additions and 1 deletions
|
|
@ -17,6 +17,13 @@ typedef enum{
|
|||
PROCESS_STATE_TERMINATED
|
||||
} PROCESS_STATES;
|
||||
|
||||
typedef enum{
|
||||
MEMORY_INITIALIZE = 0,
|
||||
MEMORY_ACCESS,
|
||||
MEMORY_ALLOCATE,
|
||||
MEMORY_DEALLOCATE
|
||||
} MEMORY_SIGNALS;
|
||||
|
||||
typedef struct ProcessControlBlockStruct
|
||||
{
|
||||
int uniquePid;
|
||||
|
|
@ -37,6 +44,10 @@ typedef struct ProcessControlBlockStruct
|
|||
// see how many are left.
|
||||
// also need a time left state here?
|
||||
double timeLeft;
|
||||
// allocated memory array (stores the offsets)
|
||||
int *allocatedMemOffsets;
|
||||
// allocated memory array sizes (stores the sizes for each offset)
|
||||
int *allocatedMemSizes;
|
||||
// connect to the next process control block here
|
||||
struct ProcessControlBlockStruct *nextPtr;
|
||||
} ProcessControlBlock;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue