flat assembler
Message board for the users of flat assembler.

Index > Main > Giving the cpu some rest

Author
Thread Post new topic Reply to topic
tthsqe



Joined: 20 May 2009
Posts: 767
tthsqe 25 Aug 2013, 16:59
Is it possible to put a thread in a low power state in finer granularities than those provided by Sleep? I would like to do a function f N times a second (N > 60, say), and reading a performance counter in a loop obviously eats a lot of the cpu.
Post 25 Aug 2013, 16:59
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4073
Location: vpcmpistri
bitRAKE 25 Aug 2013, 20:59
Intel chipsets have a high performance timer with triggers at interval. Although Windows does the scheduling, some of this functionality is exposed through the API, iirc. There are limited number of triggers in the hardware. So, some sort of management is required to provide a general interface.

http://en.wikipedia.org/wiki/High_Precision_Event_Timer
Post 25 Aug 2013, 20:59
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.