Due March 27, 2008
1. Four processes A through D, arrive at a computer system at 0, 1, 2, and 3,
respectively. They have estimated execution times of 8, 4, 9, and 5.
Their priorities are 2, 4, 3, and 1, respectively, with 1 being
the highest priority. The priorities are used only for priority scheduling
(i.e., they are ignored in other scheduling algorithms).
All jobs are completely CPU bound.
The OS does not know when a process will arrive, until it arrives.
For each of the following scheduling algorithms, determine the average
response time. Ignore context switching overhead.
(a) round robin with time slice = 1
(b) priority scheduling
(c) shortest time to completion first
2. Two periodic processes are ready to run at time 0: P1(2,1) and P2(5,2.5).
Draw a timeline for each process to show when they are running and when
they are waiting, assuming that there is no context switching overhead.
(a) The system uses EDF (earliest deadline first) scheduling.
(b) The system uses RM (rate monotonic) scheduling.
3. Consider a variant of the RR scheudling algorithm in which entries
in the ready queue are pointers to the PCBs.
(a) What would be the effect of putting two pointers to the same process in the ready queue?
(b) What would be the major advantage and disadvantage of this scheme?
(c) How will you modify the basic RR algorithm to achieve the same effect without
the duplicate pointers?
4. Measurements of a certain system have shown that the average
process runs for time t before blocking on I/O.
Assume that the system has as input an infinite supply of identical jobs.
A process context switch takes time s, which is effectively wasted
(overhead).
For round robin scheduling with quantum q, give a formula
for the CPU efficiency for each of the following:
(a) q = infinity
(b) q > t
Pledge your homework.