CPU Scheduling computing the average response time and througput in FCFS SJF MultiLevel FB

profileNero51125

 

As discussed in the class, please finish the three functions:

(1) public static void FCFS(List<Process> ready_q)                 (20%)

Complete it by computing the average response time and througput.  

(2) public static void SJF_preemptive(List<Process> ready_q)        (40%)

Complete this function by using shortest job first algorithm in preemptive mode. You need to compute the average waiting time, average response time and throughput and print them out.

      - Processes are executed in the correct order (25%)

      - Correctly print out the average waiting time, average response time and throughput. (15%)

(3) public static void multiLevel_FB(List<Process> ready_q)          (40%)

Complete this function by using multi-level feedback algorithm. You need to compute the average waiting time, average response time and throughput and print them out.

      - Processes are executed in the correct order (25%)

      - Correctly print out the average waiting time, average response time and throughput. (15%)

 

Submission:

Feel free to modify the Process class as needed. So after you finish the code, you only need to turn in the "CPUscheduling.java" file

  • 5 years ago
  • 50
Answer(1)

Purchase the answer to view it

blurred-text
NOT RATED
  • attachment
    FCFSAlgorithm.docx
  • attachment
    Multilevelalgorithm.docx
  • attachment
    CPUscheduling.docx
  • attachment
    CPUschedulingjava.docx
  • attachment
    SJFalgorithmjava.docx
  • attachment
    Multilevelalgorithmjava.docx
  • attachment
    IMG_20210416_175020_081.jpg
  • attachment
    IMG_20210416_175025_728.jpg