process-governor icon indicating copy to clipboard operation
process-governor copied to clipboard

Enable Sequential Rule Evaluation with Conditional Continuation

Open SystemXFiles opened this issue 1 year ago • 0 comments
trafficstars

Summary

Add a feature allowing the utility to continue evaluating subsequent rules after applying the current one. The current rule can specify whether to continue searching for more rules (e.g., with a special flag). If the rule permits further evaluation, the utility will continue applying additional rules, enhancing flexibility in process management.

Basic example

For instance, you may need to set the CPU affinity for an application to all cores initially, and after a delay of 10 seconds, change it to cores 0-1. This can be achieved with two rules:

  1. Rule 1: Set CPU affinity to cores 0-7, with a flag allowing the search for subsequent rules.
  2. Rule 2: After a 10-second delay, update CPU affinity to cores 0-1.

With this new feature, the utility will apply both rules sequentially: first setting affinity to all cores, then switching to a more restrictive set of cores after the delay.

Motivation

This feature enables more flexible process management where stepwise changes to settings are needed. For example, initially allowing full CPU usage and later restricting it after a certain period. It supports advanced use cases like dynamic changes in affinity or priority based on conditions. The expected outcome is enhanced process control and greater flexibility in configuring rules.

SystemXFiles avatar Sep 28 '24 07:09 SystemXFiles