From: BUHLE@XRT.UPENN.EDU ("E. Loren Buhle, Jr. [-662-3084]", 215)
Newsgroups: comp.os.vms
Subject: Re: vms posix
Date: 9 Oct 92 12:31:00 GMT
Organization: The Internet

>Todd Wipke writes :
>
>>I am interested in people's opinions about vms posix.  We are developing
>>C programs that will run in Ultrix and VMS environments interchangeably.
>>It looks like we have to give up indexed-sequential files which we used
>>on vms.  I would like to hear the good and "other" comments about vms
>>posix and your experience using it, or attempts thereof.
>
>You mean other than the fact that it is v-e-r-y--s-l-o-w-!!!

Please don't confuse POSIX the Standard with the VMS implementation. POSIX 
stands for Portable Operating System INTERFACE. POSIX compliance means a vendor 
has implemented a product complaint with the standard. The standards says 
nothing about HOW it is implemented. So a POSIX complaint application, running 
on a POSIX compliant platform, will appear the same, etc. If VMS_POSIX 
engineering decides to use a lousy UCX interface to do all of its I/O, then the 
implementation suffers. 

If a POSIX application uses the POSIX fork and exec calls repeatedly, the 
implementation on an Ultrix platform will be swift, but under a VMS platform 
will be quite slow (even if you INSTALL it, make alot of the data area 
readonly, etc.).

Does this mean you shouldn't use POSIX . . . well if you care about 
portability, no! The implementation will be improved. The VMS machines will get 
faster, etc. It reminds me of DECWindows running on a VAX 750. Yes, it can be 
run on a VAX750 (0.75VUPS?), but the performance would be a dog. If it is 
tolerable for development, I can live with it. More likely, I moved to a faster 
machine. It is consoling that I can run my DECwindows applications on ANY VAX 
(that has the current rev of DECwindow installed). The same is true with POSIX, 
except POSIX goes across many platforms....

>
>Perhaps someone can enlighten me, but it appears that posix is basically
>just a shell on top of VAX/VMS. If that is the case, than what really is
>the point ?

It is not simply wrapper code that translates into VMS code. No, POSIX goes
well into the VMS kernel. There were VMS kernel mods put in V5.5 of VMS to 
account for VMS. There will probably be further kernel mods put in VMS V6.1 to 
extend the VMS_POSIX implementation beyond the C-interface (yes, VMS_POSIX
implementors didn't think to allow ADA (POSIX.5) and Fortran (POSIX.9) binding
to VMS_POSIX . . .though this can be worked around).

So the POSIX.2 (Shell and Utilities) goes way beyond the DEC product DEC/Shell.

>
>I just today had a conversation with a DEC support guy about 'Open Systems'
>and his statement was that 'Open Systems are built, not bought'. That seems
>to make some sense to me : I can write a C program under VAX/VMS that, as long
>as I use Unix and stdio calls, will compile cleanly under Ultrix. Likewise,
>I can just as easily include $QIO calls and $CREPRC calls which will make my
>code entirley non-portable on anything BUT VAX/VMS. It's my choice.

True, if your code doesn't call system calls not implemented in C. For example,
how do you deal with the "fork" call in VMS/Ultrix portable code? How do you
write shared memory code for VMS/Ultrix? No, using compiler directives misses
the point. The purpose of POSIX.1 is to define an interface to the operating
system. 

>
>              {material trimmed }
>
>Although perhaps I am being a bit obtuse, and perhaps intentionally, the reason
>why I like to develop in a VMS environment is because of all the non-portable
>extras, like the CLI$ and RMS routines, which cannot be supported under an

If you want speed, you write code that directly deals with the native 
environment. Use your hardware at its fastest. I can no longer write fully 
optimized assembler that uses every VAX/Alpha hardware at its fastest, so I use 
settle for using a compiler. With Alpha on the horizon, I have to make that 
compiler "C". As I move to a higher level language, the amount overhead 
increases (Aside: I always wondered how much faster a VAX running RT11 
would be compared with a VAX/VMS machine?). That is the price we all pay. 

If I want to run my applications on other platforms, I have to replace all of 
my VMS specific page-frame mapping routines (used to do I/O) and other goodies 
I've slaved over to open my bottlenecks. 

Quite frankly, I feel the increasing speed of today's computers well outstrips 
my ability to write faster code. If I could write code that doubles/triples in 
performance every year or two, I am either [a] a truely horrible programmer or 
[b] truly a wizard. 

>'Open' system. On the other hand, if I am concerned with portability, why not
>develop under OSF-1 or one of the many U*IX's where I can get a much better 
>price/performance ratio ? 
>
>In all seriousness, can someone please tell me what I am missing ?

Alot. POSIX is for today. POSIX runs on alot of non-UN*X platforms, including 
VMS, Burroughs, MVS, etc. Go ask your big blue shop to convert their ES9000 to 
OSF. On the other hand, if their OS supports POSIX . . . I can running my 
compliant application here.

{soapbox time}
Saying everyone should run OSF is much like Microsoft saying their MS-Windows 
environment is "open". If everyone ran MS-Windows, then portability (in theory) 
would be assured, they say. Did we hear this from salesmen in pin-stripe suits 
in the 60s/70s about their environments?

>
>Dave.

So Dave, thoughts & comments?
>
>--

--
Dr. E. Loren Buhle, Jr.  INTERNET: BUHLE@XRT.UPENN.EDU
DECUS Standards Representative to POSIX & Vice-Chair of POSIX.9
University of Pennsylvania School of Medicine         Phone: 215-662-3084
Rm 440A, 3401 Walnut St., Philadelphia, PA 19104-6228   FAX: 215-349-5978

Newsgroups: comp.os.vms