The SPF strategy can be proven to be optimal in the sense that it minimizes average response times. In this problem, you will demonstrate this result empirically by examining all possible orderings for a given set of five processes. In the next problem, you will actually prove the result. Suppose five different processes are waiting to be processed, and that they require 1, 2, 3, 4, and 5 time units, respectively. Write a program that produces all possible permutations of the five processes (5! = 120) and calculates the average waiting time for each permutation. Sort these into lowest to highest average waiting time order and display each average time side by side with the permutation of the processes. Comment on the results.
What will be an ideal response?
This is a nice problem. It gets the students to write a program quickly. The students are curious to know if their intuition is correct. The result of this brute-force programming approach is not a mathematical proof, but it is a nice lead into the next problem.
You might also like to view...
Distributed computing distributes ________
A) power ability across all users B) disk storage for all computer users C) Internet usage across the entire network D) the processing of tasks across a group of computers
If users delete a Field from the Design view by accident, they can click Undo to correct the error
Indicate whether the statement is true or false
A Word feature that maps predefined field names to the field names in a data source is:
A) Rename Columns. B) Match Data. C) Match Fields. D) Map Fields.
A column chart turned on its side is called a bar chart, with the length of the bar determined by the data value. ___________
Answer the following statement true (T) or false (F)