Thread View: comp.sys.transputer
2 messages
2 total messages
Started by Christopher Gray
Thu, 06 Dec 1990 10:29
Polling using a hard channel
Author: Christopher Gray
Date: Thu, 06 Dec 1990 10:29
Date: Thu, 06 Dec 1990 10:29
20 lines
1430 bytes
1430 bytes
I am developing an application in which it would be desirable to poll a hard channel to determine whether or not a remote process is ready to communicate over the hard channel. Unfortunately this cannot be done in occam and there appears to be no machine level instruction which allows this. The application uses the routine OutputOrFail.t (from the occam support library xlink.lib). With a "delay" of zero, this routine always returns "aborted" for a hard channel even if there is a remote process ready to communicate. This is because communication over a hard channel always results in descheduling of the communicating process. Unfortunately, setting timeout = (small value) also causes problems due to the unknown length of time that the message takes to read/write on a hard link. Significantly, polling using soft channels produces no such problems and works fine. However, when using hard channels there appears to be no way to achieve polling using software, at whichever level: occam; occam support library; machine code.
Re: Polling using a hard channel
Author: Jonathan Greenfield
Date: Tue, 18 Dec 1990 18:10
Date: Tue, 18 Dec 1990 18:10
34 lines
1974 bytes
1974 bytes
In article <8685.9012070015@pyrltd.pyra.co.uk> chris@alsys.UUCP (Christopher Gray) writes:
>I am developing an application in which it would be desirable to poll
>a hard channel to determine whether or not a remote process is ready
>to communicate over the hard channel.
>
>Unfortunately this cannot be done in occam and there appears to be no
>machine level instruction which allows this.
I am confused about the problem here. I have not had any trouble in
polling "hard" occam channels. Any occam channel (hard or soft) can
be "checked" for the presence of a message using a PRI ALT statement.
i.e., PRI ALT
hardchannel?somevalue
SomeProcess()
TRUE & SKIP
SomeOtherProcess()
The TRUE & SKIP alternative provides an exit after an unsuccessful
communication attempt. The PRI ALT forces the first alternative to be
chosen, if possible. I have never detected any difference in the functioning
of such structures for hard and soft channels.
Of course, because occam only supports input polling, one must finagle in
order to check whether a process is ready to input--like having the input
process first send a request/ready output. This may be more overhead than
you want, but it does work.
Is this what you were interested in?
greeny greeny@top.cis.syr.edu
"What's the difference between an orange?"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads