The PBS TCL scheduler include in this directory was contributed by

	Thomas E. Milliman
	Space Science Center
	University of New Hampshire

PBS at the University of New Hampshire supports a cluster of Sun Workstations
running Solaris.  If you wish to distribute jobs across a cluster, you may 
find his scheduler of interest.

Tom explains the scheduler policy:

	"Here's a quick attempt to explain the "scheduling policy".  Its
	not 100% accurately reflected in the scheduler but its pretty close.
	In our case we were not so interested in maximizing throughput or
	seeking the best utilization of CPU's.  What we were trying to do
	was mimic a previous batch system to which users had grown accustomed
	and for which queue etiquette was well established."

	First we set up queues with the following rules:

	* We have a single queue for each cpu.  If a machine has 4 cpu's it
	gets 4 queues.  No attempt was made to distinquish between CPU speeds.
	Users just were expected to know which were fast and which were slow or
	which machines had lots of memory and which didn't.
	
	* Each queue was targeted to a specific execution host or client.
	We use queue names which match hostnames.  When a client has multiple
	cpu's we use names like foo1, foo2, foo3, etc. where 'foo' is replaced
	by the client's hostname.
	
	* We have one "high-priority" queue (called burst).  It has a queue
	priority of 10 while all our other queues have priority 0.  The
	priority is used by the scheduler which sorts jobs by priority so that
	jobs in higher priority queues are processed first.	
	
	
	Then the scheduling algorithm is something like the following:
	
	check to see if jobs are queued, if not exit
	
	make a list of all jobs queued and running
	
	if we are already at the maximum number of jobs running for the server
	and there are no jobs queued for the burst queue exit
	
	make a list a available clients based on current load average
	
	if there are no available clients and there are no jobs queued for the
	burst queue exit
	
	make a list of all queues and their priorities
	
	sort the list of queued jobs by priority
	
	set up counters for number of jobs running on each 
	client, user, and queue
	
	loop through list of queued jobs 
	
		if queue is not started go to next job
	
		if number of jobs running for this queue is at max then 
	        go to next job
		
		if queue is burst 
	
			kill all other jobs running on the "burst" client
	
			run the queued job
	
		endif
	
		if load average for the client associated with this queue 
		has reached limit go to next job
	
		if number of jobs running for this user is at max then
		go to next job
	
		run job
	
		increment counters for number of jobs running for client,
		queue, user
	
		increment load average of client by 2
	
	end loop
	
	exit
		
	
	
This code is neither supported nor endorsed by NASA Ames Research Center.
It is included with permission of the author as a sample of a working
scheduler for reference purposes.  The PBS developers would like to extend
sincere thanks to Tom Milliman for allowing us to include his work in our
distribution.
