-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrame.java
More file actions
50 lines (43 loc) · 1.36 KB
/
Frame.java
File metadata and controls
50 lines (43 loc) · 1.36 KB
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
/***************************
* A frame data structure
* @author Gloire Rubambiza
* @since 11/12/2017
**************************/
public class Frame {
/** The PID of the process associated with the frame. */
private int processPID;
/** The page number associated with the frame. */
private int page;
/**********************************************
* Instantiates a frame with given information.
* To be used as part of frame table.
*********************************************/
public Frame () {
this.processPID = -1;
this.page = -1;
}
/*******************************************
* Get the process associated with the frame.
********************************************/
public int getPID () {
return this.processPID;
}
/*****************************************
* Get the page associated with the frame.
*****************************************/
public int getPage () {
return this.page;
}
/*******************************************
* Update the page associated with the frame.
********************************************/
public void updatePage ( int page ) {
this.page = page;
}
/***********************************************
* Update the process associated with the frame.
***********************************************/
public void updateProcess ( int pid ) {
this.processPID = pid;
}
}