https://developerpublish.com/how-to-programmatically-get-the-number-of-processors-in-the-machine-using-c/
How to Programmatically get the number of processors in the machine using C# ?