-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPCB.h
71 lines (56 loc) · 1.3 KB
/
PCB.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* PCB.h
*
* This is a class which stores all the necessary information regarding the
* job.
*/
class PCB {
public:
int JobID;
int PC;
int TraceFlag;
int programLength;
unsigned long Registers[17];
int PageTablePoint;
//CLOCKS and TIMES:
int CPUEnterTime;
int TimeTaken;
int TimeOfCompletionOfIO;
int IOTimeStamp;
int ClockAtLoadTime;
int ClockAtTerminationTime;
int ClockAtEnterBlockedQueue;
int PageFaultTime;
// Disk read write offsets
int numberOfDATAAvailable;
int numberOfWriteAvailable;
int numberOfDATAAvailable2;
int numberOfWriteAvailable2;
// Disk read and write addresses
int DiskPageReadAddress;
int DiskPageWriteAddress;
// offset in disk page currently r/w from:
int DiskPageReadAddressOffset;
int DiskPageWriteAddressOffset;
// DISK PAGE CURRENTLY R/W FROM:
int DiskPageRead;
int DiskPageWrite;
//Page indices
unsigned short PagesOnDisk[256];
unsigned short DiskPagesForRead[256];
unsigned short DiskPagesForWrite[256];
//Number of pages:
int NumberOfPagesOnDisk;
int NumberOfPagesForProgram;
int NumberOfPagesForRead;
int NumberOfPagesForWrite;
//Used to implement paging
int LRUCount;
//CPU turn count(n)
int n;
//QueueIndex;
int QueueIndex;
//CPU Shots
int CPUShots;
int timeSpentIn4thSubQueue;
};