Suppose that on a computer capable of processing n simultaneous threads, one wishes to launch n-m single-thread jobs where m is the number of threads currently in use. How is m defined and by what means can its value be determined? For instance, on an unshared system with two sockets containing quad-core processors with SMT and no active processes beyond those ordinarily run by the system in the background, a user might launch 16 single-thread processes without worrying too much about process interference (cache misses, etc.). Can one simply consider the number of threads of each user-owned process? Given that processors can rapidly change threads, I assume the determination would involve more than that. Would a determination be better made by considering the total number of virtual cores and estimated overall CPU usage?

  • I'm not sure it works that way, unless I'm misunderstanding your question or the meaning of "thread" – ILMostro_7 Oct 7 '17 at 9:11
  • @ILMostro_7: I was using the term in both the hardware and software senses. I would like to determine the number of available hardware threads or conversely the number of occupied hardware threads, which I suppose could be done by examining the software threads of user-owned processes. – user001 Oct 7 '17 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.