Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

modern timers in DOS (32bit) (Developers)

posted by RayeR Homepage, CZ, 18.05.2022, 22:40

TSC should be mostly accessible also under pmode OSes (not privileged level required). But maybe after Spectre/Meltdown bugs was revealed some OSes might changed policy to not alow user read TSC anymore (disable the bit) :\
Also TSC may have some quirks like it may depend on current CPU multiplier or clock modulation, the behavior has changed during CPU generations. Also under multicore OS without setting the affinity to a single core your program may read TSC of a different CPU core that may be desynchronized due to dynamic multiplier changing and core parking everytime and you end with a insane time difference...
Also modern CPUs has some performance counters but I never tried them.

And finally some warning that CPU may spend some random time inside SMI handler that has higher pririty over any common INT and you don't have control over it so don't rely with a PC on generating precise timing waveforms, for such case use some dedicated microcontroller...

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 182 users online (0 registered, 182 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum