HDTenEightyP/NetNews huggingface dataset:
From: MILLER@TGV.COM
Newsgroups: vmsnet.internals
Subject: RE: System service calls & access modes
Date: 8 Apr 92 20:10:14 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

>I think this (and Bruce's) is a nifty piece of code, and I'm happy to see it as
>an instruction of approaches to things.

Well, thanks.

>But I'm having a bit of difficulty
>coming up with a concept of what you would use this sort of thing in.  could
>someone post an example of a real use for this piece of code, where normal
>CMKRNL calls would be less convenient?  Something more specific than the
>calling sequence, that is. :-)

The calling sequence is the main thing, of course.  The only other reason
i can think of, off hand, is to have access to all your local variables
without having to pass them through the CMKRNL arglist.  It also makes
your code a little more readable.

And when you get right down to it, just about anything is a matter of
convenience.  As my friend Matt McNally used to say, "BASIC is computationally
equivalent to C".  Choosing one or the other is only a matter of
convenience.

Don't use these routines unless you're absolutely sure you know what you're
doing.

-bruce
----------------------------------------------------------------------------
Bruce R'. Miller, MILLER@TGV.COM        (408) 427-4366  in Santa Cruz CA
        "And through the wire, we can talk..." - PG
Newsgroups: vmsnet.internals
From: warren@atmos.washington.edu (David Warren)
Subject: does anyone know how to uninitialize a disk?
Organization: Dept. of Atmospheric Sciences, University of Washington
Date: Tue, 7 Apr 1992 03:23:13 GMT

Help. Does anyone have a way to recover what was on a disk prior to
the dreaded init command? No one has touched the disk since.
Everything I can find just looks for files with delete pending. these
don't seem to fit that. 
--
David Warren 		INTERNET: warren@atmos.washington.edu
(206) 543-0945		UUCP:	  uw-beaver!atmos.washington.edu!warren
Dept of Atmospheric Sciences, AK-40
University of Washington
DECUS E-PUBS Library Committee representative
SeaLUG DECUS Newsletter Editor
From: MILLER@TGV.COM
Newsgroups: vmsnet.internals
Subject: Re: ALPHA MB instruction
Date: 14 Apr 92 20:31:36 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List


>I was hoping some of the internals guru's who have reviewed ALPHA might
>elaborate on how this concept is similar or different from the VAX spinlock.

The VMS "LOCK" macro (in lib.mlb) contains a MULL3 (multiply w/ 3 operands)
instruction.  Still, MULL3 has little to do with spinlocks, per se.
This is the same case with the MB instruction on the Alpha, as far as I
can tell.

The barrier instructions simply tell the processor not to attempt to optimize
the order of it's r/w operations on the bus.  It's a tiny little bit like
the interlocked instructions on the VAX.  You can find out more by looking
over section 4.11.3.

But hey, I'm no guru.

So, Don, you got an Alpha?

-bruce

----------------------------------------------------------------------------
Bruce R'. Miller, MILLER@TGV.COM        (408) 427-4366  in Santa Cruz CA
        "And through the wire, we can talk..." - PG
Newsgroups: vmsnet.internals,comp.os.vms
From: yates@wctdpv.gd.com (Jeff Yates (619)547-4726)
Subject: HELP - Device allocated/mounted to non-existant process
Reply-To: yates@gdwest.gd.com
Organization: San Diego State University Computing Services
Date: Tue, 14 Apr 1992 15:52:00 GMT

  Does anyone have or know where I can obtain a utility which will deallocate
  and dismount a device that is in such a state to a non-existant process.
  I have a VAX 6310 (VMS v5.5) which uses a Contemporary Cybernetics Group
  8mm Tape drive hung on a TU81-Plus using a KLESI-BA.  Too often the
  8mm goes out to lunch, the controlling process terminates, and the device
  ends up being allocated and mounted to the now non-existant process.  This
  is a production system which makes it difficult to schedule a reboot.

  Also, if anyone out there is using a dual-drive CCG 8mm with a TU81-Plus,
  I'd be VERY interested in talking with them to see if they've had as many
  problems as I've had with it.  FULL image backups and restores 'generally'
  work fine, but if I need to restore particular files, or a saveset further
  into the tape (or worse yet a combination of both), the 8mm will either keep
  searching forever, or abort with a screen dump.  Unfortulately, CCG can't
  help much since they want both the unit and my tape (which I'm not allowed
  to release) in their shop to test.  There's also another system on site with
  the same CCG 8mm model that has similar problems, so I don't think it's
  something I'm doing in particular...

  Thanks in advance!!!
                                Jeff Yates
                       Computer Sciences Corporation
                       Technology Management Division
