![]() |
AW: exakte Zeitmessungen auf Multiprozessoren
Zitat:
Man kann höchstens seinen Thread an einen Kern binden und muß alle anderen Threads von diesem Kern bannen. (du wirst nur nicht auf alle Threads Zughrif haben und neuerstelle Threads gehen dir schnell mal durch die Lappen) Da Windows (und bestimmt auch Linux, Mac und co.) überall Fensterorientiert arbeitet, kann man solche Zeiteinheiten nahezu vergessen. Die Programme Threads werden in Zeitfenstern abgearbeit, also ein paar Millisekunden für diesen Thread, dann wieder ein paar für einen anderen Thread. Wie diese Zeitfenster verteilt sind, verrät Windows nicht ... es wird nur gesagt, daß dieses sich dynamisch je nach Prozessorauslastung anders verhält. (wieviele Kerne, wer wo laufen darf und wieviel die Threads grade arbeiten und dann wird noch verteilt wer gerade auf welchem Kern arbeitet) Zitat:
Und schon kannst du deine Microsekunden vergessen Das Einzige was geht, und das auch nur, wenn der Messvorgang kürzer ist als das verfügbare Zeitfenser. Zitat:
Windows ist nunmal (standardmäßig) kein RealTimeSystem. Was man machen kann, wenn man schnell auf etwas Reagieren muß/will ist, mit Interrupts zu arbeiten (also quasi auf Treiberebene) |
AW: exakte Zeitmessungen auf Multiprozessoren
|
AW: exakte Zeitmessungen auf Multiprozessoren
Enhanced Timer
This Enhanced Timer (Etimer) is based on two Windows* API functions; QueryPerformanceCounter and QueryPerformanceFrequency. There is no way to know which frequency Microsoft is using to implement those two functions on any given platform. But one thing for sure is that the frequency of that timer will never change during the course of timing. The timer can be either the chipset timer or the power management timer or something else. ![]() ![]() With Multi-threaded Applications in Multi-Processor Systems The Etimer can also be used in Multi-processor systems. Since the time retrieved from the timer will be slightly different on different processors it is important that the start and stop time be taken on the same processor to ensure accuracy. The Etimer was developed to deal with multi processors. It first searches for the available processors and uses the first one available. The processor ID of the processor is used to take the initial reading and is stored in the Etime_t variable so that the final reading will be measured on the same processor. If no processor is available or the processor where the start time was taken is not available, the Etime function will return an error code. ![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:57 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz