[HECnet] two dumb RSX questions

Johnny Billquist bqt at softjar.se
Wed Jan 1 14:15:45 PST 2014


On 2014-01-01 21:32, Jerome H. Fine wrote:
>Johnny Billquist wrote:
In M+ the ability is even better, as device driver loading and
unloading is not related to devices being online or offline.
RT-11 has the same ability.   A hard drive can be online
without the device driver being LOADed.   If a background
program requests access to a drive, the program can perform
a temporary .FETCH to bring the device driver into memory
and then .RELEASE the device driver when finished.   A system
job can't request RT-11 to perform a FETCH, so any disk
drive needed by the program must have the device driver
LOADed before the program uses the disk drive.   In theory,
a system job could pause and the user could then LOAD
the device driver just before the system job uses it.   MACRO-11
always attempts a .FETCH when a device driver is not already
LOADed.

Ah! Now I know what you are talking about. It's the same in OS/8.
And no, this is not at all the same thing as in RSX.

(If I have things wrong here, I apologize, since now I'm going to make a comparision between RSX and OS/8, and assume that RT-11 indeed do work the same.)

A FETCH loads a device driver from disk into memory. It's an operation you do before performing any I/O to the device. However, you can only fetch a device driver that is known to the OS. The device driver is installed by a different process, which just makes the system aware that the driver exists. You also get some sort of handle in return from a fetch, which is what you use to do I/O to the device.

In RSX, LOAD means installing the device driver into the running system. Prior to the LOAD command, RSX have no clue that the device driver exists. You never have a device driver as a part of your own address space, and several tasks can do I/O to a device concurrently.
When a device driver is loaded into the system, all device driver databases are populated, and the actual code get put somewhere in memory. Don't care where. The LOAD command do that fiddling, and the device driver databases holds enough information that the OS then can invoke the driver when needed. LOAD is a user command, which do a lot of complex operations, and is not something any program ever do on its own. It's a user initiated operation to install a (new) device driver into a running system.

However, for I/O to actually go through to the device, it must also be online.
Online can mean *two* things. The physical device itself (which is what you talk about, Jerome) must obviously be online. But the device must also be online from the driver point of view, which is a separate question. You can load a device driver in RSX, but if a physical device is not present to match it, the device driver will be offline, and any I/O to it will fail before it even comes to the device driver code.
If a physical device later comes online, the driver database does not necessarily become updated to be online. So you can have a physical device online, but still have the device driver offline, but loaded.

Unloading a device driver in RSX means that the driver code is removed from memory, the device driver database marks the device as offline, and that's it. Any memory used by the device driver is freed, so it can be used by other things, such as programs. However, the device driver database is not removed. It's not feasible to remove all possible references to the database.

So, in RSX, all programs can always do I/O to *all* devices known to the system. And without any special preparations or setups. LOAD is for adding even more devices to the known list.
(all within the restrictions of protection and device allocation, of course, which can restrict access)

Not sure exactly what your distinction between unload and remove is.
In RSX terms, you LOAD and UNLOAD device drivers. In 11M, an implicit
online of a device is done when you load it, and offline is done on a
device before unloading it. In M+ the offline and online steps are
separate commands, which just requires that a device driver is loaded.
In RT-11, a device driver must be INSTALLed and the
name placed into the Permanent Physical Device Table
before a LOAD can be performed.   The INSTALL code
checks that the device driver is compatible with the
operating system parameters, among other things.   A
user may then UNLOAD and REMOVE (in that order)
a device driver if a different version of the device driver
is needed, such as for testing a new version.

Yes, I see where you are coming from now. So, the RSX LOAD (which is done on the running system) is actually equivalent to the INSTALL in RT-11. There is no equivalent to the RT-11 LOAD, all devices are always available.

Even more fun is M+ is that device drivers do not need to be
recompiled if you recompile the kernel. Device drivers are totally
independent of the kernel.
Likewise in RT-11.   In fact, I believe RT-11 has always
been that way.

Remember, I'm talking about the equivalent of RT-11 INSTALL here... Ie, I can do a SYSGEN, and build a totally new RSX system, but still use a device driver from a previous SYSGEN just fine. Even though the new kernel have different stuff compiled in, and databases and routines have moved to different addresses.

In respect of RSTS/E, is this possible as well or does RSTS/E
have the same requirement as TSX-Plus?
I think RSTS/E is less flexible, from what I can remember.
TSX-Plus is similar.   All device drivers must be LOADed and
permanently resident at boot time.

So, how is it with RT-11. Can you INSTALL a new device driver into a running system and use it, without performing a reboot?

	Johnny



More information about the Hecnet-list mailing list