From: dsroberts@beckman.com
Newsgroups: vmsnet.internals
Subject: ALPHA MB instruction
Date: 13 Apr 92 13:34:17 PDT
Organization: Beckman Instruments

I've been reading the Preliminary Alpha Architecture Handbook.  One thing has
struck me as curious, and I was wondering.  Alpha has implemented a command
called "MB", which is memory barrier.  It looks to me a lot like a spinlock
(the memory portion).  Has anyone absorbed enough of the info on ALPHA to say 
difinitively what the similarities and differences are between these two 
commands/concepts?
-- 
   Don Roberts                   Internet:  don@beckman.com
   Beckman Instruments, Inc.     Phone:     714/961-3029
   2500 Harbor Bl. Mailstop X-12 FAX:       714/961-3351
   Fullerton, CA  92634          Disclaimer:  Blame me, not Beckman.
   Sometimes I feel like I'm the only one born without an instruction manual.
           - Ron Tye
From: <barnes@eec.umr.edu>
Newsgroups: vmsnet.internals
Subject: VAX C #pragma
Date: Mon, 13 Apr 92 10:02:16 CDT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

        Jamie,

        Share, what is the (undocumented) VAX C #pragma that declares a
        C routine to be accessed via a JSB?


        Jym Barnes (BARNES@UMRGEC.EEC.UMR.EDU)
From: dsroberts@beckman.com
Newsgroups: vmsnet.internals
Subject: Re: ALPHA MB instruction
Date: 14 Apr 92 14:42:59 PDT
Organization: Beckman Instruments

In article <703283496.420000.MILLER@TGV.COM>, <MILLER@TGV.COM> writes:
[...]
> The barrier instructions simply tell the processor not to attempt to optimize
> the order of it's r/w operations on the bus.  It's a tiny little bit like
> the interlocked instructions on the VAX.  You can find out more by looking
> over section 4.11.3.
> 
Yeah, lots of detail on 4.11.3 :-)  It sounds like you're referring to using MB
as illustrated in 5.6, but I was more interested in the discussion in 5.5.3 and
5.5.4.  Perhaps I'm being fooled by this discussion of spin loops.  Wouldn't be
the first time :-)

> But hey, I'm no guru.

Some of us have differing opinions on that :-)
> 
> So, Don, you got an Alpha?

Of course, don't you?  Actually, we'll likely get one as soon as a server model
is available.  Our poor 65xxen are dying.  Maybe 1Q93?

-- 
   Don Roberts                   Internet:  don@beckman.com
   Beckman Instruments, Inc.     Phone:     714/961-3029
   2500 Harbor Bl. Mailstop X-12 FAX:       714/961-3351
   Fullerton, CA  92634          Disclaimer:  Blame me, not Beckman.
   Sometimes I feel like I'm the only one born without an instruction manual.
           - Ron Tye
From: MILLER@TGV.COM
Newsgroups: vmsnet.internals
Subject: RE: System service calls & access modes
Date: 5 Apr 92 02:32:45 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

>Oops!  That one could bite in some really obscure ways.  It's easily
>fixed though:
>

It's worse than that.  Any references to auto variables (FP-relative)
will fail.  The best solution would probably be to copy a portion of the
user stack into kernel space and back.  We could substitute the kernel
FP with the user FP too.  If we did that, we would have rebuild the
call frame above the call to SYS$CMKRNL and guarentee that the kernel
code doesn't allocate any more auto variables.

Still, these are things you guarentee by adding another routine.
The code, with Don's fix, should work fine if you don't reference
any local variables.

>Personally, I'd be inclined to store the s in "s = kmon();" in kmon's
>module, preinitialised to 0.  That would allow run-time checking, in the
>*unlikely* event of the routines being called out of sequence.  Also you
>don't need to carry around this spare variable; just:

It seemed more likely that someone would try to nest the calls to
kmon() so I was opposed to a static variable.

>> I actually had comments explaining the whole thing, but I figured you
>> guys would have more fun if I took them out.
>
>We'd have stripped them out if you hadn't.  Comments can be misleading.
>The only true documentation is the binary.... 8-)

I'll remember to only submit the binary next time.

-bruce

----------------------------------------------------------------------------
Bruce R'. Miller, MILLER@TGV.COM        (408) 427-4366  in Santa Cruz CA
        "And through the wire, we can talk..." - PG
