midterm question


A printer spooler
% SEE p.100 of Tanenbaum for the details
operates as follows: it has a unbounded queue (unrealistic
of course, but simplifies our question)
and two variables:
	int front, back;

At each print request, it does 

	front++  
	Q[front]=printfile

At each job termination, it does

	back++

If there is no synchronization, describe how
a disaster can happen.  Be sure to work out
the scenario for how the disaster happens.

