.PAGE SIZE 58, 85 .NONUMBER .; for VAX .LEFT MARGIN 10 .RIGHT MARGIN 75 .; for RSX .;.LEFT MARGIN 0 .;.RIGHT MARGIN 65 .AUTOPARAGRAPH # .lm +30 .SKIP 5 .CENTER THE RSX MULTI-TASKER .SKIP .CENTER July 1989 .SKIP .CENTER "In hoc signo foobar" .SKIP .CENTER Fine Realtime Commentary .c Since 1975 .SKIP 14 .lm -30 .CENTER ^&TABLE OF CONTENTS\& .SKIP .LIT RSX SIG NEWS Editor's Corner RSX-1 Submitting Articles to the Multi-Tasker RSX-2 Bulletin Board Notes RSX-3 ARTICLES Fall 1988 RSX Software Clinic RSX-4 Diary/Alarm System Using BATCH RSX-12 The Notebooks of Justin L. Hewser RSX-15 .eli .s4 Opinions expressed in the Multi-Tasker are those of individual members. They do not represent the official position of the RSX SIG or that of DECUS leadership in general. .pg .C *************** ^&RSX SIG NEWS\& *************** .s2 .C Editor's Corner .S .lit Jim McGlinchey, Managing Editor Phil Hannay, Production Editor Bruce Mitchell, Minister of Propaganda .eli .s3 .C ----- Editorial: Defeat in Detail ----- .SKIP 2 .CENTER Bruce R. Mitchell .CENTER Machine Intelligence and Industrial Magic, Consultants .CENTER 390 North Shore Drive, RR _#1, Box 216 .CENTER Fountain City, WI###54629 .SKIP 2 Once again the Editor Emeritus is back again to toast some tootsies over a roaring flame. This month there's a big "DIGITAL" in the periscope crosshairs. Now mates, this is no - ahem. Once upon a time, Digital made a product line consisting of PDP-11s and VAXes. They paid close attention to the external details, because this is what people see. They ^&don't\& see the excellent hardware engineering or the operating system; they see a box, and if the box is attractive, they have a positive impression of the company making the box. Unfair, but a fact. Consider front panels and bezels. They should be functional yet attractive; the 11/70 remote diagnostic front panel was and is an object lesson in good design. All 11/70 systems in H960 cabinets had custom bezels proudly proclaiming that ^&this\& system is a Digital PDP-11/70. The 11/780, 782 and 785 front panels were also elegant and functional. Back when, if you upgraded a CPU, you got a new front panel that was just as nice as the old one. Digital paid a lot of attention to detail, because people holding the purse strings judge on how pretty the box is. Everything looked good and solid, speaking of reliability and a sound manufacturer. Well, the new systems are somewhat different. The 6000 series cabinet looks like a 780 expansion box. It has vent holes all over the front, making it look like it might be an air conditioner, detracting from the appearance. Oh, sure, it still says "DIGITAL VAX 6x00" - in a drop-in slot in the front door. The name bezel isn't even one piece; it's all individual drop-ins. This kind of design may simplify microcode upgrades from 6x00 to 6xy0, but damn, it sure looks cheap. Reminds me of the stick-on letters you see on rural mailboxes - you know the ones, they peel slowly and fall off randomly. Slipshod work. And that's the impression ^&I\& get of the new VAXes. Slipshod. Not up to the previous standard of quality. No attention to detail. Probably questionable reliability. A 100 MIPS machine in a cardboard shoe box. If craftsmanship comprises attention to detail, then the level of craftsmanship at Digital has taken a nose-dive. And that's the truth. Phttt. .s 6 .C ----- Submitting Articles to the Multi-Tasker ----- .s1 You are encouraged to submit articles to the Multi-Tasker. No article is too big or too small. They can be serious or funny, and of any techinical level. Please submit machine readable media if possible. Hardcopy submissions are okay if they are fairly short. Illustrations and drawings that can be photocopied may accompany the article. Most any media is acceptable, however RX50, RX01/2, TK50 and 1600 BPI magtape are preferred. All RSX volume formats are acceptable, and VMS formats are also acceptable on RX50, TK50 and 1600 BPI magtape. You can also submit articles through the RSX bulletin board system at (612) 777-7664. Kermit the file into your account and then send it via MAIL to username MULTITASKER. The Multi-Tasker begins life as a RUNOFF file, so feel free to submit your articles in RUNOFF format. The page size will be 80 columns by 58 lines, with the left margin at 10 and right margin at 75. Use literal format for code examples. If you change margins, use incremental changes rather than absolute. Mail your articles and other submissions to the expansive Multi-Tasker offices: .LITERAL Phil Hannay Cargill Research Bldg Box 9300 Minneapolis, MN. 55440 tel. 612-475-5433 (daytime) .END LITERAL .pg .C ----- Bulletin Board Notes ----- .s1 The RSX Bulletin Board is online. RSX Network Mail, Kermit, old issues of the Multi-Tasker, and various other goodies are available. Free advice as well. (often worth the price...) Recently, a stranger logged in under the questionable moniker of S. CLAUS. As he didn't use a valid DECUS membership number, his account was of course promptly terminated. However, during the brief time he was on the BBS, he did drop off a very interesting piece of code. Of uncertain origins, it comes up with a prompt of "NOTES-11". Not only that, but the thing actually appears to work much like VAX NOTES (less the curb-feelers and fender-finders). There is even a help file! VAX NOTES users will find the VT100 keypad mapping very similar (the keys that work appear to duplicate VAX-NOTES). Mr. Claus did not leave any sources, and the program appears keyed to run only on the BBS system. However, it is real fun to play with, and FINALLY gives the BBS a functioning NOTES system. You can now send mail to individuals, or put up NOTES for the world to see. To get started, type "NOTES" or "NOTARY" and play with the embedded help. The BBS management hopes to get a short user's guide into a future Multi-tasker issue. There is also a hints conference available. As usual, experience is the best teacher. The BBS has also been upgraded with the arrival of a magtape drive and a larger system disk. The latter is a cast-off from a site which got tired of it locking up every few days. The BBS, of course, has never been proud. So, for now, we have lots of disk space. The magtape is great, in that the previous transport media was RL01, and it takes a bunch of them to drag a SIG tape in! The BBS also has a pair of RX02 drives, but no controller. So, if you have an old RX211 (UNIBUS) controller on the back shelf, send it on in. Contact Jim Bostwick, at 612-475-6264 (daytime) if you wish to donate some equipment. You can log into the BBS at 612-SPR-PONG (612-777-7664). The line will always do 100-1200 baud, and often 2400 (depending on when the owner of the 2400 modem last went looking for it). New users should log in with username ACCOUNT and password REQUEST. This will get you a registration procedure. You'll need your DECUS membership number in order to get a permanent account. .pg .c *************** ^&ARTICLES\& *************** .s6 .CENTER;------ Fall 1988 RSX Software Clinic ------ .BLANK .CENTER;T. R. Wyant .CENTER;E. I. DuPont de Nemours .AUTOPARAGRAPH Here are the questions and answers from the Fall 1988 RSX software clinic. Now I can call myself caught up, even if only temporarily! The format is the usual one: Question (as it appears on the Patient's Registration Form), Answer (ditto), and Comments (when Yours Truly can't refrain from poking his nose in). A certain percentage of the clinic forms come in with the answers blank. Some I was able to puzzle out after the symposium; these are marked as having been answered after the fact. And now: .NOAUTOPARAGRAPH .LEFT MARGIN +5 .BLANK 3;.INDENT -5 Question: With 2 PDP-11/44s both running version 4.0 of M+ and DECnet. About 75% of the time, when setting host between systems, the terminal hangs up. _^C does nothing. The only way out is to reboot the system that originated the SET command. No other terminals are able to SET HOST once the first terminal gets hung. .BLANK Same situation happens when connecting to a VAX, but doesn't happen if the terminal is connected to a DECserver. .BLANK;.INDENT -5 Answer: In [137,10]DECPRM.CMD the variable $DMPIO is set to a 5. This value determines the throttle. This should be decreased to a 3. .BLANK $DMPIO tells the number of packets of information to send before waiting for an acknowledgment message. 5 was too large for us, especially when PIPping files. .BLANK After this file has been changed, do either of the following: .LIST "-" .LE;Run a NETGEN in component mode to rebuild NCT and RTH, or .LE;Run the NETBLD.CMD command procedure. Make sure that the $DMPIO value has been changed. This method is quicker than running NETGEN in component mode. .END LIST .BLANK;.INDENT -5 Comment: This was one that stumped the clinic. Thanks for following up and feeding the answer back, Jill. .BLANK 3;.INDENT -5 Question: We wrote a command line buffer which works on 11-M. However, on M-plus when the user changes directories with SET DEFAULT and then does a directory, SPAWN does a directory of the user's login directory. .BLANK;.INDENT -5 Answer: Use the SDIR$ ... SD.TI directive before each command to change the default directory string. .BLANK;.INDENT -5 Comment: A task's default directory string is determined when that task is activated, and is not affected by subsequent SET DEFAULT commands on the task's terminal. This default directory string, and not the terminal's, is propagated when the task spawns another. The SD.TI function causes the task's default to be updated to reflect the current terminal default. The value of SD.TI is 6, for the benefit of those working in FORTRAN. For the details of coding the call, see the Executive Reference Manual. .BLANK 3;.INDENT -5 Question: Can the number of TT: units be increased or decreased without a complete re-GEN? If so, how? The objective is to GEN systems for an unknown number of terminals and limit the Primary Pool impact on each. .BLANK;.INDENT -5 Answer: The DEC-provided "Pre-GEN" M+ kit uses autoconfiguration for number of terminal units, based on the actual hardware. Obtain this kit, and either use it or compare RSXMC.MAC and resolve differences. .BLANK 3;.INDENT -5 Question: If a device is already mounted, the VMS SYS$MOUNT system service returns a condition code that is not documented in the ($MNTDF) module. Where else can I look? The application is in FORTRAN. .BLANK;.INDENT -5 Answer: You can try SEARCH SYS$LIBRARY:FORSYSDEF.TLB .BLANK;.INDENT -5 Comment: Hey, the VMS people have to get their answers SOMEWHERE! .BLANK 3;.INDENT -5 Question: Can we use CINT$ for an NPR device in 22 bit address space? .BLANK;.INDENT -5 Answer: Yes. Setting up the UMRs is left as an exercise for the user. .BLANK;.INDENT -5 Comment: Recommended reading: Guide to Writing an I/O Driver. Section 7.3 (Appendix B in older copies) discusses allocation and deallocation of UMRs. It looks to me like you want to call $ASUMR (from kernel mode) to allocate the UMRs, and $DEUMR when done. You'll have to allocate a bit of primary pool for the mapping register assignment block; it would be polite to give it back when you're done. The layout of the mapping register assignment block is specified in the SCBDF$ macro, which is documented in the Crash Dump Analyzer manual, and in Appendix "C" of the older copies of Guide to Writing an I/O Driver. .BLANK 3;.INDENT -5 Question: What are the advantages/disadvantages of RSX-11M versus RSX-11M+ in a real time environment? .BLANK;.INDENT -5 Answer: No significant difference. M+ I/D space should be an advantage. M+ may be faster - more optimization of code paths. .BLANK 3;.INDENT -5 Question: Is there some way to have a program run with a different name? .BLANK;.INDENT -5 Comment: What the patient was looking for was a way to have each send/receive message handled by a separate task, rather than queuing them all to the same task. .BLANK;.INDENT -5 Answer: Install the program as ...xxx. When you send a message to it, the program comes in as xxxTnn. As its first act, xxx calls the GIN$ system service to change its own name. Note that it is still possible (albeit unlikely) that a copy of task ...xxx will get more than one message queued to it; so ...xxx should loop back to the beginning and call RECOEX to flush its queue. .BLANK 3;.INDENT -5 Question: I have copied the DR: driver and renamed it. How do I include the new driver error logging without removing the DR: error logging? .BLANK;.INDENT -5 Answer:Modify the code at the DRLOA entry point, and have it rename itself back to DR:. Unit numbers must not overlap. .BLANK;.INDENT -5 Comment: If you don't want to modify the driver code, you could write a privileged task to do the renaming. Or, you could modify the DR: driver's error logging module and recompile it. .BLANK 3;.INDENT -5 Question: In the RSX-11M TTDRV, what are the implications of turning on R$$IIC? .BLANK;.INDENT -5 Answer: Try it and see. TTDRV won't grow "much", and should work. .BLANK;.INDENT -5 Comment: R$$IIC is "Internal I/O Completion". It gets turned on anyway of you have remote terminal support or disk caching. It shows up in TTATT, TTCAN, TTDAT, TTFP, TTICH, TTINI, and TTMAC. .BLANK 3;.INDENT -5 Question: INITL messes with address 104 even if you tell SYSGEN you have a 60hz clock. Why, and how can I get around it? .BLANK;.INDENT -5 Answer: Change the address and vector on the KW-11P. ...SAV also messes with 104. .BLANK 3;.INDENT -5 Question: MicroRSX V3.1 autoconfiguring a DHQ-11 finds it but for the vector in the ACFPAR.DAT it lists VEC=177777. Why? .BLANK;.INDENT -5 Answer: V 4.0 fixed the problem. V3.1 works if you set the programming mode jumper to DHV instead of DHU. DHU mode is preferred because of improved performance though, so you should upgrade to V4.0 or later. .BLANK You could edit the file ACFPAR.DAT to put in the correct line to make the DHU mode work on V3.1. The problem with this approach is that the next time the hardware is changed and the system autoconfigured that DHQ device will stop working until you edit ACFPAR.DAT again. .BLANK 3;.INDENT -5 Question: How can a user written CLI task determine the login UIC of any other task on the system? .BLANK;.INDENT -5 Answer: Write a Macro-11 task that maps the exec (/PR:5) and does the following: .BLANK;.NOFILL SWSTK$ CALL $SRSTD (task name in RAD-50) Look in TCB for desired UIC RETURN EXST$S (uic) .FILL .BLANK;.INDENT -5 Comment: The gentleman from Virginia begs to differ with the doctor's response on the subject of where the UIC is stored. According to the macro expansions in the back of Crash Dump Analyzer manual, the UIC is stored in the header, not the TCB. This complicates matters somewhat, as the header is not necessarily in memory (the task may be checkpointed). [14,10]THPAGE.MAC (the RMD task header display update) is a good reference on how to get from a task name to a header address. In abstract, what you do is this: .BLANK;.NOFILL;.LEFT MARGIN +5 MOV #TGTTSK,R3 ;; Point to name of task. CALL $SRSTD ;; Look up the task. BCS 40$ ;; If failed, return. BIT #TS.EXE,T.STAT(R0) ;; Is the task active? BNE 40$ ;; If not, return. MOV T.PCB(R0),R4 ;; Get the PCB address. _.IF DF,R$$MPL BIT #PS.OUT!PS.CKP,P.STAT(R4) ;; Partition in? BNE 40$ ;; If not, return. _.IFF ; DF,R$$MPL BIT #TS.OUT,T.STAT(R0) ;; Task in memory? BNE 40$ ;; If not, return. _.IFTF ; DF,R$$MPL MOV P.HDR(R4),R3 ;; Get header address. _.IFT ; DF,R$$MPL BNE 20$ ;; If non-zero, in pool. MOV P.REL(R4),@#KISAR6 ;; Map the header MOV #140000,R3 ;; through APR6. _.ENDC ; DF,R$$MPL 20$: .BLANK;.FILL;.LEFT MARGIN -5 The protection UIC is stored in H.CUIC, and the default UFD (nonamed mode) is in H.DUIC. Except for the point about where the UIC is actually stored, the doctor's recommendation works fine - just remember to specify the requesting task's name in the EMST$ call. .BLANK Alternatively, the SWST$ macro could be used to enter kernel mode, allowing the whole thing to be put in a subroutine to be called by a /PR:0 task. This means rewriting everything so it will work after being remapped through APR5. .BLANK 3;.INDENT -5 Question: Getting "Insufficient Network Resources" on RSX-11M DECnet. NTD showed all links used (17 out of 17). Aborted several network tasks which resulted in drop to 10 links, and now error goes away. Is the problem the number of links or LDBs, SDBs, and CCBs. How much pool is used per link. .BLANK;.INDENT -5 Answer: "Insufficient Network Resources" is an omnibus error, caused by: .LIST .LE;Exceeding the maximum allowed number of links (17 in this case) defined in CFE by DEFINE SYS MAX LINKS .LE;Failure to allocate an LDB, SDB, or CCB. According to the manuals, LDBs and SDBs are allocated out of POOL.., whereas CCBs come out of primary pool. POOL.. will overflow to primary pool if it fills up. .END LIST Inventory your links and make sure they're all real links, not outstanding connect requests. .BLANK;.INDENT -5 Comment: You can use NCP SHOW SYSTEM COUNTERS to determine if you're getting buffer allocation failures. DECnet-RSX Network Management Concepts and Procedures is a reference on how to tune. It implies that you need 1 LDB per logical link plus one or more per line, 1 SDB per link plus one or more per line (and a few "for the pot"), and 1 CCB for every LDB or SDB. .BLANK NTD and the RMD network pages can help determine whether your connections are all real or not, and who owns them. NTD requires at least one logical link (and so can be useless when you need it most), but RMD does not. .BLANK As soon as a connect request arrives, DECnet allocates all resources needed to complete the link. This can cause a problem; some tasks don't service the mailbox once they have accepted a link, and the resources remain allocated until the task exits. If this is the problem, you can declare a mailbox AST using the SPA$ macro (yes, you have to write it in MACRO-11, though if you follow the usual rules it will co-exist with FORTRAN network I/O). The mailbox AST should flush all new entries from the mailbox, remembering to call the REJ$ macro for any connect requests found there. .BLANK 3;.INDENT -5 Question: Is there a box that does ASCII to EBCDIC at 9600 baud? Black Box has one, but the effective data rate seems to be about 400 baud. .BLANK;.INDENT -5 Answer: None known. If I/O is on a TT: line, an ACD (Ancillary Control Driver) could be used. .BLANK 3;.INDENT -5 Question: Is there a FLUSH for RSX? .BLANK;.INDENT -5 Answer: IDLMON (RSX SIG tape, about 1986) by Bruce Mitchell; also TTKGB. See your LUG librarian. .BLANK;.INDENT -5 Comment: FLUSH is a VMS utility that times out idle terminals. .BLANK 3;.INDENT -5 Question: Does use of Fast Map and MAP$ in same task work (we did it once, and all Hell broke loose)? .BLANK;.INDENT -5 Answer: Ought to work. .BLANK 3;.INDENT -5 Question: Using RSX-11M+ V4.0, want a VMS application to access RMS files on RSX-11M+ .BLANK;.INDENT -5 Answer: Off the cuff - VMS can open and update the file on the RSX system. Then, OPEN an RSX task and tell it what you did. .BLANK;.INDENT -5 Comment: The problem included not only updating the file, but kicking a task on the RSX system when the update occurred. An RSX task can be opened like a file by a VMS process; the VAX FORTRAN syntax for this is .BLANK;.INDENT +5 OPEN (UNIT=nnn, NAME='RSX::"TASK=RSXTSK"'... .BLANK VMS then does sequential reads and writes. RSX accepts the link by calling GNDNTW followed by ACCNTW, and passes data using RECNT and SNDNT, just like we're all used to doing; incredible but true. .BLANK 3;.INDENT -5 Question: Need to drain the entries from a print queue whose device has been taken off line. Files marked for delete are to be deleted, even though they're not printed. .BLANK Created processor for unused terminal line and assigned it to queue, it did exactly what I wanted. However, we usually don't have unused port. Tried to do same with NL:, QMG rejected when I tried to assign to queue. Tried to set UCB bits to fool QMG, couldn't. .BLANK What are the criteria that QMG uses to determine if a device is spoolable? .BLANK;.INDENT -5 Answer (after the fact): A look at [25,10]QMGASS.MAC shows that a print device must be a record oriented device, not redirected, and not a pseudodevice. NL: is a pseudodevice, and so can't be used as a print device. Clearing DV.PSE is NOT recommended. .BLANK You can, however, initialize processor NL0 as an applications processor rather than a print processor. This causes all device checks to be bypassed, and seems to work fine. The relevant MCR commands are: .BLANK;.NOFILL;.LEFT MARGIN +5 >INS $LPP/TASK=NL0 ! Install "Print" processor >QUE NL0:/CR/NM ! Create queue. >QUE NL0:/SP/EX ! Initialize applications proc. .LEFT MARGIN -5;.FILL;.BLANK The critical item is the "/EX" switch on the last QUE command. Since LPP actually copies the output to NL0:, it takes a bit to get rid of a large file. Someone REALLY interested in performance could write their own despooler. .BLANK 3;.INDENT -5 Question: Using QIO with SMC function on another terminal causes hard system crash on M-plus 4.0, 4.1. .BLANK;.INDENT -5 Answer: Send in code to show support which causes crash. .BLANK;.INDENT -5 Comment: A gentleman named Jerry Hudgins posted the same problem on DECUSERVE (thanks, Jerry!), and it wasn't until the answer appeared there that the penny finally dropped. Issuing SF.SMC to a terminal other than the task's TI: requires a task to be /PR:0 (at least). An attempt to do it from a nonprivileged task used to return IE.PRI. I must admit that crashing the system DOES prevent the QIO from succeeding, but it seems a little drastic. In fact, it should NEVER be possible for a nonprivileged user or task to crash an RSX system (though they can bring it to its knees in other ways). .BLANK 3;.INDENT -5 Question: RSX11S V4.2B HDX TTDRV control/U leaves input pending (ie - locks out output). .BLANK;.INDENT -5 Answer (after the fact): Again the dreaded words - "That's not a bug, it's a feature". Under the half-duplex TT: driver, control/U empties the MCR command buffer but does not deallocate it. The same thing happens (or doesn't, as the case may be) if you type an MCR command and then delete all of it - the MCR buffer may be empty, but it's still out there. As long as that buffer hangs around, the terminal is "busy", and cannot be used for either input or output (except breakthrough write). One of the first things I learned about RSX (under M (NOT M+) V3.1) was ALWAYS to hit return after control/U. If this is an unreasonable request in your situation, try the full duplex TT: driver. .AUTOPARAGRAPH .pg .CENTER;------ Diary/Alarm System Using BATCH ------ .BLANK .CENTER;Ken Anton .CENTER;Kineticon Ltd. .CENTER;Wheatstone Place .CENTER;Glenrothes .CENTER;Fife, KY6 2SW .CENTER;Scotland This article shows how we use the RSX Batch Processor to implement a simple diary or alarm call system. It allows a one-line message to be stored until a given date and time, whereupon it is printed on your terminal. It can be used as a simple appointment reminder or alarm call system. The command file prompts the user for the date and time the message is to be printed, and then for the message itself. It generates a batch control file which is submitted to the batch queue, to be run at the given date and time. When the batch job is executed, a "broadcast" message is sent to the user by name, thus the message will appear on all terminals to which the user is logged in. If the user is not logged in at the appointed time, BRO returns an error status, and the batch job tries to send the message to the terminal from where the original command file was run. It's not entirely foolproof, but it performs a useful function, and is easily implemented. The listing follows. It has been tested on Micro/RSX Vs 4.0 and 4.1. The following assumptions are made: .list .le;There is a batch processor. .le;The batch despooler is free at the time of the alarm. We added an extra despooler to ensure this is the case. We very rarely run more than one batch job at a time. .le;Accounting is running. This is used to get the user's login name. .els .lit The listing... .enable substitution .disable display .enable control-z .enable quiet .sets uic SET DEF SYS$LOGIN/NONAME .disable quiet [2J[H#3 Alarm Clock #4 Alarm Clock (0#6qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B ; ; .asks date Enter date (Press RETURN for '') : .ift .goto end .asks time Enter 24-hour time (It''s now '