Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ OverviewNo.1No.2No.3No.4No.5No.6No.7No.8No.9No.10No.11No.12No.13No.14No.15No.16No.17No.18No.19No.20No.21No.22No.23No.24No.25No.26No.27No.28No.29No.30No.31No.33No.34
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureProgress ReportsSPROGS Notes
ACLLiteratureProgress ReportsSPROGS Notes
ACL ACD C&A INF CCD CISD Archives
Further reading

Overview
No.1
No.2
No.3
No.4
No.5
No.6
No.7
No.8
No.9
No.10
No.11
No.12
No.13
No.14
No.15
No.16
No.17
No.18
No.19
No.20
No.21
No.22
No.23
No.24
No.25
No.26
No.27
No.28
No.29
No.30
No.31
No.33
No.34

SPROGS Note No 25: Garbage Collection, REPEAT, ENDS, RUNOUT, ADVFLM.

R E Thomas

31 August 1973

1. Garbage Collection

With the introduction of basic files (files containing SD4020 orders), it is more than ever likely that a considerable number of files of a temporary nature will be created. As the file store is used linearly, there will be a number of gaps in the store which could be re-utilised.

Currently there is no method of linking parts of a file together, so making use of the fragments without any garbage collection is not a working proposition. It is therefore necessary to have some form of collector which can close up files, removing all dead space.

Such a collector could be called each time a file was deleted (which would be time consuming), automatically when the storage ceiling was reached, or it could be called explicitly by the user, which would not involve any saving of file pointers. A simple test for the deletion of the last file in the store could be made as well, thus saving space. At the moment, files can only be deleted by reusing the file name, but a further command can be added to delete a file explicitly.

To assist the collector, an extra word will be added to each file header for a backward pointer to the file table. This pointer will be zero if the file has been deleted. The garbage collector will therefore scan the file store, moving all files up past any deleted space, and using the backward pointer to find the appropriate file table entry so that the file pointer in the table can be corrected. The library system will have to set up this backward pointer when a file is read into store.

2. REPEAT

The REPEAT command causes the current file to be re-read, However, when wishing to DRAW a picture and then use it in a sequence of many frames, it is often necessary to create two files, the second consisting of the same commands as the first, together with a final REPEAT, so that the file is not deleted on reaching the end of the file, To avoid this file duplication, the second argument of ADSQLG, ADSQLL will be interpreted as a bit-setting, as follows:

1.0    restore variable on return from ADVFLM 
2.0    repeat this file on reaching the end-of-file mark. 

3. ENDS

BEGINS and ENDS are used to bracket a series of orders following WHILE. When the condition is unsatisfied, it is necessary to step past all bracketed commands. At the moment this is done by reading and junking the lines from the file (which action is necessary anyway if the intervening orders have never been obeyed). However, by adding an extra common variable, it would be possible to save the current file position after each ENDS. Then, as long as the orders between the brackets have been obeyed once, the system can find the appropriate place following an unsatisfied condition immediately.

It was eventually decided not to add this common variable. The saving gained depends on the number of times each loop is obeyed and on the length of the loop, and most loops are expected to be short in length, but obeyed many times.

4: RUNOUT

A separate routine to provide leader for microfilm is required, since the repeated use of ADVFLM leads to unnecessary overheads.

5. ADVFLM

Allowing advance frame orders to be stored in a basic file can easily lead to frames getting out of step (in particular when defining a background for use in a sequence list). It has therefore been decided that no advance frame orders will be stored, but a warning message issued each time an advance frame is obeyed during STSAV (the advance will be ignored). In this way, it will not be necessary to duplicate files, one with ADVFLM and one without, when requiring to save the current sequence output for future use.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site