One embodiment of the present invention provides a system that enforces a
resource-usage policy in a compute farm. During operation, the system can
receive etiquette rules which include resource-usage rules and
corrective-action rules. Resource-usage rules can specify situations in
which the resource-usage policy is violated, and corrective-action rules
can specify situations in which a corrective action needs to be
performed. Next, the system can receive resource-usage information which
includes job monitoring data and process monitoring data. The system can
then determine a resource-usage violation by applying the resource-usage
rules to the resource-usage information. Next, the system can store the
resource-usage violation in a violation database. The system can then
determine a corrective action by applying corrective-action rules to a
series of violations stored in the violation database. Next, the system
can perform the corrective action, thereby enforcing the resource-usage
policy in the compute farm.