1．Many CPU scheduling algorithms are parameterized. For example ,the RR algorithm requires
a parameter to indicate the time slice. Multilevel feedback queues require parameters to define the
number of queues , the scheduling algorithms for each queue , the criteria used to move processes
between queues, and so on.
These algorithms are thus really sets of algorithms (for example, the set of RR algorithms for all time slices, and so on). One set of algorithms may include another (for example , the FCFS(first come first serve) algorithm is the RR algorithm with an infinite time quantum). What (if any) relation holds between the following pairs of sets of algorithms?
a. Priority and SJF
b. Multilevel feedback queues and FCFS
c. Priority and FCFS
d. RR and SJF
2. A bank teller provides service to customers who arrive in a Poisson pattern at an average
rate of 20 per hour. Service times are distributed exponentially with an average time of two
a) What is the mean waiting time for each customer?
b) A second teller arrives back from lunch and begins serving customers. A single line
continues to serve both tellers. What is the mean waiting time when both tellers are working?
HINT: Refer to Allen's paper. Erlang's C formula for 2 servers can be given as
C(2,U) = U / (2 + 2U - U2)
A page-replacement algorithm should minimize the number of page faults. We can achieve this minimization by distributing heavily used pages evenly over all of memory, rather than having them compete for a small number of page frames. We can associate with each page frame a counter of the number of pages associated with that frame. Then , to replace a page ,we can search
for the page frame with the smallest counter.
a. Define a page-replacement algorithm using this basic idea. Specifically address these problems:
1. What the initial value of the counters is
2. When counters are increased
3. When counters are decreased
4. How the page to be replaced is selected
b. How many page faults occur for your algorithm for the following reference string, with four page frames?
c. What is the minimum number of page faults for an optimal page-replacement strategy for the reference string in part b with four page frames?