OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy Struct Reference

Specifies the policies for resource grants in the presence of other requests, both under situations of resource undersubscription (i.e there are still resources of the given type in the pool) and oversubscription. More...

#include <ResourceGrantPolicy.h>

Public Member Functions

 ConcurrentResourceGrantPolicy ()
 
 ConcurrentResourceGrantPolicy (const ResourceType resource_type, const ResourceConcurrencyPolicy concurrency_policy, const ResourceConcurrencyPolicy oversubscription_concurrency_policy)
 
bool operator== (const ConcurrentResourceGrantPolicy &rhs) const
 
std::string to_string () const
 

Public Attributes

ResourceType resource_type {ResourceType::INVALID_TYPE}
 The type of a resource this concurrent resource grant policy pertains to. More...
 
ResourceConcurrencyPolicy concurrency_policy {DISALLOW_REQUESTS}
 The grant policy in effect when there are concurrent requests for the resource specified by resource_type, but the resource is not oversubscribed (i.e. requested in greater quantity between all requests than is available) More...
 
ResourceConcurrencyPolicy oversubscription_concurrency_policy {DISALLOW_REQUESTS}
 The grant policy in effect when there are concurrent requests for the resource specified by resource_type, and the resource is oversubscribed (i.e. requested in greater quantity between all requests than is available) More...
 

Detailed Description

Specifies the policies for resource grants in the presence of other requests, both under situations of resource undersubscription (i.e there are still resources of the given type in the pool) and oversubscription.

For example, it may make sense to allow concurrent grants for CPU threads (via ResourceConcurrencyPolicy::ALLOW_CONCURRENT_REQUESTS), but if there would be oversubscription of CPU threads, to only allow a single request for that type to run (via `ResourceConcurrencyPolicyALLOW_SINGLE_REQUEST). Or if the desired policy was to have GPU requests run alone in the system, ConcurrentResourceGrantPolicy::concurrency_policy could be set to `ResourceConcurrencyPolicy::ALLOW_SINGLE_REQUEST_GLOBALLY1

Definition at line 172 of file ResourceGrantPolicy.h.

Constructor & Destructor Documentation

ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy::ConcurrentResourceGrantPolicy ( )
inline

Definition at line 192 of file ResourceGrantPolicy.h.

192 {}
ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy::ConcurrentResourceGrantPolicy ( const ResourceType  resource_type,
const ResourceConcurrencyPolicy  concurrency_policy,
const ResourceConcurrencyPolicy  oversubscription_concurrency_policy 
)
inline

Definition at line 194 of file ResourceGrantPolicy.h.

ResourceType resource_type
The type of a resource this concurrent resource grant policy pertains to.
ResourceConcurrencyPolicy concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...
ResourceConcurrencyPolicy oversubscription_concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...

Member Function Documentation

bool ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy::operator== ( const ConcurrentResourceGrantPolicy rhs) const

Definition at line 131 of file ResourceGrantPolicy.cpp.

References concurrency_policy, oversubscription_concurrency_policy, and resource_type.

132  {
133  return resource_type == rhs.resource_type &&
134  concurrency_policy == rhs.concurrency_policy &&
135  oversubscription_concurrency_policy == rhs.oversubscription_concurrency_policy;
136 }
ResourceType resource_type
The type of a resource this concurrent resource grant policy pertains to.
ResourceConcurrencyPolicy concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...
ResourceConcurrencyPolicy oversubscription_concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...
std::string ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy::to_string ( ) const

Definition at line 138 of file ResourceGrantPolicy.cpp.

References concurrency_policy, ExecutorResourceMgr_Namespace::get_resource_concurrency_policy_string(), oversubscription_concurrency_policy, resource_type, and ExecutorResourceMgr_Namespace::resource_type_to_string().

Referenced by ExecutorResourceMgr_Namespace::ExecutorResourcePool::log_parameters().

138  {
139  std::ostringstream oss;
140  oss << "Resource Type: " << resource_type_to_string(resource_type)
141  << "Undersubscribed Policy: "
143  << " Oversubscribed Policy: "
145  return oss.str();
146 }
ResourceType resource_type
The type of a resource this concurrent resource grant policy pertains to.
ResourceConcurrencyPolicy concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...
std::string get_resource_concurrency_policy_string(const ResourceConcurrencyPolicy &resource_concurrency_policy)
ResourceConcurrencyPolicy oversubscription_concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...
std::string resource_type_to_string(const ResourceType resource_type)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

ResourceConcurrencyPolicy ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy::concurrency_policy {DISALLOW_REQUESTS}

The grant policy in effect when there are concurrent requests for the resource specified by resource_type, but the resource is not oversubscribed (i.e. requested in greater quantity between all requests than is available)

Definition at line 183 of file ResourceGrantPolicy.h.

Referenced by ExecutorResourceMgr_Namespace::ExecutorResourcePool::check_request_against_global_policy(), ExecutorResourceMgr_Namespace::ExecutorResourcePool::check_request_against_policy(), operator==(), ExecutorResourceMgr_Namespace::ExecutorResourceMgr::set_concurrent_resource_grant_policy(), and to_string().

ResourceConcurrencyPolicy ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy::oversubscription_concurrency_policy {DISALLOW_REQUESTS}

The grant policy in effect when there are concurrent requests for the resource specified by resource_type, and the resource is oversubscribed (i.e. requested in greater quantity between all requests than is available)

Definition at line 190 of file ResourceGrantPolicy.h.

Referenced by ExecutorResourceMgr_Namespace::ExecutorResourcePool::check_request_against_global_policy(), ExecutorResourceMgr_Namespace::ExecutorResourcePool::check_request_against_policy(), operator==(), ExecutorResourceMgr_Namespace::ExecutorResourceMgr::set_concurrent_resource_grant_policy(), and to_string().

ResourceType ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy::resource_type {ResourceType::INVALID_TYPE}

The documentation for this struct was generated from the following files: