Name: cwingho Date: September 4, 2007 at 09:33:17 Pacific Subject: TCP and QIO OS: VMS Alpha CPU/Ram: 617 Hz Model/Manufacturer: Digital/DS10
Comment:
I am designing a communication process on a VAX that communicates as a client to the outside world at one end and as a server to another end where there is a running application on the same machine. I would like to know if my concept is correct: Since I don't want to check the arrival of messages periodically so I will use a TCP socket to talk to the outside world and a QIO with AST to the backend application. I was told that the TCP socket has a higher priority then the QIO, so the process goes into hibernation at the QIO waiting for a incoming message to kick off the AST. The AST will then disable the read attribute of the the TCP socket, process the message, send it out through the socket, and then restore the socket to read mode for reply from the remote server by setting the select command with infinite timeout, it then followed by hibernation at the QIO to complete the cycle. The essense of my design is based on the assumption of TCP socket has a higher priority than QIO/AST. If my assumption is wrong, what is my alternative? My goal is to put the process into a sleep mode instead of checking for messages at both ends using a round-robin fashion.
I would re-check the information that you are depending on. It is also quite possible that something has been lost in the wording of the post.
Basically, when as AST arrives, it preempts the normal thread of processing. The processing associated with the AST is executed, and then the AST exits. ASTs can occur at almost any time, except when explicitly disabled or when another AST is already executing (I strongly recommend against ever disabling ASTs).
The best way to implement the functionality described in this post is as a collection of AST routines, some associated with QIO operations to the TCP pipe associated with the client connection and some associated with the connection to the downstream server.
Bob, thank you for the reply. If AST interrupts the normal flow of a process, then it has the highest priority and above that of a TCP socket waiting for something to read, so I got the whole thing reversed. Based on that I should let the socket wait forever and let the AST do the processing when a message arrives from the applications. I will also try if your suggestion will work, i.e., use AST at both ends of the communications, the only thing I am not sure is whether a TCP socket select function can call an AST though. I have looked at your 1995 presentation on AST, you recommended using queue to insert and remove queued messages. I will see if I can incorporate a LIB$INSQHI & LIB$REMQTI at the server's end to do the job. Thanks. again P.S. I cut and pasted my original msg, must have missed a couple of words. Thanks for adding them back in. CWH
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE