2006-09-17 21:59:41 +02:00
|
|
|
// src/backend/resource_policy_priority_inheritance.hh - Copyright 2005, 2006, University
|
2006-09-13 03:28:22 +02:00
|
|
|
// of Padova, dept. of Pure and Applied
|
|
|
|
// Mathematics
|
|
|
|
//
|
|
|
|
// This file is part of SGPEMv2.
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
2007-06-30 15:31:19 +02:00
|
|
|
// the Free Software Foundation; either version 3 of the License, or
|
2006-09-13 03:28:22 +02:00
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// SGPEMv2 is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
2007-06-30 15:31:19 +02:00
|
|
|
// along with SGPEMv2. If not, see http://www.gnu.org/licenses/.
|
|
|
|
|
2006-09-13 03:28:22 +02:00
|
|
|
|
|
|
|
#ifndef RESOURCE_POLICY_INHERITANCE_HH
|
|
|
|
#define RESOURCE_POLICY_INHERITANCE_HH 1
|
|
|
|
|
2006-09-15 01:07:16 +02:00
|
|
|
namespace sgpem
|
|
|
|
{
|
|
|
|
class ResourcePolicyPriorityInheritance;
|
|
|
|
}
|
|
|
|
|
2006-09-13 03:28:22 +02:00
|
|
|
#include <sgpemv2/resource_policy.hh>
|
2006-09-15 01:07:16 +02:00
|
|
|
|
2006-09-13 03:28:22 +02:00
|
|
|
namespace sgpem
|
|
|
|
{
|
2006-09-15 01:07:16 +02:00
|
|
|
/**
|
|
|
|
* \brief It's a Strategy wich stay for a resource allocating algorithm.
|
|
|
|
* It implements the related resource allocation policy.
|
|
|
|
*/
|
2006-09-17 21:59:41 +02:00
|
|
|
class ResourcePolicyPriorityInheritance : public ResourcePolicy
|
2006-09-13 03:28:22 +02:00
|
|
|
{
|
|
|
|
public:
|
2006-09-17 18:26:02 +02:00
|
|
|
|
|
|
|
/// \brief Standard virtual destructor.
|
|
|
|
///
|
|
|
|
/// Standard virtual destructor.
|
2006-09-13 03:28:22 +02:00
|
|
|
virtual ~ResourcePolicyPriorityInheritance();
|
|
|
|
|
|
|
|
/**
|
2006-09-15 01:07:16 +02:00
|
|
|
\brief Initialize the inner components of the policy.
|
2006-09-13 03:28:22 +02:00
|
|
|
|
|
|
|
Because it's a pure virtual method, must be re-implemented
|
|
|
|
in concrete derived classes.
|
|
|
|
*/
|
|
|
|
virtual void configure() throw(UserInterruptException);
|
|
|
|
|
|
|
|
/**
|
2006-09-15 01:07:16 +02:00
|
|
|
\brief Mixes the queues.
|
2006-09-13 03:28:22 +02:00
|
|
|
|
|
|
|
Because it's a pure virtual method, must be re-implemented
|
|
|
|
in concrete derived classes.
|
|
|
|
*/
|
2006-09-15 01:07:16 +02:00
|
|
|
virtual void enforce(Environment& environment,
|
|
|
|
Environment::SubRequestQueue& queue,
|
|
|
|
SubRequest& sr) throw(UserInterruptException);
|
2006-09-13 03:28:22 +02:00
|
|
|
|
|
|
|
/**
|
2006-09-15 01:07:16 +02:00
|
|
|
\brief Gets a string description of the policy.
|
2006-09-13 03:28:22 +02:00
|
|
|
|
|
|
|
Because it's a pure virtual method, must be re-implemented
|
|
|
|
in concrete derived classes.
|
|
|
|
\return String description of the policy.
|
|
|
|
*/
|
|
|
|
virtual Glib::ustring get_description() const;
|
|
|
|
|
|
|
|
virtual Glib::ustring get_name() const;
|
|
|
|
|
|
|
|
virtual void activate();
|
|
|
|
|
|
|
|
virtual void deactivate();
|
|
|
|
};
|
|
|
|
|
|
|
|
}//~ namespace sgpem
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|