Processor affinity windows
When systems start shipping with many dozen cores it is likely that many of these cores will be optimized for certain types of operation. This will be done in much the same way as how a graphical processing unit GPU is optimized to perform operations common to graphics processing.
So I am sure you can imagine that when there are dozens of cores, where most are optimized for specific operations it will be quite a complex task to assign the processor affinity intelligently. I believe that future versions of operating systems should take care of this while still allowing user modifications. First, when the operating system is installed, or when new hardware is added, the operating system will identify each core available.
This would be similar to what it does now except that it would also compare each core to a previously created registry. This registry, which I will call the core optimization registry, would be kept by the operating system company and be available for updates.
This list would match each core to the operations for which it is optimized. Processor manufacturers would register their cores with this list or there could be some sort of independent review of the processor's optimizations to ensure a suitable level of optimization this is probably the preferred method in order to properly place the cores. The concept of the core optimization registry could even provide another arena for competition amongst operating systems; whereas different operating systems will likely have different core optimization registries possibly even at various degrees of detail.
For instance, one operating system may rank a given core at being optimized for graphic operations, while another operating system with a more comprehensive core optimization registry may rank at the same core at being optimized to 3d graphic operations. Secondly, after the operating system knows of all cores available and has checked them against the core optimization registry, the operating system needs to assign each process to one or more cores based on the types of operations required of the process.
During installation of the operating system the operating system could match all pre-installed software to one or more cores as well as matching all operating system processes to one or more cores. Matching these processes to the available cores will be a difficult task.
How would the operating system know what types of operations are required by the processes in a given piece of software? This is a requirement to be able to intelligently assign processor affinity. There could be a software operations registry, where software is registered to the registry along with the types of operations required of the software.
And one process may contain multiple threads. If you are reading this article, you might be already aware of the process and threads in the operating system. The CPU affinity is a setting provided by the operating system. It helps to reserve particular core of CPU for a particular thread to be executed on. Threads get to run on any of the core whichever available at that time.
It chooses the best CPU core to be used to execute a particular thread. Sometimes, it denies some threads to execute on some CPU cores. For instance, there are two threads which use cache intensively. Suppose particular cache is shared by two cores. If a cache-intensive thread is running on two cores, execution of both threads on two cores can depend on the availability of shared cache resource.
So it is preferred to use these two threads on two cores that do not share common CPU. Like a cache, the same situation can have occurred for other shared resources like memory banks, IO devices…. Conversely, those getting lag on Discord or other VoIP applications while playing an intensive game can assign only a portion of their cores to the game to ensure their system has enough resources to handle both at once.
This means you may see 6 on a 4 core processor, or 12 on a 6 core Ryzen , for example. For the most part, all you need to consider is the ratio available of cores your program is getting, not which ones. This takes two forms: a focus on programs or a focus on background apps, with the former being the default. Sign in. A process is only allowed to run on the processors configured into a system. Therefore, the process affinity mask cannot specify a 1 bit for a processor when the system affinity mask specifies a 0 bit for that processor.
On a system with more than 64 processors, the SetProcessAffinityMask function can be used to set the process affinity mask only for processes with threads in a single processor group. Use the SetThreadAffinityMask function to set the affinity mask for individual threads in multiple groups.
This effectively changes the group assignment of the process. Multiple Processors.
0コメント