mirror of
https://github.com/zach-sb/COMP2240-Assignment3.git
synced 2025-11-09 02:27:37 +11:00
Start
This commit is contained in:
parent
2eaffd2843
commit
939449415e
BIN
AssessmentItemCoverSheet.pdf
Normal file
BIN
AssessmentItemCoverSheet.pdf
Normal file
Binary file not shown.
BIN
Assign3.pdf
Normal file
BIN
Assign3.pdf
Normal file
Binary file not shown.
BIN
Assign3Feedback.pdf
Normal file
BIN
Assign3Feedback.pdf
Normal file
Binary file not shown.
7
SampleInputOutput/S1/Process1.txt
Normal file
7
SampleInputOutput/S1/Process1.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
begin
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
end
|
||||||
7
SampleInputOutput/S1/Process2.txt
Normal file
7
SampleInputOutput/S1/Process2.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
begin
|
||||||
|
5
|
||||||
|
4
|
||||||
|
3
|
||||||
|
2
|
||||||
|
1
|
||||||
|
end
|
||||||
9
SampleInputOutput/S1/Process3.txt
Normal file
9
SampleInputOutput/S1/Process3.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
begin
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
end
|
||||||
10
SampleInputOutput/S1/Process4.txt
Normal file
10
SampleInputOutput/S1/Process4.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
begin
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
2
|
||||||
|
1
|
||||||
|
4
|
||||||
|
4
|
||||||
|
4
|
||||||
|
end
|
||||||
9
SampleInputOutput/S1/README.txt
Normal file
9
SampleInputOutput/S1/README.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
The simulation was run with the following command:
|
||||||
|
|
||||||
|
java A3 30 3 process1.txt process2.txt process3.txt
|
||||||
|
|
||||||
|
The simulation made the following assumptions:
|
||||||
|
|
||||||
|
-Issuing a page fault and subsequently blocking a process takes no time (this explains why all four processes are able to issue a page fault "simultaneously" at t=0)
|
||||||
|
-Execution of a swapped page can occur immediately after the page arrives in main memory (e.g. page 1 of process1 arrived in main memory at t=6 and executed at t=6, then a page fault was issued for page 2 at t=7.
|
||||||
|
-Working is shown for the Fixed Allocation with Local Replacement policy
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
14
SampleInputOutput/S1/output.txt
Normal file
14
SampleInputOutput/S1/output.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FIFO - Fixed-Local Replacement:
|
||||||
|
PID Process Name Turnaround Time # Faults Fault Times
|
||||||
|
1 Process1.txt 38 5 {0, 7, 16, 23, 30}
|
||||||
|
2 Process2.txt 39 5 {0, 8, 17, 24, 31}
|
||||||
|
3 Process3.txt 18 1 {0}
|
||||||
|
4 Process4.txt 37 4 {0, 12, 19, 28}
|
||||||
|
|
||||||
|
|
||||||
|
FIFO - Variable-Global Replacement:
|
||||||
|
PID Process Name Turnaround Time # Faults Fault Times
|
||||||
|
1 Process1.txt 38 5 {0, 7, 16, 23, 30}
|
||||||
|
2 Process2.txt 39 5 {0, 8, 17, 24, 31}
|
||||||
|
3 Process3.txt 18 1 {0}
|
||||||
|
4 Process4.txt 37 4 {0, 12, 19, 28}
|
||||||
9
SampleInputOutput/S2/Process1.txt
Normal file
9
SampleInputOutput/S2/Process1.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
begin
|
||||||
|
1
|
||||||
|
3
|
||||||
|
2
|
||||||
|
1
|
||||||
|
5
|
||||||
|
4
|
||||||
|
3
|
||||||
|
end
|
||||||
17
SampleInputOutput/S2/Process2.txt
Normal file
17
SampleInputOutput/S2/Process2.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
begin
|
||||||
|
5
|
||||||
|
6
|
||||||
|
1
|
||||||
|
9
|
||||||
|
8
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
3
|
||||||
|
4
|
||||||
|
2
|
||||||
|
6
|
||||||
|
3
|
||||||
|
9
|
||||||
|
9
|
||||||
|
end
|
||||||
11
SampleInputOutput/S2/Process3.txt
Normal file
11
SampleInputOutput/S2/Process3.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
begin
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
8
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
8
|
||||||
|
7
|
||||||
|
end
|
||||||
19
SampleInputOutput/S2/Process4.txt
Normal file
19
SampleInputOutput/S2/Process4.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
begin
|
||||||
|
5
|
||||||
|
6
|
||||||
|
3
|
||||||
|
4
|
||||||
|
9
|
||||||
|
9
|
||||||
|
8
|
||||||
|
1
|
||||||
|
2
|
||||||
|
1
|
||||||
|
4
|
||||||
|
4
|
||||||
|
4
|
||||||
|
4
|
||||||
|
5
|
||||||
|
9
|
||||||
|
2
|
||||||
|
end
|
||||||
11
SampleInputOutput/S2/README.txt
Normal file
11
SampleInputOutput/S2/README.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
The simulation was run with the following command and arguments
|
||||||
|
|
||||||
|
A3 30 3 Process1.txt Process2.txt Process3.txt Process4.txt
|
||||||
|
|
||||||
|
where 30 is the number of frames and 3 is the quantum size for Round Robin algorithm and the other arguments are text file names containing page references for each process.
|
||||||
|
|
||||||
|
The simulation made the following assumptions:
|
||||||
|
|
||||||
|
-Issuing a page fault and subsequently blocking a process takes no time (this explains why all four processes are able to issue a page fault "simultaneously" at t=0)
|
||||||
|
-Execution of a swapped page can occur immediately after the page arrives in main memory (e.g. page 1 of process1 arrived in main memory at t=6 and executed at t=6, then a page fault was issued for the next page at t=7.
|
||||||
|
|
||||||
14
SampleInputOutput/S2/output.txt
Normal file
14
SampleInputOutput/S2/output.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FIFO - Fixed-Local Replacement:
|
||||||
|
PID Process Name Turnaround Time # Faults Fault Times
|
||||||
|
1 Process1.txt 39 5 {0, 7, 14, 22, 31}
|
||||||
|
2 Process2.txt 75 8 {0, 8, 15, 23, 32, 45, 52, 59}
|
||||||
|
3 Process3.txt 33 3 {0, 9, 16}
|
||||||
|
4 Process4.txt 84 9 {0, 10, 17, 27, 34, 44, 51, 58, 75}
|
||||||
|
|
||||||
|
|
||||||
|
FIFO - Variable-Global Replacement:
|
||||||
|
PID Process Name Turnaround Time # Faults Fault Times
|
||||||
|
1 Process1.txt 39 5 {0, 7, 14, 22, 31}
|
||||||
|
2 Process2.txt 75 8 {0, 8, 15, 23, 32, 45, 52, 59}
|
||||||
|
3 Process3.txt 33 3 {0, 9, 16}
|
||||||
|
4 Process4.txt 78 8 {0, 10, 17, 27, 34, 44, 51, 58}
|
||||||
Loading…
x
Reference in New Issue
Block a user