diff --git a/A3.java b/A3.java new file mode 100644 index 0000000..e69de29 diff --git a/AssessmentItemCoverSheet.pdf b/AssessmentItemCoverSheet.pdf new file mode 100644 index 0000000..8d86cf5 Binary files /dev/null and b/AssessmentItemCoverSheet.pdf differ diff --git a/Assign3.pdf b/Assign3.pdf new file mode 100644 index 0000000..0f29229 Binary files /dev/null and b/Assign3.pdf differ diff --git a/Assign3Feedback.pdf b/Assign3Feedback.pdf new file mode 100644 index 0000000..3526e45 Binary files /dev/null and b/Assign3Feedback.pdf differ diff --git a/SampleInputOutput/S1/Process1.txt b/SampleInputOutput/S1/Process1.txt new file mode 100644 index 0000000..65a93ee --- /dev/null +++ b/SampleInputOutput/S1/Process1.txt @@ -0,0 +1,7 @@ +begin +1 +2 +3 +4 +5 +end \ No newline at end of file diff --git a/SampleInputOutput/S1/Process2.txt b/SampleInputOutput/S1/Process2.txt new file mode 100644 index 0000000..0960f15 --- /dev/null +++ b/SampleInputOutput/S1/Process2.txt @@ -0,0 +1,7 @@ +begin +5 +4 +3 +2 +1 +end \ No newline at end of file diff --git a/SampleInputOutput/S1/Process3.txt b/SampleInputOutput/S1/Process3.txt new file mode 100644 index 0000000..9451172 --- /dev/null +++ b/SampleInputOutput/S1/Process3.txt @@ -0,0 +1,9 @@ +begin +1 +1 +1 +1 +1 +1 +1 +end \ No newline at end of file diff --git a/SampleInputOutput/S1/Process4.txt b/SampleInputOutput/S1/Process4.txt new file mode 100644 index 0000000..c39f0f4 --- /dev/null +++ b/SampleInputOutput/S1/Process4.txt @@ -0,0 +1,10 @@ +begin +1 +2 +3 +2 +1 +4 +4 +4 +end \ No newline at end of file diff --git a/SampleInputOutput/S1/README.txt b/SampleInputOutput/S1/README.txt new file mode 100644 index 0000000..6d17ba8 --- /dev/null +++ b/SampleInputOutput/S1/README.txt @@ -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 \ No newline at end of file diff --git a/SampleInputOutput/S1/Working - 1 - Processor and Process status only.pdf b/SampleInputOutput/S1/Working - 1 - Processor and Process status only.pdf new file mode 100644 index 0000000..064ed4c Binary files /dev/null and b/SampleInputOutput/S1/Working - 1 - Processor and Process status only.pdf differ diff --git a/SampleInputOutput/S1/Working - 2 - Processor, Process status and Ready queue.pdf b/SampleInputOutput/S1/Working - 2 - Processor, Process status and Ready queue.pdf new file mode 100644 index 0000000..c5ae80a Binary files /dev/null and b/SampleInputOutput/S1/Working - 2 - Processor, Process status and Ready queue.pdf differ diff --git a/SampleInputOutput/S1/Working - 3 - Processor, Process status, Ready queue and Memory frames.pdf b/SampleInputOutput/S1/Working - 3 - Processor, Process status, Ready queue and Memory frames.pdf new file mode 100644 index 0000000..0ccb942 Binary files /dev/null and b/SampleInputOutput/S1/Working - 3 - Processor, Process status, Ready queue and Memory frames.pdf differ diff --git a/SampleInputOutput/S1/output.txt b/SampleInputOutput/S1/output.txt new file mode 100644 index 0000000..3d99619 --- /dev/null +++ b/SampleInputOutput/S1/output.txt @@ -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} \ No newline at end of file diff --git a/SampleInputOutput/S2/Process1.txt b/SampleInputOutput/S2/Process1.txt new file mode 100644 index 0000000..f6c990c --- /dev/null +++ b/SampleInputOutput/S2/Process1.txt @@ -0,0 +1,9 @@ +begin +1 +3 +2 +1 +5 +4 +3 +end \ No newline at end of file diff --git a/SampleInputOutput/S2/Process2.txt b/SampleInputOutput/S2/Process2.txt new file mode 100644 index 0000000..5590e9a --- /dev/null +++ b/SampleInputOutput/S2/Process2.txt @@ -0,0 +1,17 @@ +begin +5 +6 +1 +9 +8 +1 +1 +1 +3 +4 +2 +6 +3 +9 +9 +end \ No newline at end of file diff --git a/SampleInputOutput/S2/Process3.txt b/SampleInputOutput/S2/Process3.txt new file mode 100644 index 0000000..99644c5 --- /dev/null +++ b/SampleInputOutput/S2/Process3.txt @@ -0,0 +1,11 @@ +begin +7 +8 +9 +8 +7 +8 +9 +8 +7 +end \ No newline at end of file diff --git a/SampleInputOutput/S2/Process4.txt b/SampleInputOutput/S2/Process4.txt new file mode 100644 index 0000000..19967f5 --- /dev/null +++ b/SampleInputOutput/S2/Process4.txt @@ -0,0 +1,19 @@ +begin +5 +6 +3 +4 +9 +9 +8 +1 +2 +1 +4 +4 +4 +4 +5 +9 +2 +end \ No newline at end of file diff --git a/SampleInputOutput/S2/README.txt b/SampleInputOutput/S2/README.txt new file mode 100644 index 0000000..8db1c96 --- /dev/null +++ b/SampleInputOutput/S2/README.txt @@ -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. + diff --git a/SampleInputOutput/S2/output.txt b/SampleInputOutput/S2/output.txt new file mode 100644 index 0000000..0cee75c --- /dev/null +++ b/SampleInputOutput/S2/output.txt @@ -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}