For example, I have four threads in Central Processor, so why doesn’t running a software that can only use a single thread occupy all the resources of the first core, but 25% of each thread?
What you want is realizable. This API can be called on different operating systems, sched_setaffinity can be called on linux, and SetProcessAffinityMask can be used on windows, which is to bind a specific thread to run on a specific Central Processor stone. Of course, as you said, a thread completely occupies all the operations of a Central Processor, which cannot be realized in the user state. The current operating system is the scheduling meeting to schedule the program. The kernel state can run, this requires you to take the initiative to schedule, otherwise, the whole machine will appear false death phenomenon, the machine did not respond, but it is actually an infinite loop.