Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GlacialTaskAdvocate.hh

Go to the documentation of this file.
00001 /*
00002  * GlacialTaskAdvocate.hh
00003  *
00004  * Copyright (c) 2003, 2004 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 <RealTimeTaskDelegateImpl.hh>
00022 
00023 /**
00024  * An advocate that is slow to react to changes in the CPU usage.  This
00025  * advocate is mostly useful for applications that have a relatively flat usage
00026  * pattern with an infrequent spike in usage.
00027  *
00028  * The current implementation increases or decreases its advice by a quarter of
00029  * the difference between the last received advice and the current.
00030  */
00031 class GlacialTaskAdvocate : public virtual RealTimeTaskDelegateImpl
00032 {
00033 
00034 public:
00035 
00036     /** Default constructor. */
00037     GlacialTaskAdvocate(void);
00038 
00039     /** Destructor. */
00040     virtual ~GlacialTaskAdvocate(void);
00041 
00042     /** @copydoc Broker::RealTimeTask::PassCPU */
00043     virtual Broker::CPUReserve PassCPU(Broker::RealTimeTask_ptr rtt,
00044                                        const Broker::CPUReserve &status,
00045                                        const Broker::CPUReserve &advice,
00046                                        const Broker::KeyedReportParameters &krp)
00047         throw (CORBA::SystemException);
00048 
00049 private:
00050 
00051     /**
00052      * The last advice reported by this advocate.
00053      */
00054     CORBA::ULong gta_LastAdvice;
00055 
00056 };
00057 
00058 #endif

Generated on Fri Oct 22 07:50:24 2004 for CPU Broker by  doxygen 1.3.9.1