[Info-vax] Looking into C-include files on VMS
John Wallace
johnwallace4 at yahoo.co.uk
Wed Nov 4 16:44:29 EST 2009
On Nov 4, 8:38 am, billg... at cs.uofs.edu (Bill Gunshannon) wrote:
> In article <WELl3PK2e... at eisner.encompasserve.org>,
> koeh... at eisner.nospam.encompasserve.org (Bob Koehler) writes:
>
> > In article <7ktlhfF3af5v3... at mid.individual.net>, Bob Eager <rd... at spamcop.net> writes:
>
> >> Exactly. It 'costs' quite a bit more. Fair enough, but it means that a
> >> proper port ought to consider those issues and not just do them 'the UNIX
> >> way'.
>
> > Yes, processes on VMS are heavier, and process creation costs more.
> > Which is why in porting fork() stuff from UNIX I generally prefer
> > to replace multiple forks with multiple POSIX threads. Only
> > create a process if you need a new executable in it.
>
> fork() is more than just creating a news process. It is not just
> the overhead that make sit a show stopper on VMS. It is also things
> like sharing all the variable and open files/devices. Unless things
> have changed considerably since the last time I tried it VMS just
> flat out can't do that.
>
> bill
>
> --
> Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
> billg... at cs.scranton.edu | and a sheep voting on what's for dinner.
> University of Scranton |
> Scranton, Pennsylvania | #include <std.disclaimer.h>
How on earth do folk think VMS got the "Single UNIX Specification"
branding it got back in 1992, before most of the well known UNIXes
achieved it?
VMS got it back then because by that time it had been engineered to be
a POSIX (SPEC 11/70, SUS, whatever) compliant operating system. To get
that status, regardless of what Bill may or may not have seen, an OS
had to be able to do fork/exec and ALL the *agreed* *standardised*
things that defined the important behaviours of a UNIX-like OS. If
folk want to look the standards up, they'll be out there somewhere,
and they needed a bit more portability than printf("hello world\n");
VMS POSIX was the software that did that back then, but those
customers who'd said they wanted "open standards" before they'd spend
money with DEC promptly ignored VMS POSIX in droves, leading to its
eventual retirement (as readers can probably imagine, bits of it had
rather intimate knowledge of VMS OS internal structures). The docs are
probably still out there somewhere, if folk want to see the full
extent of what it let you do.
There are (or were) others out there better qualified than I am to
talk about this stuff, but I thought something needed saying.
And even before there was VMS POSIX, if you were really really
desperate you could get fork/exec and other UNIX-like behaviours on a
VMS system if you were prepared to put up with Wollongong's Eunice, a
layered product implementing a BSD4.3 runtime environment, something
which in some ways was a miracle of software engineering and in others
was a nightmare.
Perhaps that's all outside the world Bill's seen though. Fortunately
that doesn't also mean it can't ever have been done.
Bill's negative reply to "I presume VMS has some way to share data
when needed, though." is also a bit misleading, though tbh I'm not
sure quite what "same way to share data" meant in this context (we had
been talking about fork/exec, but...).
Although VMS POSIX the product has gone, some of the UNIX-style
functionality lives on and indeed is still being enhanced, in the C
RTL, in RMS, wherever it needs to be.
If "some way to share data" meant "shared memory" then someone whose
knowledge of VMS's Posix (shm_open() etc) and System V (shmget() etc)
shared memory APIs is more up to date than mine will be able to
enlarge on that, if anyone's interested.
POSIX-style threads and similar functionality for concurrent threads
in the same address space (another way of sharing data) have been
around for VMS applications for a very long time.
Etc.
Now obviously it's not enough for everybody's applications, especially
those that are already written with a substantial codebase and ill-
separated OS interfaces, but imo it's enough to be worth a mention
(and it's a shedload more than you get with a Window box, give or take
a Cygwin and a Mingw).
Hth,
John
More information about the Info-vax
mailing list