Besides the actual arithmetic and logic unit and a main memory in which a program to be executed is provided, a computer system can also comprise a buffer store. Buffer-stored data are accessed more quickly than the data stored in the main memory. The advantage of high access speed with simultaneously low power consumption usually entails the drawback that the buffer store is smaller than the main memory, however.
A data word which is to be processed in the arithmetic and logic unit can be accessed by virtue of the arithmetic and logic unit loading the data word which is to be processed from the buffer store if it is available there. If this is not the case, the data word is loaded from the main memory and is stored in the buffer store before or after the processing. This means the data already buffer-stored in the buffer store can be displaced by the new data word which is to be buffer stored.
There are various designs for the association of the data words which are to be buffer-stored with buffer-store locations in the buffer store. By way of example, data from the main memory can be associated with the buffer-store locations in the buffer store on the basis of the addresses of said data.
Buffer-storage may result in ineffective use of the buffer store if a plurality of data words which are frequently to be processed share one or a few buffer-store locations and displace one another, which means that, although the data words are required frequently, they repeatedly need to be loaded from the main memory. This effect can arise particularly disadvantageously if two data words which are to be processed alternately displace one another with every loading operation at a buffer-store location, which means that they have to be loaded from the main memory again with every loading operation. In such a case, the operation of the computer system with a buffer store can become slower than the operation of a computer system without a buffer store. In addition, it is also conceivable for buffer-store locations in other areas of the buffer store to be taken up by a word which has been called just once and which is then no longer required.
One situation in which such problems may arise is the use of virtual machines, such as what is known as a JVM, short for “Java Virtual Machine”.
The program to be processed is in the form of a succession of instruction words, for example, which is also called bytecode. This is a type of intermediate code which refers to machine instructions and prescribes what sequence of machine instructions is to be supplied to the arithmetic and logic unit. The machine instructions are loaded for processing either from the main memory or from the buffer store.
Previous approaches to making better use of the buffer store have been of a more general nature with no account being taken of application-specific properties. The field of JVMs pursues the approach of developing special machine instructions optimized for Java. Secondly, there are software techniques for minimizing the number of instructions or bytecode instructions.