RSX 11-M V3.2 CHICAGO 1980 *** [307,23] *** README.1ST DANIEL STEINBERG SRI INTERNATIONAL LOC. K1023 333 RAVENSWOOD MENLO PARK, CA 94025 (415) 326-6200 EXT.5539 SHORT DESCRIPTION OF FILES IN THIS SUBMISSION: ARDRV.SLP AR11 DEVICE DRIVER ENHANCEMENT DRDRV.SLP RM02/3 DEVICE DRIVER CORRECTIONS INITL.SLP I/O PACKET PRE-ALLOCATION ENHANCEMENT... SYSCM.SLP ...PACKETS ARE PRE-ALLOCATED FROM THE TOP OF ...DYNAMIC POOL AT INITIAL SYSTEM BOOT HELLO.SLP ENHANCEMENTS AND CONNECT-TIME LOGGING... BYE.SLP ...AT LOGIN, "ASN XX:=SY:/LOGIN" NOT ...SPAWNED IF XX:==SY00: ALREADY... SRILOG.MAC CONNECT TIME LOGGING WITH PROJECT CHARGE NUMBERS BILLER.MAC BILLING PROGRAM FOR SRILOG ACCOUNTING DSR.MAC ONLINE DISPLAY OF DYNAMIC POOL FRAGMENTATION UPRNLWR.TEC TECO MACROS FOR QUICK CASE CONVERSION SYSLIB.TEC TECO PROGRAM TO FIND THINGS IN A LBR ENTRY FILE ...PROMPTS FOR A SEARCH STRING AND LOOKS IN ...LB:[1,1]SYSLIB.ENT FOR THE APPROPRIATE ...MODULE. TO MAKE SYSLIB.ENT: LBR LB:[1,1]SYSLIB/LE,SYSLIB.ENT/-SP DIR.CMD COMMAND FILE TO GET A NEAT DIRECTORY ONEDEL.TEC TECO MACRO TO PAGINATE THE DIRECTORY AND REMOVE THE LEADING [307,23] ARDRV.SLP This correction removes the code which restricts synchronous I/O sweeps to non-checkpointable tasks. This code is obsolete, since a task with an active sweep will always have a non-zero I/O count, and therefore be effectively non-checkpointable. There is no need for the task to be non-checkpointable when a sweep is not active. This correction works fine on our system. [307,23] DRDRV.SLP This correction fixes two obscure bugs in the RM02/3 device driver. 1) The FORMAT ERROR bit was tested in the wrong device register. 2) If the drive rejected the instruction to set OFFSET MODE, the driver logic detected a different error far downstream. With non-DEC RM02/3s, this could occur if the controller was working correctly, but asserted DRIVE READY more slowly than the DEC RM02/3. With DEC drives, the error rarely, if ever, occurs. With the correction applied, the device driver will HANG until the drive is ready. If anyone bothers to code a reasonable alternative (such as timing out), please let me know. [307,23] INITL.SLP & SYSCM.SLP INITL.MAC is a section of EXEC code which is task-built to lie directly before the system dynamic pool. It is executed when the system is initially booted (or when you say G to XDT). Once it finishes executing once, it deallocates itself into the front of pool. After you SAVe the system, the SAV code does what INITL did when the system is re-booted. Since INITL executes exactly once and is then freed to pool, all code added to it is recovered. This correction fixes a trivial bug and implements a critical enhancement. The bug is described below, and rarely occurs anyway. The enhancement is much more interesting. While the QIO OPTIMIZATION option (Q$$OPT) helps things out a lot by keeping a private linked list of pre-allocated I/O packets, these packets are initially allocated from pool while the system is running. Generally, you will SET /MAXPKT=8 and find that, after your system has been running a while, pool will be far more fragmented than it was when you booted the system! Since the packets are allocated at random times, they will be left in random places in pool, causing undue fragmentation. One solution would be to do some sort of compression and/or garbage collection. This has been suggested before; the standard reply is that, since RSX keeps no back-pointers, this would be almost impossible to implement. The approach i've taken is to pre-allocate the I/O packets right at the top of pool when the system is initially booted. If there is always a pre-allocated packet available, no packets will come out of pool. If MAXPKT is set too low, however, overflow packets will be allocated out of pool and, depending on timing and luck, may never be released. The enhancement consists of shuffling some code around in INITL and adding a short routine to pre-allocate a specified number of packets. The pre-allocation count comes from the byte at $PKAVL (in SYSCM.MAC). SYSCM.SLP sets this byte to the value DS$OPT, which should be defined in your RSXMC.MAC. I added a line to my RSXMC which reads: DS$OPT=Q$$OPT so that the initial maximum number of I/O packets are pre-allocated. DS$OPT and Q$$OPT may theoretically be as large as 255., but the pre-allocation algorithm stops when all the preceding INITL code has been used (it doesn't overwrite itself). If you don't have an 11/70 or parity memory, you can get 15. packets pre-allocated (conditional code in INITL leaves more room). When INITL is done, DS$OPT packets are sitting at the top of pool, followed by exactly one large block of pool. The execution of SAV causes a few more fragments to be formed permanently. I strongly recommend the use of this enhancement with a value for DS$OPT of at least 8. (i use 15. on my system). A bug in the INITL code shows up when you try to boot a non-VMRed system and it crashes (statistically, half the time). This is because VMR twiddles the dynamic pool pointers to make sure that the top of pool is on a double-word boundary. Although, there is no reason that i can dream up for this, the INITL code assumes that this is the case and, if not, will doubly deallocate the first word of pool. If $POOL happens to be on a double-word boundary, everything's ok. The correction should fix this by recomputing the top address of the INITL code. Since most people VMR their system before booting it, this correction is rarely necessary (if you have this problem and don't want to rebuild RSX11M.TSK, you can do this: >VMR ENTER FILENAME: RSX11M VMR>^Z since the VMR kluge works when it initially verifies the task image.) These patches have been running successfully in my system for months. [307,23] CORALB.SLP I have been using this highly altered CORAL module for a month to gather some information on the effectiveness of various Executive Core Allocation routines. A single flag word may be changed (via OPEn) to enable/disable different variations of algorithms. Timing information can be collected by turning DR11-K output register bits on and off, and monitoring these with digital counters. I don't recommend that you use this correction file in your system unless you know what you're doing. By applying the patch and getting a listing of the resultant CORAL.MAC;2, you can figure out what i've done. Feel free to call me for help. Preliminary results indicate that, while the roving core allocation algorithm can be configured to execute very quickly most of the time (as much as 3-4 times as fast as the standard first-fit), the distributed RSX first-fit algorithm tends to fragment pool somewhat less. However, this can vary, depending on your installation conditions, and i strongly recommend that you look seriously at the corrections to INITL.MAC and HELLO.MAC in this submission for free ways of cutting down on pool fragmentation. [307,23] HELLO.SLP Several corrections and modifications are made to HELlo. The important ones are: 1) If DS$LOG is defined (in RSXMC.MAC), special accounting code is included. Before logging on the user, (s)he is asked to type in a project code, which is passed, along with other information, to the task LOG... for processing. Project codes are not validated, they are merely stored for future billing. It's primitive, but it works just fine for us. 2) Rather than hard-coding the range of privileged accounts, the assembly values PRV1-PRV2 determine whether a user will be logged on a privileged. Also, users with group codes ING1-ING2 are extra-special: they may log in without accounting, and they may log in when system logons are disabled (they MUST invoke HELlo with: HELN etc. rather than HEL, though). 3) Users whose group codes are from SLV1-SLV2 are logged in slaved. There would have to be a LOGIN.CMD file in the login UFD to get any further. Currently, if LOGIN.CMD has SET /SLAVE=TI: as its first line, there will still be a hole between ...HEL and ...AT. in which the user may type a control-C and abort ...AT. With this correction, the only remaining problem is that, if LOGIN.CMD has a .ASK directive, the user may type control-Z which will stop ...AT. and hang the line. IND needs a .DISABLE EXIT directive of some sort to prevent this (or .ENABLE LOGOUT, so that BYE is spawned when AT. exits). 4) If the account file says that the user's default disk is SY00:, HELlo will currently spawn the command line: ASN SY00:=SY:/LOGIN to the MCR. This is completely unnecessary, since SY: may be globally REDirected to the proper device. Further, the assignment causes the allocation of a small piece of pool for the system assignment tables. If several users are logged on, pool will get uneccessarily fragmented in this way. [307,23] BYE.SLP This correction file: 1) Implements the accounting described above, if DS$LOG is defined. 2) Changes the time-dependent logout messages. 3) Fixes a known bug with outstanding I/O when BYE exits. [307,23] SRILOG.MAC This program catches data packets from ...HEL and ...BYE to implement a rudimentary connect-time accounting. The system overhead is practically nil. The source has further documentation. To assemble and build: @SRILOG [307,23] BILLER.MAC, BILLTIO.MAC, BILLWRK.MAC This is a billing program that scans the log file produced by SRILOG and generates an account by account summary. The BILLTIO overlay allows you to modify the operating parameters and BILLWRK does the actual file manipulation. This is an old program that works well, but there isn't a lot of documentation on how to use it. The command "?" produces a list of options and their current values. Typing the option enables it, typing -OPtion disables it. The default startup condition bills the entire log file without modifying it. You can set it up to delete billed entries or write a new version of the log file. Call me if you want help. To assemble and build: @BILLER [307,23] DSR.MAC This is a little program which prints out a map of your executive pool fragmentation (not including I/O packets). You can get a single map, or you can have a RMDEMO-like continuous display. If installed as ...DSR, it can be invoked with: >DSR for a one-time only display >DSR n for a redisplay every n ticks It also prints an arrow pointing to the listhead (this is because i use it to monitor a roving listhead). The code is for a SOROC terminal, but it takes about 2 minutes to tailor to a different set of cursor controls. To assemble and build: @DSR [307,23] UPRNLWR.TEC Invoke this by saying (to TECO): EIUPRNLWR$$ Your text buffer will be unchanged, but Q-regs L and U will be loaded with case conversion macros. The macros themselves execute without changing any Q-regs other than L and U. For example: 56ML will convert the next 56 characters to lower case MU will convert the next character to upper case The converted characters are typed out at your terminal.