[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | VAX and Alpha VMS |
Notice: | This is a new VMSnotes, please read note 2.1 |
Moderator: | VAXAXP::BERNARDO |
|
Created: | Wed Jan 22 1997 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 703 |
Total number of notes: | 3722 |
384.0. "Question on accuracy of SYS$SETTIMR" by HGOVC::EDMONDLEUNG () Wed Mar 26 1997 09:45
Hi,
I've received a mail attached below from a customer asking the time
accuracy between the VAX and Alpha Systems. Can anyone provide
suggestions on this issue?
Subject: Question on accuracy of SYS$SETIMR.
I have a question about system service SYS$SETIMR on Alpha platform:
IS THERE ANY DIFFERENCES OF SYS$SETIMR BETWEEN VAX AND ALPHA PLATFORM?
[detail] ~
Our system want to have millisecond level time accuracy for some functions,
and we check the time period set by $SETIMR. On VAX platform, there is non
specific problem, but when we move the code to Alpha platform, we found the
accuracy is no longer valid.
According to the OpenVMS System Services Reference Manual, it states
"On AXP systems, if a specified absolute time value has already passed, the
timer expires within 10 milliseconds." How about if delta time is applied,
what is the deviation for the timer expiration?
and "On VAX systems, if a specified absolute time value has already passed,
the timer expires at the next clock cycle, which is within 10 milliseconds."
I'm not sure the difference between VAX and Alpha, would you pls explain it
more.
I have performed some tests using the system service $SETIMR on both
platforms, the test program and results are attached, and I found the
performance of a 3196 machine is more stable than AlphaServers 2100 and 4100,
especially in shorter timer time period.
Hope you can give me more information and resaon about the difference of the
system service on the two platforms. Many Thanks!
[INHERIT('sys$library:starlet.pen')]
PROGRAM test_$SETIMR (INPUT,OUTPUT);
(* AXP Jordens Temporary Debugging Use *)
[EXTERNAL,ASYNCHRONOUS] PROCEDURE LIB$PUT_OUTPUT;
EXTERN;
TYPE
$quadword = [UNSAFE] RECORD
L0 : UNSIGNED;
L1 : UNSIGNED;
END;
VAR
time_str : [VOLATILE] PACKED ARRAY[1..11] OF CHAR;
sleep_time_str : PACKED ARRAY [1..40] OF CHAR VALUE ' 0 00:00:00.20';
do_time_str : PACKED ARRAY [1..40] OF CHAR VALUE ' 0 00:00:10.00';
sleep_time : [VOLATILE]$QUADWORD;
do_time : [VOLATILE]$QUADWORD;
i_status,x : [VOLATILE]INTEGER;
[ASYNCHRONOUS, UNBOUND]
PROCEDURE set_timer;
BEGIN
TIME(time_str);
LIB$PUT_OUTPUT(%STDESCR time_str);
i_status := $SETIMR (daytim :=sleep_time, astadr :=set_timer);
END;
BEGIN
TIME(time_str);
WRITELN(time_str);
i_status := $BINTIM (timbuf:=sleep_time_str,timadr:=sleep_time);
i_status := $BINTIM (timbuf:=do_time_str,timadr:=do_time);
i_status := $SETIMR (daytim :=sleep_time, astadr :=set_timer);
x := 0;
REPEAT
TIME(time_str);
WRITELN(time_str,' MAIN LOOP ',x,' sec past...');
i_status := $SETIMR (efn:=2,daytim :=do_time);
i_status := $WAITFR(efn:=2);
x := x + 10;
UNTIL x = 600; {10 minutes}
WRITELN(i_status);
END.
17:01:20.53
17:01:20.55 MAIN LOOP 0 sec past...
17:01:20.75
17:01:20.95
17:01:21.15
17:01:21.35
17:01:21.55
17:01:21.75
17:01:21.95
17:01:22.15
17:01:22.35
17:01:22.55
17:01:22.75
17:01:22.95
17:01:23.15
17:01:23.35
17:01:23.55
17:01:23.75
17:01:23.95
17:01:24.15
17:01:24.35
17:01:24.55
17:01:24.75
17:01:24.95
17:01:25.15
17:01:25.35
17:01:25.55
17:01:25.75
17:01:25.95
17:01:26.15
17:01:26.35
17:01:26.55
17:01:26.75
17:01:26.95
17:01:27.15
17:01:27.36
17:01:27.56
17:01:27.76
17:01:27.96
17:01:28.16
17:01:28.36
17:01:28.56
17:01:28.76
17:01:28.96
17:01:29.16
17:01:29.36
17:01:29.56
17:01:29.76
17:01:29.96
17:01:30.16
17:01:30.36
17:01:30.55 MAIN LOOP 10 sec past...
17:01:30.56
17:01:30.76
17:01:30.96
17:01:31.16
17:01:31.36
17:01:31.56
17:01:31.76
17:01:31.96
17:01:32.16
17:01:32.36
17:01:32.56
17:01:32.76
17:01:32.96
17:01:33.16
17:01:33.36
17:01:33.56
17:01:33.76
17:01:33.96
17:01:34.16
17:01:34.36
17:01:34.56
17:01:34.76
17:01:34.96
17:01:35.16
17:01:35.36
17:01:35.56
17:01:35.76
17:01:35.96
17:01:36.16
17:01:36.36
17:01:36.56
17:01:36.76
17:01:36.96
17:01:37.16
17:01:37.36
17:01:37.56
17:01:37.76
17:01:37.96
17:01:38.16
17:01:38.37
:
:
:
up to 600 seconds
T.R | Title | User | Personal Name | Date | Lines |
---|
384.1 | Been Discussed Before... | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Wed Mar 26 1997 10:16 | 16 |
|
I'm quite certain this topic has been raised before, and has been
discussed at some length before. Try a COMET search.
Discussions of the Alpha cycle counters and the usual centisecond
granularity of some of the major system operations is one of the
common threads... Check this and previous versions of this
conference, as well as the DECC conference (I think that's where
the cycle counters were most recently discussed), and check the
current and previous versions of the AlphaNotes conference.)
You will want to find out if this is a whim, or if this is a hard
application requirement. You will also want to find out if the
application requires fine granularity, or high accuracy, or close
syncrhonization -- these are not necessarily the same...
|