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 04:33] jxufaq [2021/03/17 13:51] jxu
Line 194: Line 194:
 Write the code so that the program allows the user to enter as input parameters the following: Write the code so that the program allows the user to enter as input parameters the following:
   - the number of processes;    - the number of processes; 
-  - (the Arrival Time of each process; +  - the Arrival Time of each process; 
-  - (the CPU Computation Time for each process;+  - the CPU Computation Time for each process;
  
-Then try to write code which computes the Average Waiting Times and Average Turnaround Times for any set of 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 allowing 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.
   - Then try using C4. Nonpreemptive Priority Scheduling. (The only difference in this case, is that, whenever the CPU becomes available, the Nonpremptive Priority CPU Scheduler always removes from the ready queue the process which has the smallest Priority Number among all processes in the ready queue, and allows that process to start executing on the CPU.    - Then try using C4. Nonpreemptive Priority Scheduling. (The only difference in this case, is that, whenever the CPU becomes available, the Nonpremptive Priority CPU Scheduler always removes from the ready queue the process which has the smallest Priority Number among all processes in the ready queue, and allows that process to start executing on the CPU. 
   - Then try using some of the Preemptive CPU Scheduling Algorithms C3, C5, C6. (In this case, whenever a process which is currently executing on the CPU is preempted by a process with higher priority, that preempted process which has lower priority is put back into the ready queue.)   - Then try using some of the Preemptive CPU Scheduling Algorithms C3, C5, C6. (In this case, whenever a process which is currently executing on the CPU is preempted by a process with higher priority, that preempted process which has lower priority is put back into the ready queue.)
-  - Then try to allow each process to make one single request to perform I/O for some I/O Time on one single I/O device after completing its first CPU Computation Time,  +  - Then try to allow each process to make one single request to perform I/O for some I/O Time on one single I/O device after completing its first CPU Computation Time, while for CPU Scheduling only use one of the Nonpremptive CPU Scheduling Algorithms C1, C2 or C4. (In this case, an I/O queue is used, and processes are entered at the end of the I/O queue whenever they request I/O. Whenever the I/O device is available, the Nonpremptive FCFS I/O Scheduler always removes from the I/O queue the process which is at the front of the I/O queue, and allows that process to start performing I/O on the I/O device for the full duration of its I/O Time before that process makes the next request to execute on the CPU - after completing I/O the process will be entered into the ready queue.) 
-while for CPU Scheduling only use one of the Nonpremptive CPU Scheduling Algorithms C1, C2 or C4. (In this case, an I/O queue is used, and processes are entered at the end of the I/O queue whenever they request I/O. Whenever the I/O device is available, the Nonpremptive FCFS I/O Scheduler always removes from the I/O queue the process which is at the front of the I/O +  - Then try to allow each process to make one single request to perform I/O for some I/O Time on one single I/O device after completing its first CPU Computation Time, while for CPU Scheduling only use one of the Preemptive CPU Scheduling Algorithms C3, C5, C6
-queue, and allows that process to start performing I/O on the I/O device for the full duration of its I/O Time before that process makes the next request to execute on the CPU - after completing I/O the process will be entered into the ready queue.) +  -  … 
-  - Then try to allow each process to perform one single I/O on one single I/O device while for CPU Scheduling use one of the Preemptive CPU Scheduling Algorithms C3, C5, C6 … +
  
 (Add additional features one-by-one in this gradualist fashion, and just try to add as many features as possible before the assignment deadline.) (Add additional features one-by-one in this gradualist fashion, and just try to add as many features as possible before the assignment deadline.)
  
-Write the code so that the program allows the user to enter as input parameters the following:+When adding each additional feature, write the code so that the program allows the user to enter as input parameters the following:
   - the number of processes;   - the number of processes;
   - the Arrival Time of each process;   - the Arrival Time of each process;
Line 217: Line 216:
   - the Sequence of CPU Computation Time and I/O Time Requirements for each process;   - the Sequence of CPU Computation Time and I/O Time Requirements for each process;
  
-Then try to write code which computes the Average Waiting Times and Average Turnaround Times for +When adding each additional feature, write code which computes the Average Waiting Times and Average Turnaround Times for 
-any set of input parameters above.   +any set of user input parameters above.   
faq.txt · Last modified: 2021/04/26 22:20 by jxu