flat assembler
Message board for the users of flat assembler.
Index
> Main > tasks switching and local-apic timers |
Author |
|
LocoDelAssembly 16 Apr 2011, 23:31
It may be using this: http://en.wikipedia.org/wiki/Programmable_interval_timer
Still, how did you determine it is not using the local APIC? |
|||
16 Apr 2011, 23:31 |
|
bitRAKE 17 Apr 2011, 07:26
Too bad MS doesn't use http://en.wikipedia.org/wiki/High_Precision_Event_Timer for task switching.
|
|||
17 Apr 2011, 07:26 |
|
ouadji 17 Apr 2011, 14:00
@Loco programmable interval timer (PIT)... this no longer exists in moderns pc All functions are contained in the two main circuits, north-bridge and south-bridge "xp" configures this timer with the interrupt 0xfd, but keeps it disable. I reprogrammed this timer with my own interrupt, then redirected to the interrupt 0xfd... xp is never gone through my hook. On the other hand, if I enable this timer with my own code, I intercept it in my hook... but "xp" never. windows (xp) never enables local-apic timers. @bitRAKE thank you for the link but in this case, from where this essential interrupt comes from??? |
|||
17 Apr 2011, 14:00 |
|
LocoDelAssembly 17 Apr 2011, 19:06
ouadji, architecturally speaking (which is the way I was referring to the PIT), it is still available, it is just the physical implementation that changed.
|
|||
17 Apr 2011, 19:06 |
|
Alphonso 18 Apr 2011, 03:25
bitRAKE wrote: Too bad MS doesn't use http://en.wikipedia.org/wiki/High_Precision_Event_Timer for task switching. Are you sure they don't? With Vista and HPET disabled i seem to get timer resolutions consistent with the RTC 32768Hz clock and divider A. ie RTC low nibble of reg A is set to 5 which is 488.281us and NtQueryTimerResolution shows a max resolution of 500.0us but actually gives 488.2us when selected. With HPET enabled reg A low nibble is set to 6 (976.562us) but NtQueryTimerResolution still shows a max of 500.0us and actually gives 500.0us when selected. Doesn't XP also have a boot.ini option to use the ACPI timer instead. It all makes for confusing times. BTW the HPET clocks I've seen have been 14.318180MHz. |
|||
18 Apr 2011, 03:25 |
|
Tyler 18 Apr 2011, 04:02
ouadji wrote:
Is there any reason it couldn't use the RTC? (Other than the fact it is much lower in priority than the PIT.) |
|||
18 Apr 2011, 04:02 |
|
neville 18 Apr 2011, 04:04
ouadji wrote: programmable interval timer (PIT)... this no longer exists in moderns pc I suspect Counter2 is still used for dynamic RAM refresh too - would be very easy to prove by messing with it ..... _________________ FAMOS - the first memory operating system |
|||
18 Apr 2011, 04:04 |
|
Alphonso 18 Apr 2011, 09:05
Okay, I ran a quick RDTSC check on a single thread with another active thread. By measuring a tight loop we can check the difference between two RDTSC's and when greater than say 1000 cycles then we can assume a context switch took place. The quantum (time slice) can be taken as the first RDTSC to the last before a big change was seen. By changing reg A of the RTC down or up one the quantum can be seen to double or half even though Windows still reports the same resolution. Although the RTC daytime clock carries on as normal the Windows time clock is affected.
Some snips from the ICH9 Southbridge.
|
|||||||||||||||||||
18 Apr 2011, 09:05 |
|
revolution 18 Apr 2011, 09:25
Alphonso wrote: Okay, I ran a quick RDTSC check on a single thread with another active thread. By measuring a tight loop we can check the difference between two RDTSC's and when greater than say 1000 cycles then we can assume a context switch took place. The quantum (time slice) can be taken as the first RDTSC to the last before a big change was seen. By changing reg A of the RTC down or up one the quantum can be seen to double or half even though Windows still reports the same resolution. Although the RTC daytime clock carries on as normal the Windows time clock is affected. |
|||
18 Apr 2011, 09:25 |
|
Alphonso 18 Apr 2011, 13:46
Thanks Rev. Also when a resolution change is made (NtSetTimerResolution), reg A can be seen to be changed by Windows when RTC is selected, at least with Vista that is.
|
|||
18 Apr 2011, 13:46 |
|
bitRAKE 19 Apr 2011, 03:29
http://msdn.microsoft.com/en-us/windows/hardware/gg463347.aspx
HPET is used by Vista and newer versions of Windows. |
|||
19 Apr 2011, 03:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.