User Tools

Site Tools


faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
faq [2021/03/17 14:24] jxufaq [2021/03/17 14:32] jxu
Line 176: Line 176:
 **Question 20**: Because my group started working on Assignment 2 rather late, now it looks almost certain that we won’t be able to finish designing, and implementing any working Java program that is able to compute the average waiting times and average turnaround times for any given workload using all of the six scheduling algorithms as specified in Assignment 2. Yet we don’t want to completely give up on Assignment 2. Can you give us some advice on what we might consider doing for the programming part of Assignment 2 to at least get something done for the programming part, taking into consideration that we only have a few days left before the deadline to work on the assignment?   **Question 20**: Because my group started working on Assignment 2 rather late, now it looks almost certain that we won’t be able to finish designing, and implementing any working Java program that is able to compute the average waiting times and average turnaround times for any given workload using all of the six scheduling algorithms as specified in Assignment 2. Yet we don’t want to completely give up on Assignment 2. Can you give us some advice on what we might consider doing for the programming part of Assignment 2 to at least get something done for the programming part, taking into consideration that we only have a few days left before the deadline to work on the assignment?  
  
-**Answer to Question 20**: As a first step, you may try to write the code only for a //**very basic and simple Java program**//, which only needs to handle the following:+**Answer to Question 20**: As a first step, you may try to write the code only for a //**very basic and simple Java program**//, which only needs to handle the following:
  
   * Each process //**only executes once on the CPU**// before terminating;   * Each process //**only executes once on the CPU**// before terminating;
Line 198: Line 198:
 Then try to write code which computes the Average Waiting Times and Average Turnaround Times for any set of user input parameters above. Then try to write code which computes the Average Waiting Times and Average Turnaround Times for any set of user input parameters above.
  
-**Once you have got the code for the very basic and simple Java program described above working, then try to gradually add additional features, in order of difficulty**, to the code. For example:+//**Once you have got the code for the very basic and simple Java program described above working, then try to gradually add additional features, in order of difficulty, to the code**//. For example:
   - First try to allow processes to have //**different CPU Computation Times**//.   - First try to allow processes to have //**different CPU Computation Times**//.
   - Then try using //**C2. Nonpreemptive Shortest-Job-First (SJF) Scheduling**//. (The only difference in this case, is that, whenever the CPU becomes available, the Nonpremptive SJF CPU Scheduler always removes from the ready queue the process which has the smallest CPU Computation Time among all processes in the ready queue, and allows that process to start executing on the CPU.   - Then try using //**C2. Nonpreemptive Shortest-Job-First (SJF) Scheduling**//. (The only difference in this case, is that, whenever the CPU becomes available, the Nonpremptive SJF CPU Scheduler always removes from the ready queue the process which has the smallest CPU Computation Time among all processes in the ready queue, and allows that process to start executing on the CPU.
faq.txt · Last modified: 2021/04/26 22:20 by jxu