Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Wed, 4 Dec 2024 10:01:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Timer resolution for sys$setimr() ? Newsgroups: comp.os.vms References: Content-Language: en-US From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 70 Message-ID: <67506eb6$0$712$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: fb1dbf30.news.sunsite.dk X-Trace: 1733324470 news.sunsite.dk 712 arne@vajhoej.dk/68.14.27.188:56500 X-Complaints-To: staff@sunsite.dk Bytes: 3311 On 12/4/2024 8:37 AM, Simon Clubley wrote: > What is the actual resolution of timer events queued using the > sys$setimr() system service ? > > NOTE: this is about when the timer becomes eligible to fire, not when > it actually does, given that VMS is not a hard RTOS. > > The base VMS time format is in 100ns units, but I couldn't see anything > about the units actually used when firing timer events. Is it the same > as the hopeless terminal driver timeouts, or is it 100ns, or is it > something in between ? IDS VMS Alpha 1.5 (30 years old!) says: 12.2.1 All AXP systems provide an interval timer that generates an IPL 22 interrupt at the minimum rate of 1000 times per second, with a minimum accuracy of 0.0005 percent. .... All current available AXP systems generate interval timer interrupts at a rate of 1024 per second. .... 12.6 The interval timer interrupt service routine, EXE$HWCLKINT .... It checks whether the most imminent TQE is due .... only the primary CPU is responsible for ... and checking the timer queue .... EXE$HWCLKINT compares the updates system time with the quadword EXE$GQ_1ST_TIME, the expiration of the most imminent TQE. If the TQE is due then, EXE$HWCLKINT checks whether the specific fork block for the software time fork routine has already been inserted into the primary processors IPL 8 fork queue. If not the, it inserts the fork block into the queue, and, if the queue was empty, requests an IPL$_TIMER software interrupt. .... 12.7 The software timer interrupt service routine, EXE$SWTIMINT .... The software timer interrupt is requested by the interval timer interrupt service routine when the current process has reached quantum end. .... In later versions of VAX VMS and in OpenVMS AXP, an IPL 8 fork process running the software timer fork routine .... 12.8 Thew software fork timer routine, EXE$SW_TIMER_FORK .... If the TQE is a process timer request, created by the a $SETIMR system service request, then EXE$SW_TIMER_FORK performs the following operations: .... EXE$SWTIMER_FORK invokes SCH$QAST to queue the ACB to the process which I read as if that on Alpha then VMS checks for SYS$SETIMR AST's to queue every 1 millisecond. No guarantees when the AST's will actually run. And some things may have changed in newer VMS versions and newer hardware. Arne