Sujet : Re: Apache + mod_php performance
De : cross (at) *nospam* spitfire.i.gajendra.net (Dan Cross)
Groupes : comp.os.vmsDate : 11. Oct 2024, 13:35:48
Autres entêtes
Organisation : PANIX Public Access Internet and UNIX, NYC
Message-ID : <veb634$dk9$1@reader1.panix.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
20241011131151.00003a02@yahoo.com>,
Michael S <
already5chosen@yahoo.com> wrote:
On Thu, 10 Oct 2024 23:01:13 -0400
Dave Froble <davef@tsoft-inc.com> wrote:
[snip]
Actually, simple.
1) Create the socket in listener process
2) Pass device name to worker process
3) Assign a channel to the device in worker process
4) deassign the channel in listener process (if desired)
>
There are few pieces in your simple explanation that I don't understand:
- How does listener get a device name?
There's a system service (system call) that let's you do that;
it is called `$GETDVI` ("GET Device/Volume Information"). There
is a wrapper in the standard library that makes it a little
easier to work with, `LIB$GETDVI`.
- What is "channel"? Is it the same as 'socket'?
A channel is a process-unique identifier for some resource you
want to interact with, such as a device or mailbox. A rough
analogue from the Unix/Linux world is a file descriptor. On VMS
a socket is a "device", so to interact with it, you must
associate a channel with it.
- How one "assigns" channel to device? I would guess that device has to
be open before that?
There's a system service for that. Section 7.5 of the "VMS
Programming Concepts (volume 2)" manual on the VSI web site goes
into detail about exactly how to do it, but `$ASSIGN` takes a
devine name and allocates and assigns a channel to it.
- Is device name of the socket system-global?
Yes.
If yes, does it mean that any process in the system that happens to
know a name can open a device and assign it to channel?
No, there are authorization checks and so forth that the system
makes before assignment completes successfully; there's also the
matter that, if a device is already assigned exclusively, by
default it can't be assigned to another process at the same
time. That's what all of this business about the SHARE
privilege is about; section 7.2.8 of the programming concepts
manual talks about this, but basically, if a process has the
`SHARE` privilege, it can `$ASSIGN` another device accessed
"exclusively" by another process's device. A subprocess of a
process can also assign a channel to a device that's assigned
to the parent (I dunno if that last bit is always true; it was
in section 18.3 of the "VAX/VMS Internals and Data Structures"
book for VMS 4.4, which is pretty old).
- Dan C.