This commit is contained in:
Zach S-B 2021-10-20 15:22:27 +11:00
parent 2eaffd2843
commit 939449415e
19 changed files with 137 additions and 0 deletions

0
A3.java Normal file
View File

Binary file not shown.

BIN
Assign3.pdf Normal file

Binary file not shown.

BIN
Assign3Feedback.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
begin
1
2
3
4
5
end

View File

@ -0,0 +1,7 @@
begin
5
4
3
2
1
end

View File

@ -0,0 +1,9 @@
begin
1
1
1
1
1
1
1
end

View File

@ -0,0 +1,10 @@
begin
1
2
3
2
1
4
4
4
end

View 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

View 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}

View File

@ -0,0 +1,9 @@
begin
1
3
2
1
5
4
3
end

View File

@ -0,0 +1,17 @@
begin
5
6
1
9
8
1
1
1
3
4
2
6
3
9
9
end

View File

@ -0,0 +1,11 @@
begin
7
8
9
8
7
8
9
8
7
end

View File

@ -0,0 +1,19 @@
begin
5
6
3
4
9
9
8
1
2
1
4
4
4
4
5
9
2
end

View 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.

View 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}