Newsgroups: vmsnet.internals,comp.os.internals
From: ddml@aplvm.jhuapl.edu (Dave Libershal)
Subject: How to implement a mail printing service?
Organization: Johns Hopkins University/APL
Date: Tue, 7 Apr 92 19:58:07 GMT

We are using DEC's MAILBUS with Message Router in a VMS environment. We support	
mail to/from many different computer systems but currently, only for users of 
one of those systems. We want to provide hardcopy mail output for non-system 	
users. I would appreciate feedback and comments from those of you who may have
implemented a similar function.  		

The approach which we are taking will use reverse lookups in the DDS for all 
staff who do not have computer access. That lookup will route their mail to a
unique userid on our MAIL router machine. That user will be running a detached
process which extracts the print mail message, parses it to locate the "true"
intended recipient, does a lookup in the DDS to determine the recipient's 
address and phone number, and then builds a header page with the addressing  
info and prints the header and the message to a printer located in our mailroom.
Mailroom staff will send the message to the designated recipient via our normal
manual delivery system.

I am considering the use of a detached process that uses DCL commands. 
Have any of you done anything like this? This is my first VMS project and I 
appreciate any helpful advice. Are their similar alternatives you might be
aware of? I was looking at ALL-IN-1 mail services support initially but we
do not have that on the router machine and we need to get something going
soon.

Thank you in advance,
 Dave Libershal          
                        "they wanted a great stadium so they built it to look
                         old - Oriole Park at Camden Yards"
From: "CMLIB::ROLIN" <ROLIN%CMLIB.decnet@nl.nusc.navy.mil>
Newsgroups: vmsnet.internals
Subject: RE: VCRP
Date: 15 Apr 92 14:20:00 EST
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

>From: Graham Evans <"CCF::GPE%hermes.mod.uk"@relay.MOD.UK>
>
>Can anyone tell me what a VCRP is? IDS has not helped!

From SYS$LIBRARY:LIB.REQ:
!*** MODULE $VCRPDEF ***
! +
!  VCRP - VAX Communication Request Packet
!
!  The VCRP is the data structure used to pass requests between VCMs.  A
!  single VCRP may traverse more than two VCMs.  Only the common fields
!  within the VCRP are defined here.  All layer-specific fields are defined
!  elsewhere.  The common VCRP function codes are also defined here.
!
!  CORRESPONDING CHANGES BEING MAY TO THE DCBE.
! -
!  Function codes used in the VCRP$L_FUNCTION field.  The function codes
!  are separated numerically by layer as follows:
!
!    0000-01FF Common function codes from the VCI functional specification
!    0200-02FF DLL Data Link function codes
!    0300-03FF NRL Network Routing function codes
!    0400-04FF TPL Transport function codes
!    0500-05FF SCL Session function codes
!    0600-06FF APP Application function codes

>More to the point, what does one do when one's LRP list is full of them and
>they are growing through non-paged pool?!

>I have been in with SDA and examined and formatted some, but have not really
>got anywhere. I can give more details if someone tells me what details are
>relevant (I have a VERY large log file from SDA).

Perhaps looking at the VCRP$L_FUNCTION field (function codes are defined in
LIB.REQ), might provide some insight.  I only took a cursory glance at the
different fields in the VCRP, but perhaps there's something in there that
would identify which nodes are communicating as well.  Good luck,

Dave
From: flowers@memstvx1.memst.edu (Harry Flowers)
Newsgroups: vmsnet.internals
Subject: Re: What's the use of SETPRV privilege?
Date: 14 Apr 92 11:10:03 -0600
Organization: Memphis State University

In article <01GIN670AJSI00005J@VAXF.COLORADO.EDU>, DWING@UH01.Colorado.EDU
 (Dan Wing) writes:
> I experimented with doing /DEFPRIV=SETPRV from AUTHORIZE to a non-privileged
> user and he couldn't turn on any privileges: SETPRV has to be in your
> authorized privilege mask for it to work.

So, such a user would have to spawn a subprocess (which copies the default to
the subprocess's authorized priv mask) to actually set any other privilege.  I
hope you took it back from your "non-privileged" user :-).
--
Harry Flowers                           Internet: FLOWERS@MEMSTVX1.MEMST.EDU
Memphis State University                & Bitnet: FLOWERS@MEMSTVX1
From: parke@star.enet.dec.com (Bill Parke)
Newsgroups: vmsnet.internals
Subject: Re: What's the use of SETPRV privilege?
Date: 9 Apr 92 22:09:56 GMT
Reply-To: parke@star.enet.dec.com
Organization: DIGITAL - VMS Engineering


