Synchronization

The shared directory is permanently accessed by PDP-11 and host user operations. These concurrent accesses are resolved by synchronisation logic.

Packing, unpacking

tu58fs controls two data sources:

  • the "TU58" tape image resides in memory and is accessed by PDP-11 over serial protocol machine.
  • The set of files in the shared host directory is accessed independently by host user operations, such as Drag'n Drop.

Synchronization is done in these steps:

  1. the TU58 device is locked against further RS232 access
  2. tu58fs "unpacks" the tape image into an internal file system representation.
  3. Changes of PDP-11 file system and host dir file set are analyzed
  4. host directory and the internal PDP filesystem are aupdated against each other
  5. the internal PDP-file system is packed into the binary tape image and discarded
  6. the tape device is unlocked

Timing

tu58fs scans the shared host dir and the internal PDP filesystem in regular intervals for file changes. This time is set by parameter "<synctimeout>". Since TU58 tape operation can be very slow, the <synctimeout> should be not faster than 3 seconds.

The scanning intervals are synchronized with TU58 tape operation: In any case tu58fs synchronized only if RS232 communication has been silent for <synctimeout> seconds.

Overflow and file name collisions

It's easy to copy more files into the shared hist dir than the "tape" can hold ... it's only 256KB big. In that case, tu58fs dispalys a waring and deletes the offending file from the hostdir.

The same applies for file name collisions. Since file names on XXDP ad RT-11 are only 6.3, two host file can get mapped to the same PDP file name. In this case one of the host files is deleted, usually the newly added one.

Readonly image

If the shared device is of type "readonly", changes in the shared directory are always reverted to the content of the TU58 image. So the dir is not read-only on itself, but changes can't be made.

 

Bottom line: In any case the shared host directory reflects the state of the TU58 tape.

 

The RT-11 file system

The RT-11 filesystems has some (almost) hidden features build in, which are supported by tu58fs.

Information was drawn from the latest "RT-11 V5.6 Volume and File Formats Manual", order number AA-PD6PA-TC, August 1991.

 

Directory layout

RT-11 is optimized for real time data collection, so all file are contiguous and the space for directory entries is preallocated. DEC uses some defaults for directory sizes, depending on the disk size. Tu58fs calculates an optimal setting each time it "packs" files into a file system iamge.. So tu58fs implements some kind of dynamic directory allocation.

Extended directory entries

Under RT-11, the file systen can be modified to have directory entries with extra space. These extra space can only be accessed byspecial user programs, no RT-11 disk images are known to support this.

If tu58fs detects extended directory entries, and sees non-null data there for a file <filename>, it produces a small file "<filename>.dirext" with those extra bytes.

On the other hand, you can also put files with extension ".dirext" into the shared directory. Then the RT-11 file system is generated with enough extra space in the directory entries to hold all ".dirext" content, and the content of ".dirext" files is saved in these direcotrie entries.

".dirext" files are limited to 16 bytes (my decision!). Changes in the ".dirext" directories entries are not monitored by synchronization.

 

File prefixes

The data stream of a RT-11 can be marked to have a "prefix". This is just a user formatted special data block before the file data (Hard to understand if you're grown up with Unixes). If a file has a prefix a special bit "EPRE" is set in its directory entry status word.

Despite the EPRE flag, RT-11 does not recognize prefixblocks and sees them as part of the file data. Prefix format is undefined, according to DEC recommendation the first byte on the volume contains the block coount of the prefix.

If tu58fs detects a file prefix for file "<filename>", it maps the content of the prefix in to the extra file "<filename>.prefix". And if a file with extension ".prefix" is detected on pack, this data goes into the file prefix.

 

Booting RT-11 from a TU58 image

Normally RT-11 is booted from some kind of disk: mostly RX floppy, or RK/RL drives.

There's nothing special to make a bootable TU58 image. Since June 2015 SimH 4 supports TU58 as "TDC" device.

Here's the walk through for making a bootable TU58 from a full RL02 system disk, saved in image file "rt11v53.rl02". The resulting TU58 tape image is "rt11v53.tu58".

SimH commands:

sim> set rl0 rl02
sim> attach rl0 rt11v53.rl02
sim> set tdc enable
sim> attach tdc0 rt11v53.tu58
sim> boot rl0

You have no RT-11 running.

RT-11 commands

Copy now the RT-11 core files onto the TU58 images. The size of 256KB allows only for a base system.

.init/noquery dd0:
.copy rt11sj.sys dd0:
.copy dd.sys dd0:
.copy swap.sys dd0:
.copy tt.sys dd0:
.copy dl.sys dd0:
.copy starts.com dd0:
.copy dir.sav dd0:
.copy dup.sav dd0:
.copy pip.sav dd0:
.copy help.sav dd0:
.copy resorc.sav dd0:
.copy/boot:dd dd0:rt11sj.sys dd0:
.dir dd0: .boot dd0:

"Help" needs much space, but I love it. The RT-11 PDFs on your screen will do as well. Be sure to add all device drivers you need in your '11. Only the Singe Job SJ system is installed, so "??X.SYS" drivers are not needed.

The new tape is verified by booting from it.