| OCR Text |
Show 5.4.2 History Stream The history must be able to restore the entire state of a process: a program counter, registers, and the main memory. For the purposes of measurements and estimates of the amount of data in the history, it is assumed that the processor has 32-bit words. Assuming that a machine instruction modifies the program counter and at least one more location, a simple approach would save at least three words in one history element: the previous value of the program counter, the address of the modified location, and the old value of the modified location. Registers can have dedicated addresses from an unused part of the address space. Three words of a history element would take 12 bytes. Since a history element is generated for each executed instruction, this straightforward approach would generate 12 Mbytes of history for 1 million executed instructions. Cleary, this amount of data prohibits the storage of any significant history period. A practical alternative is to record in the history only those history elements that contain changes to the main memory. Statistics of executed instructions in many applications show that a Store operation to the main memory constitutes around 10% of all executed instructions [31, 67]. Since each Store to the main memory is represented in the history by two words containing the memory address and the previous value at that address, this approach generates 0.8 Mbytes of history for 1 million executed instructions, a 15-fold compaction over a straightforward approach. The processor state which includes the values of the instruction counter, the program counter and registers is saved to the history at regular intervals (see Figure 5.8). These are execution states. They provide a complete process state and the process in these states can continue execution. Intermediate states between execution states can be obtained by re-executing the process from an execution 136 |