This library contains important high- and low-level functions mainly used by Schedd, some of the functions contained herein however have been proven to be used as well by clients like qstat, qhost or qmon, but also by qmaster. For a comprehensive functional segmentation of the schedulers source code refer to the schedd documentation.
The scheduling library contains some functions that can be reused. Here is a description about their semantics:
host list sorting
Function sort_host_list() sorts the host list according to the load_formula (see manual page sched_conf(5)). It takes into account the adjusted load situation (see under 'job_load_adjustments' and 'load_adjustment_decay_time' in sched_conf(5)) and the availability of consumable resources (see under 'consumable' in complex(5)).
check whether a queue is in load/suspend alarm
This is implemented in sge_load_alarm(). The function takes into account the adjusted load situation (see under 'job_load_adjustments' and 'load_adjustment_decay_time' in sched_conf(5)).
verification whether a job matches a queue
This operation is implemented in sge_why_not_job2queue_static(). Please note that the purpose of this function is just to answer the question whether a job in principle can be dispatched to a queue. The pertinent conditions are things like access permissions, job type or required resources, but it does not take into account dynamically changing properties like current load situation or availability of consumables.
verification whether a job matches a host
This operation is implemented in sge_why_not_job2host(). This can be seen as the counter-part of sge_why_not_job2queue_static() checking for suitable hosts instead of queues and the same restrictions apply.
Copyright 2001 Sun Microsystems, Inc. All rights reserved.