Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8023051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:27:07+00:00 2026-06-04T22:27:07+00:00

In Linux, there’s the taskset utility which allows you to set CPU affinity for

  • 0

In Linux, there’s the taskset utility which allows you to set CPU affinity for a certain process.

Is there an equivalent in the Windows environment?
I want to set a maximum CPU threshold for my product, is there any existing mechanism in Windows that offers this capabilities?

If its any help, my product is developed in .Net

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:27:11+00:00Added an answer on June 4, 2026 at 10:27 pm

    Yes, there is:

    Starts a separate window to run a specified program or command.
    
    START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
      [command/program] [parameters]
    

    and the option /AFFINITY <hex affinity mask> in particular.

    AFFINITY    Specifies the processor affinity mask as a hexadecimal number.
                The process is restricted to running on these processors.
    
                The affinity mask is interpreted differently when /AFFINITY and
                /NODE are combined.  Specify the affinity mask as if the NUMA
                node's processor mask is right shifted to begin at bit zero.
                The process is restricted to running on those processors in
                common between the specified affinity mask and the NUMA node.
                If no processors are in common, the process is restricted to
                running on the specified NUMA node.
    

    If you’d like to bind to CPU 0 only, then specify affinity mask of 0x1. To bind to CPU 1 the mask should be 0x2. To bind to CPU 0 and CPU 1 the mask should be 0x3, and so on.

    You can also set the CPU affinity in code by assigning the same hexadecimal mask value to the ProcessorAffinity property of the instance of the current process obtainable by calling System.Diagnostics.Process.GetCurrentProcess():

    using System.Diagnostics;
    
    Process.GetCurrentProcess().ProcessorAffinity = (IntPtr)0x3;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a Linux utility or a Bash command I can use to sort
Is there a standard linux/unix pattern for communicating with long running process? For example,
Is there any function in C on linux by which we can query MX
Is there a way in Windows/Linux or any other operating system to know at
Is there a Linux command to easily find out which partition/mount a directory or
Is there a Linux command, or a series of commands, which will allow me
Is there a (Linux or Windows) command line tool that is able to create
I have windows box, also there is linux box where I have my account
Is there some Linux analog of windows function GetAsyncKeyState() ? Or maybe there exists
I am using Linux and there is a custom function of which returns an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.