[Info-vax] Use of logical names other than I/O redirection
Jonathan
jtcegh at gmail.com
Wed Sep 14 17:32:38 EDT 2022
25 years ago or so I implemented query queues using logicals (and locks.) I thought the implementation would be replaced at some point, but it's still in use. Description from the sources:
! Query/Reply queues implemented using logical tables
!
! The data for each queue is stored in individual logicals in
! a logical table created for the queue in the system logical
! table directory.
!
! The logical table has four kinds of logical.
! Logical: Contains:
! VERSION current version of queue. The value is
! a hexadecimal time string.
! <version>_TAIL the index of the last item in the queue.
! The value is a decimal string.
! Item numbering starts at 1
! <version>_ENTRY_<n> The state of the <n>th item in the queue.
! The states are QUERY and REPLY and describe
! the contents of the buffer.
! <version>_BUFFER_<n> The buffer holding the data for the
! <n>th item in the queue. This logical
! may have multiple translations. The data
! is the concatenation of all the translations.
!
! Together the _<n> suffixed logicals constitute an item in the queue.
!
! The reason for the separate queue entry and buffer logicals:
! 1) The upper limit on a logical value is 255 bytes.
! 2) Buffers need to be larger than 255 bytes. The required
! larger buffers are implemented as logical arrays (search lists.)
! 3) Creating a logical array is not an atomic operation. A reader
! may see a partial array.
! 4) The logical arrays are created before the queue entries that
! point to them. The queue entries are created in an atomic
! operation.
!
! The version is used to avoid problems when a querier sets a timeout
! long enough for the replier to shutdown/die and restart. The replier
! creates a new queue, destroying any old queue. If there were no
! versions the querier might read someone-else's later query.
Jonathan
More information about the Info-vax
mailing list