- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For a hyper-threaded core, does one logical processor have a dominance over the other one?
If a high-priority thread is running on one of the logical processors, can it have it's CPU resources stolen by a low-priority thread running on the other logical processor of the same core?
Thanks,
-ken
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes.
The priority relates only to priority of being scheduled to run. If 2 threads are runable on a single processor with HT then both threads will run regardless of priority. Both running threads will have approximately the same resources available wether used or not. An HT system has two integer execution units, one floating point pipeline, one cache system, one memory bus. Depending on the mix of integer and floating point and cache activity it is possible that one of the threads (either one) could get much more work done than the other thread. With more than two runable threads, the lower priority thread gets run less often (and/or for shorter durations).
Additional information. If you wrote the multi-threaded application for use on an HT system (no 2nd processor with HT) and you have 2 compute bound threads, the low priority busy looking (waiting) for things to do, then consider inserting a call to _mm_pause(); in the "looking for things to do" loop. On the other hand, if your compute application has but one thread, and some other process is running on the system which is eating up computation time then add a thread to your compute bound application (or write a seperate program) that runs as high (elevated)priority and does little but call _mm_pause();. What this will do is essentially occupy one of the HT threads for the duration of the application.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page