Introduction
the hardware, the operating system, the application programs,
and the users(四部分:硬件、操作系统、应用程序和用户)
10
Chapter 1 Introduction
All forms of memory provide an array of bytes. Each byte has its
own address. Interaction is achieved through a sequence of load or store
instructions to specific memory addresses. The load instruction moves a byte
or word from main memory to an internal register within the CPU , whereas the
store instruction moves the content of a register to main memory. Aside from
explicit loads and stores, the CPU automatically loads instructions from main
memory for execution.
A typical instruction–execution cycle, as executed on a system with a von
Neumann architecture, first fetches an instruction from memory and stores
that instruction in the instruction register. The instruction is then decoded
and may cause operands to be fetched from memory and stored in some
internal register. After the instruction on the operands has been executed, the
result may be stored back in memory. Notice that the memory unit sees only
a stream of memory addresses. It does not know how they are generated (by
the instruction counter, indexing, indirection, literal addresses, or some other
means) or what they are for (instructions or data). Accordingly, we can ignore
how a memory address is generated by a program. We are interested only in
the sequence of memory addresses generated by the running program.
Ideally, we want the programs and data to reside in main memory
permanently. This arrangement usually is not possible for the following two
reasons:
1. Main memory is usually too small to store all needed programs and data
permanently.
2. Main memory is a volatile storage device that loses its contents when
power is turned off or otherwise lost.
Thus, most computer systems provide secondary storage as an extension of
main memory. The main requirement for secondary storage is that it be able to
hold large quantities of data permanently.