November 15, 2016

Design Principles for Modern Systems

There is a set of design principles, sometimes called the RISC (reduced instruction set computer) design principles that architects of new general-purpose CPUs do their best to follow. Some major ones are:

1.   All Instructions Are Directly Executed by Hardware
All common instructions are directly executed by the hardware. They are not interpreted by microinstructions. Eliminating a level of interpretation provides high speed for most instructions.

2.   Maximize the Rate at Which Instructions Are Issued
Modern computers resort to many tricks to maximize their performance, chief among which is trying to start as many instructions per second as possible. This principle suggests that parallelism can play a major role in improving performance, since issuing large numbers of slow instructions in a short time interval is possible only if multiple instructions can execute at once.
Although instructions are always encountered in program order, they are not always issued in program order (because some needed resource might be busy) and they need not finish in program order. Getting this right requires a lot of bookkeeping but has the potential for performance gains by executing multiple instructions at once.

3.   Instructions Should Be Easy to Decode
A critical limit on the rate of issue of instructions is decoding individual instructions to determine what resources they need. Anything that can aid this process is useful. That includes making instructions regular, of fixed length, and with a small number of fields. The fewer different formats for instructions, the better.

4.   Only Loads and Stores Should Reference Memory
One of the simplest ways to break operations into separate steps is to require that operands for most instructions come from—and return to—CPU registers. The operation of moving operands from memory into registers can be performed in separate instructions. Since access to memory can take a long time, and the delay is unpredictable, these instructions can best be overlapped with other instructions assuming they do nothing, except move operands between registers and memory.
This observation means that only LOAD and STORE instructions should reference memory. All other instructions should operate only on registers.

5.   Provide Plenty of Registers

Since accessing memory is relatively slow, many registers (at least 32) need to be provided, so that once a word is fetched, it can be kept in a register until it is no longer needed. Running out of registers and having to flush them back to memory only to later reload them is undesirable and should be avoided as much as possible. The best way to accomplish this is to have enough registers.

No comments:

Post a Comment