home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!newshub.sdsu.edu!ucselx!crash!cmkrnl!jeh
- From: jeh@cmkrnl.com
- Newsgroups: comp.os.vms
- Subject: Re: known VAXCRTL bugs
- Message-ID: <1992Nov8.131311.845@cmkrnl.com>
- Date: 8 Nov 92 13:13:11 PST
- References: <1d1p5pINNkd@gap.caltech.edu> <38@colorne.UUCP>
- Distribution: world
- Organization: Kernel Mode Consulting, San Diego, CA
- Lines: 43
-
- In article <38@colorne.UUCP>, dfilip@colorne.UUCP writes:
- > [...]
- > I would not, for example, try to use buffered I/O in an AST
- > routine (it just dosn't seem like the right thing to do) [...]
-
- Using $QIO calls to do buffered I/Os (as defined by the device driver) works
- fine. It is a time-honored technique: The AST is called upon completion of
- the I/O, and the AST procedure starts the next I/O.
-
- In fact there are several hundred sites worldwide who are running DECUS uucp,
- the protocol engine for which absolutely depends on doing buffered I/Os from
- ASTs. Come to think of it, this message will reach you via at least one hop
- that uses this code...
-
- What makes you think it wouldn't work?
-
- It is true that some language's I/O RTLs aren't AST-reentrant. VAX FORTRAN
- used to have this problem (don't know if it still does). If you tried using
- formatted I/O from both non-AST and AST code, you ran the chance of a
- "recursive I/O error", which was the Fortran RTL's way of complaining that
- one of its routines had been re-entered.
-
- > allocating a
- > chunk of memory seems like something that should be able to be handled
- > in an asynchronous fashion.
-
- Whether it can or not depends on how the heap of free space is organized.
-
- Borrowing two examples from VMS internals, the fragmentable nonpaged pool
- requires several steps to allocate or free a block, and the routines that
- manipulate this therefore have to take out the POOL spinlock. Otoh, the
- pre-allocated lists (SRPs, IRPs, LRPs) are organized as relative queues, and
- an element can be added to or removed from these lists via a single instruction
- (INSQTI or REMQHI), which is atomic even on an SMP machine.
-
- Of course you can make any non-AST-reentrant code safe to use in an AST
- environment simply by surrounding it with $SETAST(0) ... $SETAST(1).
-
- --- Jamie Hanrahan, Kernel Mode Consulting, San Diego CA
- uucp 'g' protocol guru and release coordinator, VMSnet (DECUS uucp) W.G., and
- Chair, VMS Programming and Internals Working Group, U.S. DECUS VAX Systems SIG
- Internet: jeh@cmkrnl.com, hanrahan@eisner.decus.org, or jeh@crash.cts.com
- Uucp: ...{crash,eisner,uunet}!cmkrnl!jeh
-