- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear friends,
In theory, can we achieve constant execution time on Pentium 4 (with and without Hyper-Threading Technology) ? How?
Sincerely,
ARINTEL
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
what do you mean? Constant execution time for some program, which will be the same each time it runned? With clock-to-clock accuracy?
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
That's exactly what I meant.
I tried the following things with the routine that I wanted to have constant execution time:
1. Put it in kernel mode of Windows XP running at the highest IRQL (31) -> only be interrupted by NMI
2. The routine contains a loop which repeats 10 times the same task: processing data and measuring CPU clock cycle. I take the last measurement as the final result.
3. On P4 with Hyperthreading, I made the second logical processor get stuck in a spin loop while the other processor was processing the routine.
With those things, I could achieve 99.99% constant execution time for the routine on all Celerons and Pentiums except Pentium 4 (with or without HyperThreading).
On P4,the measurement result constantly fluctuates in some range, though small.
Thanks!
That's exactly what I meant.
I tried the following things with the routine that I wanted to have constant execution time:
1. Put it in kernel mode of Windows XP running at the highest IRQL (31) -> only be interrupted by NMI
2. The routine contains a loop which repeats 10 times the same task: processing data and measuring CPU clock cycle. I take the last measurement as the final result.
3. On P4 with Hyperthreading, I made the second logical processor get stuck in a spin loop while the other processor was processing the routine.
With those things, I could achieve 99.99% constant execution time for the routine on all Celerons and Pentiums except Pentium 4 (with or without HyperThreading).
On P4,the measurement result constantly fluctuates in some range, though small.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
there are might be many reasons for that. For example hardware prefetcher on Pentium 4 can optimize memory accesses after it accumulate enough history.
Regards,
Vladimir
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page