For one thing, you can run WITHOUT CMKRNL or other privs
and set them ONLY when you need them.


Bill

Bill Parke 			parke%star.enet.dec@decwrl.dec.com
VMS Development			decwrl!star.enet.dec.com!parke
Digital Equipment Corp		parke@star.enet.dec.com
110 Spit Brook Road ZK01-2/D59, Nashua NH 03063

The views expressed are my own.
From: DWING@UH01.Colorado.EDU (Dan Wing)
Newsgroups: vmsnet.internals
Subject: Re: HELP - Device allocated/mounted to non-existant process
Date: 14 Apr 92 15:42:27 GMT
Article-I.D.: VAXF.01GITZTB989E0009WI
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

Jeff Yates, <yates@wctdpv.gd.com>, writes:

>  Does anyone have or know where I can obtain a utility which will deallocate
>  and dismount a device that is in such a state to a non-existant process.

DEC has a utility available through DSNlink (or your local office) which
will do what you need.  Ask for patch #245.

There is also some PD code that does the same thing floating around.

You may want to post your other questions to INFO-VAX (comp.os.vms ?)

-Dan Wing, DWING@UH01.Colorado.EDU  (or WING_D@UCOLMCC.BITNET)
 Systems Programmer, University Hospital, Denver
From: jhwelch@ecs.umass.edu
Newsgroups: vmsnet.internals
Subject: RE: System service calls & access modes
Date: 9 Apr 92 16:50:59 GMT

In article <1992Apr8.082023.857@beckman.com>, dsroberts@beckman.com writes:
>an instruction of approaches to things.  But I'm having a bit of difficulty
>coming up with a concept of what you would use this sort of thing in.  could
>someone post an example of a real use for this piece of code, where normal
>CMKRNL calls would be less convenient?  Something more specific than the
>calling sequence, that is. :-)

I started this thread, so I guess I can tell you what prompted the
question.  I was writing a program that deals with executive-mode
locks quite a bit and had to write a subroutine to be called
by $CMEXEC.  I was smart enough :-) to pass a parameter indicating
which function to perform, but I had to set up a common block
to pass various parameters back and forth.

Debugging this routine was yet another challenge that could have
been avoided if I was in user mode an able to use the
debugger.

Jonathan Welch  VAX Systems Programmer  Umass/Amherst  JHWELCH@ecs.umass.edu
Newsgroups: vmsnet.internals
Subject: Re: ALPHA MB instruction
From: don@zl2tnm.gen.nz
Date: 16 Apr 92 22:25:15 +1200
Organization: The Wolery

In article <9204151455.AA15068@ithaca.Eng.Sandy.Novell.COM>, ed_heinrich@npd.novell.com writes:
> to update X was issued first.  In the VAX architecture, reads and writes to
> memory CAN be reordered with respect to each other, but two reads or two writes
> MUST execute in the order they are issued.  (This read/write disordering is
> the reason for VAX INTERLOCKED instructions, which guarantee the order of the
> accesses.)

That's not the purpose of the interlocked instructions.  Interlocked
instructions are read-modify-write; if they weren't interlocked on a
multiprocessor system, another processor could read a spinlock after the
first had read it but before it had modified it, so that both processors
would think they had aquired the spinlock.  The same applies to any
test/set flag etc.  All interlocking does is deny access to the memory by
another process for the duration of the instruction.  I'm not aware of
any VAX implementation that re-orders reads or writes, even through its
caches. 


Before anyone gets the wrong idea (this isn't in response to what you've
written, Ed), re-ordering of reads & writes in the Alpha architecture
must not cause inconsistent access on a uniprocessor system, ie move a->x
and then move b->x is guaranteed to leave b in x.  Likewise, move a->x,
move x->y is guaranteed to leave a in y.  The MB instruction is needed
*only* where the actual order of writes matters, such as shared 
structures in multiprocessors or when talking to device registers.


Don Stokes, ZL2TNM (DS555)                       don@zl2tnm.gen.nz (home)
Network Manager, Computing Services Centre           don@vuw.ac.nz (work)
Victoria University of Wellington, New Zealand             +64-4-495-5052
From: HUDSON@AC.DAL.CA (Bruce Hudson)
Newsgroups: vmsnet.internals
Subject: SCSI device driver problem
Date: 6 Apr 92 19:19:00 GMT
Article-I.D.: AC.74B1B79D16C70AEC6F
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List


    I am having a problem with a device driver for a weird SCSI based
