Bitsum’s CPU Affinity Textual Representation
During the course of development of Process Lasso and other Bitsum software, it became apparent that we needed a way to express CPU affinities in an efficient, shorthand, textual manner. This specification became used by the Default CPU Affinities and, in fact, all CPU Affinity settings of Process Lasso.
The specification is quite simple. It is a semicolon delimited list of logical cores, starting at 0. To handle ranges, it allows for the specification of X-Y. Hence, a CPU affinity expressed in this manner might look like:
0;5-8;13-15;21
Representing a CPU affinity of cores 0, 5, 6, 7, 8, 13, 14, 15, and 21.
Internal to our code, and through most of the Windows APIs, CPU affinities are represented as bitmasks. This does mean we’ve hit an integer barrier at 64-bits/cores, but are quickly refactoring code to support more than 64 logical cores, and it’s why older versions of our software only supported 32 logical cores.
This representation will now start being used on more dialogs, allowing for advanced users to type, or even copy and paste, CPU affinities if they so desire. This will happen in tandem with other developments that allow for easier CPU affinity selection, soon to be announced.
Discover more from Bitsum
Subscribe to get the latest posts sent to your email.