-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessTable.h
More file actions
38 lines (35 loc) · 937 Bytes
/
ProcessTable.h
File metadata and controls
38 lines (35 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <string>
#include <limits.h>
#include "InputList.h"
struct List
{
InputList* currentProcess;
int startTime;
int endTime;
int processID;
string status;
List* next;
List* prev;
List() : currentProcess(NULL), startTime(0), endTime(0), processID(0), status(""), next(NULL) {}
};
using namespace std;
class ProcessTable
{
private:
List* top;
List* ptr;
bool empty;
int count;
public:
ProcessTable();
~ProcessTable();
ProcessTable* push(ProcessTable* table,int start, int end, int ID, InputList* current, string status);
ProcessTable* pop(ProcessTable* table);
ProcessTable* update(ProcessTable* table, int end,int ID, InputList* current, string status);
List* getList(ProcessTable* table);
List* searchList(ProcessTable* table, int ID);
bool exist(ProcessTable* table,List* list);
int minEndTime(ProcessTable* table);
bool complete(ProcessTable* table);
};