disk. The disk mounts but when accessed causes the system to crash in
the port driver PKNDRIVER.

    I have traced the problem to a call to SPI$MAP_BUFFER. This part
of the code sets up the buffer defined by the IRP and is essentially
direct from the example SKDRIVER. Does anyone know if there were any
problems with SKDRIVER? Alternatively, does anyone have or know of
an example that sets up for a SCSI transfer to a non-S0 buffer that
I could have a look at?

   When the code sets up the call SPI$MAP_BUFFER causing the crash,
it does not setup SCDRP$L_SVA_USER which is listed as an input. The
code in SKDRIVER doesn't either unless I am missing something. This
would seem to be ok since SCDRP$M_S0BUF in SCDRP$L_SCSI_FLAGS is not
set. All of the other inputs described in the manual are properly
initialized.

    Thanks for any help. This is all on VMS 5.4-2, on a 3100. I can
provide any other details on request.

-------
Bruce A. Hudson                         | HUDSON@AC.DAL.CA
UCIS, Facilities and Operations         | HUDSON@DALAC  (Bitnet)
Dalhousie University                    | HUDSON@DALCS  (UUCP)
Halifax, Nova Scotia, Canada            |
From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: vmsnet.internals
Subject: Re: What's the use of SETPRV privilege?
Date: 10 Apr 92 23:34:54 GMT
Reply-To: carl@SOL1.GPS.CALTECH.EDU
Organization: HST Wide Field/Planetary Camera

In article <7277734B6FFFE12B78@MAX.U.WASHINGTON.EDU>, DEREK@U.WASHINGTON.EDU writes:
>>Then if Carlo modified his kernel mode routine to change his authorized
>>privileges (instead of the current privileges) he'd get what he's after.
>>
>>I experimented with doing /DEFPRIV=SETPRV from AUTHORIZE to a non-privileged
>>user and he couldn't turn on any privileges: SETPRV has to be in your
>>authorized privilege mask for it to work.

Please, however, be aware of the fact that if you give a user SETPRV as a
default priv, then if he spawns a subprocess, it will be an authorized priv for
the subprocess, and he WILL, therefore, be able to set all privs for the
subprocess.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXes and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
From: DNW@NLR.NL
Newsgroups: vmsnet.internals
Subject: What's the use of SETPRV privilege?
Date: Thu, 9 Apr 92 17:45 MET
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

L.S.

Do the following:

$ SET PROC/PRIV=(NOALL,CMKRNL,TMPMBX)
$ SPAWN
$ SHOW PROC/PRIV
Process privileges:
 CMKRNL               may change mode to kernel
 TMPMBX               may create temporary mailbox

Now you have a process, with just the two privileges
and you are unable (with set proc/priv=) to set others:

$ SET PROC/PRIV=NETMBX
%SYSTEM-W-NOTALLPRIV, not all requested privileges authorized

But from kernel mode, you can set any privilege bit,
so set the SETPRV bit.

        $PRVDEF
prvadr: .long   PRV$M_SETPRV
prvprm: .long   0
        .entry  prv_start,^m<>
        $cmkrnl_s -
                 routin = prv_setprv, -
                 arglst = prvprm
        ret

        .entry  prv_setprv,^m<>
        $setprv_s -
                 enbflg = #1, -
                 prvadr = prvadr, -
                 prmflg = #1
        ret
        .end    prv_start
$ RUN PRV
$ SHOW PROC/PRIV
Process privileges:
 CMKRNL               may change mode to kernel
 SETPRV               may set any privilege bit
 TMPMBX               may create temporary mailbox

Very nice, the SETPRV privilege bit is set but you are
still unable (with set proc/priv=) to set others.

$ SET PROC/PRIV=NETMBX
%SYSTEM-W-NOTALLPRIV, not all requested privileges authorized

So what's the use of this privilege? Or what am I doing wrong?

$ SET PROC/PRIV=(NOALL,SETPRV,TMPMBX)
$ SPAWN
$ SHOW PROC/PRIV
Process privileges:
 SETPRV               may set any privilege bit
 TMPMBX               may create temporary mailbox

Now the SETPRV bit is set and you are able to set other
privilege bits (with set proc/priv=).

$ SET PROC/PRIV=NETMBX
Process privileges:
 SETPRV               may set any privilege bit
 TMPMBX               may create temporary mailbox
 NETMBX               may create network device

/Carlo Mekenkamp <DNW@NLR.NL>