Mail Archives: djgpp/2001/01/31/17:06:39
but that's not really possible under windows. you can not really get a rid
of all interrupts but the timer and get a rid of all code which is linked to
timer ISR.
--
Alexei A. Frounze
alexfru [AT] chat [DOT] ru
frounze [AT] ece [DOT] rochester [DOT] edu
http://alexfru.chat.ru
http://members.xoom.com/alexfru/
http://welcome.to/pmode/
"Prashant Ramachandra" <rprash AT wilco-int DOT com> wrote in message
news:B5E044AF4430D311B24D0060089CD8B1023ECC9B AT hydmail01 DOT hyd DOT wilco-int DOT com...
> On Wednesday, January 31, 2001 10:03 PM, Alexei A. Frounze
> [SMTP:dummy_addressee AT hotmail DOT com] wrote:
> | >
> | If there's some code which runs upon timer interrupt and the number
> | of
> | instructions there varies from tick to tick, then if we measure time
> | using
> | BIOS tick counter, we end up with certain error due to that code
> | (SMARTDRV
> | is the case). Same thing with RDTSC - if any interrupt happens
> | between the
> | point we read the time (from BIOS tick counter or anything else) and
> | RDTSC
> | instruction and there's a lot of extra code in ISR, RDTSC gives us
> | an
> | adjusted value. These both things lead to a certain error in CPU
> | frequency
> | measurement unless we get a rid of all those interrupts and stuff
> | which
> | takes different amount of time.
> | This is the issue.
>
> The way I usually do this is to disable all interrupts and use the PIT to
> measure a short period of time. Get the TSC value before and after this
> loop. Then, the obvious calculations. That way you won't have to depend on
> the BIOS and it's pretty simple to do this, too.
> --
> Prashant TR <tr AT midpec DOT com>
> Web: http://www.midpec.com/
>
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************
- Raw text -