From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,894846be18e92713 X-Google-Attributes: gid103376,public From: "Brian K. Catlin" Subject: Re: ADA, Windows NT and Real-Time (was GNAT R/T Annex and Win95) Date: 1996/04/21 Message-ID: <317AACB2.2C8D@ccmail.orl.mmc.com>#1/1 X-Deja-AN: 150691849 references: <96041916380674@psavax.pwfl.com> <317916B0.A5C@ccmail.orl.mmc.com> <4ldqbf$kmq@news.pacifier.com> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Real 3D mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.01 (WinNT; I) Date: 1996-04-21T00:00:00+00:00 List-Id: Steve Doiel wrote: > > In <317916B0.A5C@ccmail.orl.mmc.com>, "Brian K. Catlin" writes: > >processor clock rate !). NOTE: The granularity of the timer service on PC (Intel) > >platforms is 10 milliseconds (ancient PC architecture standard). > > Details, details but: According to the OS/2 Control Programming Guide (regarding timers on > PC hardware) "On most hardware, clock ticks occur approximately 32 times a second, so each > tick interval lasts approximately 31.25 milliseconds." > I guess I should have said "running Windows NT" > The 10 msec number didn't sound right, since most of the real time OS's I've usd have had > a 10 msec timer. But then again on the systems I've done they're mostly event driven > so the resolution of the system timer isn't that significant. > I agree that most real-time applications are event driven, but regarding the timers: Every "IBM PC Architecture" compliant system includes at least one 8254 Programmable Interrupt Timer (or equivalent), which contains three independent 16-bit timers. Timer 0 is used as the primary system timer. Timer 1 is used for DRAM refresh on ISA systems, and is not supported on MCA systems. Timer 2 is for general application use, including speaker tones. MCA and EISA systems alos provide a fourth counter, Timer 3, used as a Watchdog timer. EISA systems also have a fifth counter, Timer 5 (not 4), used for optional CPU speed control. >From MS Developer Network CDROM: Windows NT Workstation version 3.5 makes it possible for applications to use the basic system timer with the GetTickCount( ) API. The resolution of this timer is 10 milliseconds. Several CPUs support a high-resolution counter that can be used to get very granular resolution. The Win32 QueryPerformanceCounter( ) API returns the resolution of a high-resolution performance counter. For Intel-based CPUs, the resolution is about 0.8 microseconds. For MIPS-based CPUs, the resolution is about twice the clock speed of the processor. You need to call QueryPerformanceFrequency( ) to get the frequency of the high-resolution performance counter. Now that we've beat this timer issue into the ground, the original question was, "Can NT be used for real-time systems ?". As I said originally, it can, *provided* that you understand your platform thoroughly. -Brian -- Brian Catlin, Sannas Consulting (310) 798-8930 Contracting to Lockheed Martin Real-3D (407) 356-0637 Windows NT Internals and Device Driver Consulting