Memory Efficiency
Authors: Joachim Gertrud S. 
Published: July 2002

Memory is the heart of today's electronic computers—memory serving as a fast-access storage unit and also being used in the execution of computer commands. The problem of memory efficiency, therefore, is one of great importance. Complete efficiency has not yet been attained and research to achieve it has been up to now rather limited.

This article deals with the question: During how much of the time for a computer program is memory inactive? In other words, how efficiently in time is the memory being used? Memory efficiency in space, or the nature of the words stored in the memory, is not considered. Memory-active time and total computer running time—determined from analyzed computer programs—are reported. The 1103 UNIVAC Scientific computer was used for the study.

The UNIVAC 1103 is a general purpose digital computer with a two-address logic. Its repertoire consists of 41 different commands indicating arithmetic, logical and other operations. One command and two execution addresses make up an instruction. A program—a sequence of instructions—is required for solving a problem on this as on other computers. The 41 commands need different time intervals for their execution. These time intervals are measured by the number of computer clock pulses that occur. The clock pulses are two micro-seconds apart. The commands contain various numbers of read and write subcommands whose signals are received by the magnetic core memory.
1
The time intervals necessary for execution of the read and write subcommands in a command will be called memory-active time for that command and will be expressed as a number of clock pulses.

In order to determine the memory efficiency of the computer the portion of total computer running time during which the memory is active was calculated from actual programs. The program sample, analyzed into the different commands, consisted of ten library routines—five arithmetic fixed point and five arithmetic floating point routines—containing 31 different commands.

J. H. Chung, C. C. Gotlieb, and D. E. Muller, in their paper “A Study of the Order Types and References to Store in some ILLIAC and FERUT Library Routines,” presented at the ACM meeting in Houston, Texas, June 1957, used special interpretive routines to carry out the necessary counting while the machine was operating on a selected program. In view of the high cost of such procedures, the writer had to make all her analyses manually—that is, off-computer.

The total computer running time necessary for carrying out a command depends primarily upon the operations involved (arithmetic, jump, logical, transmit, etc.). The divide command, for example, takes about ten times as long as a transmit command. However, the time also varies
within
each command depending upon the registers specified in the two addresses of this command. The following registers of the 1103 are individually addressable: the magnetic core memory, the accumulator (A), the Q register and the magnetic drum. However the magnetic drum was not considered in this study.

There are nine different combinations possible for the first three of these registers: core and core, core and A, core and Q, A and core, A and A, A and Q, Q and core, Q and A, and Q and Q in the two addresses. These were combined into the following three cases:

the magnetic core in both addresses,

the magnetic core in one and A or Q in the other one,

A or Q in both addresses.

The basic computer running times and the basic memory-active times had already been established for all commands and each of the nine combinations. These values were averaged to obtain the basic computer running times and the basic memory-active times per command for the three cases. Each routine was then analyzed by counting the occurrences (executions) of each command in each of the three cases and the data from all ten routines were combined. Executions were counted by following the paths indicated by the repeat and the unconditional jump commands. With off-computer analysis only the major branches of the conditional jump commands can be taken into account. The total computer running times and the total memory-active times for the three cases for each command were obtained by multiplying the basic times by the total number of executions in all ten routines. Average computer running times per command, based on this study, were then established. They ranged from 9 to 241 clock pulses and were used for a classification of the commands. The commands were separated into three groups: fast, intermediate, and slow, as shown in table 1, which lists these average computer running times for all observed commands in descending order. The findings of this study will be presented for the three groups of commands.

Results
. Table 2 shows (1) the number and percent of executions, (2) number and percent of total computer running times, (3) number and percent of memory-active times, percent of memory-active times in total computer running time, (4) percent of memory-inactive times and percent of memory-inactive times in total computer running time for the three groups of commands. The results were as follows:

In all 2933 executions of commands in the combined ten routines
the memory was active in only 33% of total computer running time
.

The slow commands, using 45% of total computer running time, account for 61/100 of 67% memory-inactive time or 41% of total computer running time.

The intermediate commands, using 21% of total computer running time, account for 24/100 of 67% memory-inactive time or 16% of total computer running time.

The slow commands, using 34% of total computer running time, account for 15/100 of 67% memory-inactive time or 10% of total computer running time.

Evidently the percent of memory-inactive time for any one program will depend greatly upon the relative number of slow, intermediate and fast commands it contains. It seemed to be of interest to obtain the values for the memory-inactive times from each of the ten routines individually. For the combined commands of any one routine, the values for the memory-inactive time ranged from 55% to 82% of total computer running time.

It should be emphasized that the results discussed came from a small sample of routines. The variability of the factors influencing computer running times of the commands have already been pointed out.

This study indicated that the memory was not used efficiently and therefore suggests that the inactive memory might simultaneously be used for other purposes, for example for input or for output.

Although only the UNIVAC 1103 computer was used for this study and the computer running times for the commands were calculated only for the 1103, it is believed that the described method could be adapted to similar studies on other computers, either the one-, two-, or three-address systems.