[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

200.0. "Timer Service Accuracy" by SANFAN::HAYESJO () Wed Jan 29 1986 23:54

How accurate are VMS Timer Services?

Specifically, I have to write an application that sends 3-4 line messages
out of up to 20 async terminal ports.  Each port will have a separate
"script" of the messages to be sent and the delay between each message.
I'd like to use the Timer Services to handle the delay between messages,
but I'm concerned about the delay accuracy when we're driving 20 ports.

BTW, this is on a uVAX-II, with most of the ports being 300 or 1200 baud.
The desired timer accuracy is 0.1 seconds.

Also, would it be better to single-thread all of the output processing
through one process or multi-thread output with 1 process/port or some
other scheme?

Regards!
John

T.RTitleUserPersonal
Name
DateLines
200.1SANFAN::HAYESJOWed Jan 29 1986 23:563
BTW, I see I got Note 200!  Do I get a prize?

John
200.2MAASSG::RMURPHYThu Jan 30 1986 02:5915
Hi John!
Well, with some care, using timer services should provide you the accuracy
that you need. By care I mean that you should make sure that when a timer
fires, the process doing the output is not pre-empted by some other process.

As far as the design is concerned, I would probably use a single process,
with AST's scheduled to do the output. You'll just have to make sure that
this process has enough buffered I/O count, bytlm, and astlm to do all the
outputs as necessary. Do the output operations with $QIO (not QIOW) to
minimize the AST latency.

With a little thought, it shouldn't be that hard to meet a 0.1 second
accuracy goal. It seems to me that decoding the "Scripts" would be
more work than doing the outputs themselves...
	-Rick