00001 /* 00002 * GlacialTaskAdvocate.hh 00003 * 00004 * Copyright (c) 2003 The University of Utah and the Flux Group. 00005 * All rights reserved. 00006 * 00007 * This file is licensed under the terms of the GNU Public License. 00008 * See the file "license.terms" for restrictions on redistribution 00009 * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 00010 */ 00011 00012 /** 00013 * @file GlacialTaskAdvocate.hh 00014 * 00015 * Header file for the GlacialTaskAdvocate class. 00016 */ 00017 00018 #ifndef _glacial_task_advocate_hh 00019 #define _glacial_task_advocate_hh 00020 00021 #include "ExactTaskAdvocate.hh" 00022 00023 /** 00024 * An ExactTaskAdvocate that is slower to react to changes in the required 00025 * amount of CPU time. 00026 */ 00027 class GlacialTaskAdvocate : public ExactTaskAdvocate 00028 { 00029 00030 public: 00031 00032 /** @copydoc Broker::TaskFactory::CreateTask */ 00033 GlacialTaskAdvocate(const Broker::TaskParameters &tp) 00034 throw (CORBA::SystemException, 00035 Broker::DuplicateTaskParameter, 00036 Broker::InvalidTaskParameter, 00037 Broker::MissingTaskParameter); 00038 00039 /** 00040 * Compute a new processing time advice from the given status value. The 00041 * glacial implementation will use the advice reported by the parent class 00042 * and temper the change by some factor. 00043 * 00044 * @param status The value passed into ReportCPU. 00045 * @return A processing time with a smaller change than that reported by 00046 * the parent. 00047 * @exception InvalidStatus if the status value is invalid. 00048 * @exception CORBA::BAD_INV_ORDER if the method is called without 00049 * BeginCPUScheduling() being called first. 00050 */ 00051 virtual CORBA::ULong ComputeAdvice(CORBA::ULong status) 00052 throw (CORBA::SystemException, Broker::InvalidStatus); 00053 00054 }; 00055 00056 #endif