Udostępnij za pośrednictwem


PolicyElementKey Enumeration

Policy keys describing aspects of scheduler behavior. Each policy element is described by a key-value pair. For more information about scheduler policies and their impact on schedulers, see Task Scheduler (Concurrency Runtime).

enum PolicyElementKey;

Members

Values

Name

Description

ContextPriority

The operating system thread priority of each context in the scheduler. If this key is set to the value INHERIT_THREAD_PRIORITY the contexts in the scheduler will inherit the priority of the thread that created the scheduler.

Valid values : Any of the valid values for the Windows SetThreadPriority function and the special value INHERIT_THREAD_PRIORITY

Default value : THREAD_PRIORITY_NORMAL

ContextStackSize

The reserved stack size of each context in the scheduler in kilobytes.

Valid values : Positive integers

Default value : 0, indicating that the process' default value for stack size be used.

DynamicProgressFeedback

Determines whether the resources for the scheduler will be rebalanced according to statistical information gathered from the scheduler or only based on the subscription level of underlying hardware threads. For more information, see DynamicProgressFeedbackType Enumeration.

Valid values : A member of the DynamicProgressFeedbackType enumeration, either ProgressFeedbackEnabled or ProgressFeedbackDisabled

Default value : ProgressFeedbackEnabled

LocalContextCacheSize

When the SchedulingProtocol policy key is set to the value EnhanceScheduleGroupLocality, this specifies the maximum number of runnable contexts allowed to be cached in per virtual processor local queues. Such contexts will typically run in last-in-first-out (LIFO) order on the virtual processor that caused them to become runnable. Note that this policy key has no meaning when the SchedulingProtocol key is set to the value EnhanceForwardProgress.

Valid values : Non-negative integers

Default value : 8

MaxConcurrency

The maximum concurrency level desired by the scheduler. The resource manager will try to initially allocate this many virtual processors. The special value MaxExecutionResources indicates that the desired concurrency level is same as the number of hardware threads on the machine. If the value specified for MinConcurrency is greater than the number of hardware threads on the machine and MaxConcurrency is specified as MaxExecutionResources, the value for MaxConcurrency is raised to match what is set for MinConcurrency.

Valid values : Positive integers and the special value MaxExecutionResources

Default value : MaxExecutionResources

MaxPolicyElementKey

The maximum policy element key. Not a valid element key.

MinConcurrency

The minimum concurrency level that must be provided to the scheduler by the resource manager. The number of virtual processors assigned to a scheduler will never go below the minimum. The special value MaxExecutionResources indicates that the minimum concurrency level is same as the number of hardware threads on the machine. If the value specified for MaxConcurrency is less than the number of hardware threads on the machine and MinConcurrency is specified as MaxExecutionResources, the value for MinConcurrency is lowered to match what is set for MaxConcurrency.

Valid values : Non-negative integers and the special value MaxExecutionResources. Note that for scheduler policies used for the construction of Concurrency Runtime schedulers or any policy with the SchedulerKind policy key set to the value UMSThreadDefault, the value 0 is invalid.

Default value : 1

SchedulerKind

The type of threads that the scheduler will utilize for underlying execution contexts. For more information, see SchedulerType Enumeration.

Valid values : A member of the SchedulerType enumeration, either ThreadScheduler or UmsThreadDefault

Default value : ThreadScheduler. This translates to Win32 threads on all operating systems.

SchedulingProtocol

Describes which scheduling algorithm will be used by the scheduler. For more information, see SchedulingProtocolType Enumeration.

Valid values : A member of the SchedulingProtocolType enumeration, either EnhanceScheduleGroupLocality or EnhanceForwardProgress

Default value : EnhanceScheduleGroupLocality

TargetOversubscriptionFactor

Tentative number of virtual processors per hardware thread. The target oversubscription factor may be increased by the Resource Manager, if necessary, to satisfy MaxConcurrency with the hardware threads on the machine.

Valid values : Positive integers

Default value : 1

Requirements

Header: concrt.h

Namespace: Concurrency

See Also

Reference

Concurrency Namespace

SchedulerPolicy Class

CurrentScheduler Class

Scheduler Class

Concepts

Task Scheduler (Concurrency Runtime)