For example the SQL Server license model is limited to the number of cpu sockets/cores:
SQL Server edition
Maximum compute capacity for a single instance ( SQL Server Database Engine)
Enterprise Edition: Core-based Licensing*
Operating system maximum
Developer
Operating system maximum
Standard
Limited to lesser of 4 sockets or 24 cores
Express
Limited to lesser of 1 socket or 4 cores
How do you limit the number of sockets or cores for an application or windows service in C#/.NET?
Is setting the processor affinity/threadaffinity the only way (which can easily be bypassed via task manager (ctrl+shift+esc))
(P.S.: The question is not if it is a good idea to do this or not, as seen a lot in other questions).