Unit 1 Hardware

    1. A Closer Look at the Processor and Primary Storage

We have learned that all computers have similar capabilities and perform essentially the same functions, although some might be faster than others. We have also learned that a computer system has input, output, storage and processing components; that the processor is the “intelligence” of a computer system; and that a single computer system may have several processors. We have discussed how data are represented inside a computer system in electronic states called bits. We are now ready to expose the inner workings of the nucleus of the computer system一the processor.

我们已经了解到,所有计算机都具有相似的功能,执行基本相同的功能,尽管有些计算机可能比其他计算机更快。我们还了解到,计算机系统具有输入、输出、存储和处理组件;处理器是一个计算机系统智能核心;并且一个计算机系统可以具有多个处理器。我们已经讨论过如何在计算机系统内部,用被称作“位”的电子状态来表现数据。我们现在准备揭露计算机系统核心,即处理器,的内部工作原理。

The internal operation of a computer is interesting, but there really is no mystery to it. The mystery is in the minds of those who listen to hearsay and believe science-fiction writer. The computer is a nonthinking electronic device that has to be plugged into an electrical power source, just like a toaster or a lamp.

计算机的内部操作很有意思,但它并没有什么神秘之处。所谓的神秘在于那些听信传闻和相信科幻小说作家的人。计算机是一种没有思想的需要接通电源的电子设备而已,与烤面包机和灯差不多。

Literally hundreds of different types of computers are marketed by scores of manufacturers. The complexity of each type may vary considerably, but in the end each processor, sometimes called the central processing unit or CPU, has only two fundamental sections: the control unit and the arithmetic and logic unit. Primary storage also plays an integral part in the internal operation of a processor. These three - primary storage, the control unit, and the arithmetic and logic unit - work together. Let’ s look at their functions and the relationships between them.

不夸张的讲,市场上有几百中不同类型的计算机在销售。每种类型的处理器的复杂程度可能会有很大的差异,但最终每个处理器,有时被称为中央处理器或CPU,只有两个基本部分:控制单元和算术逻辑单元。主存储器在处理器的内部操作中也起着不可或缺的作用。这三个单元——主存储器、控制单元、算术和逻辑单元——协同工作。让我们来看看它们的功能以及它们之间的关系。

Unlike magnetic secondary storage devices, such as tape and disk, primary storage has no moving parts. With no mechanical movement, data can be accessed from primary storage at electronic speeds,or close to the speed of light. Most of today’s computers use DRAM (Dynamic Random-Access Memory) technology for primary storage. A state of the art DRAM chip about one eighth the size of a postage stamp can store about 256000000 bits, or over 25600000 characters of data!

主存与其他的辅助存储器(如:磁带、磁盘)不一样的是,主存储没有移动部件。由于没有机械运转,主存访问数据可以达到电子的速度,或接近光速。今天的大多数计算机使用DRAM(动态随机存取存储器)技术作为主存储器。目前最新的工艺水平是:一块只有大约1/8张邮票大小的DRAM芯片可以存储大约256000000位,或者超过25600000个字符的数据!

Primary storage, or main memory, provides the processor with temporary storage for programs and data. All programs and data must be transferred to primary storage from an input device (such as a VDT) or from secondary storage (such as a disk) before programs can be executed or data can be processed. Primary storage space is always at a premium; therefore, after a program has been executed, the storage space it occupied is reallocated to another program awaiting execution.

主存储器或主存储器为处理器提供程序和数据的临时存储。在执行程序或处理数据之前,所有程序和数据必须从输入设备(如VDT)或从辅助存储器(如磁盘)传输到主存储器。主存储空间总是非常珍贵;因此,在一个程序被执行之后,它所占用的存储空间被重新分配给另一个等待执行的程序。

Figure 1-1 illustrates how all input/output (I/0) is “read to” or “written from” primary storage. In the figure, an inquiry (input) is made on a VDT. The inquiry, in the form of a message, is routed to primary storage over a channel (such as a coaxial cable). The message is interpreted, and the processor initiates action to retrieve the appropriate program and data from secondary storage. The program and data are “loaded", or moves, to primary storage from secondary storage. This is a nondestructive read process. That is, the program and data that are read reside in both primary storage (temporarily) and secondary storage (permanently). The data are manipulated according to program instructions, and a report is written from primary storage to a printer.

图1-1说明了如何将所有输入/输出(I/0)“读取到”或“写入”主存储器。在图中,对VDT进行查询(输入)。以消息的形式进行的查询通过通道(如同轴电缆)路由到主存储器。该消息被解释,处理器启动从辅助存储器检索适当程序和数据的操作。程序和数据从辅助存储器“加载”或移动到主存储器。这是一个非破坏性读取过程。也就是说,读取的程序和数据同时位于主存储器(临时)和辅助存储器(永久)中。数据根据程序指令进行操作,并将报告从主存储器写入打印机。

A program instruction or a piece of data is stored in a specific primary storage location called an address. Addresses permit program instructions and data to be located, accessed, and processed. The content of each address is constantly changing as different programs are executed and new data are processed.

一条程序指令或一段数据存储在一个称为地址的特定主存储位置。地址允许定位、访问和处理程序指令和数据。随着不同程序的执行和新数据的处理,每个地址的内容不断变化。

Another name for primary storage is random-access memory, or RAM. A special type of primary storage, called read-only memory (ROM), cannot be altered by the programmer. The contents of ROM are “hard-wired” (designed into the logic of the memory chip) by the manufacturer and can be “read only”. When you turn on a microcomputer system, a program in ROM automatically readies the computer system for use. Then the ROM program produces the initial display screen prompt.

主存储器的另一个名称是随机存取存储器或RAM。一种特殊类型的主存储器,称为只读存储器(ROM),程序员不能更改。ROM的内容由制造商“硬连线”(设计成存储芯片的逻辑),可以“只读”。当你打开微型计算机系统时,ROM中的程序会自动为计算机系统做好使用准备。然后ROM程序产生初始显示屏幕提示。

A variation of ROM is programmable read-only memory (PROM). PROM is ROM into which you, the user, can load “read-only” programs and data. Once a program is loaded to PROM, it is seldom, if ever, changed. However, if you need to be able to revise the contents of PROM, there is EPROM, erasable PROM. Before a write operation, all the storage cells must be erased to the same initial state.

ROM的一种变体是可编程只读存储器(PROM)。PROM是ROM,用户可以将“只读”程序和数据加载到其中。一旦一个程序被加载到PROM,它很少被更改。但是,如果你需要能够修改PROM的内容,有EPROM,可擦除PROM。在进行写入操作之前,必须将所有存储单元擦除到相同的初始状态。

A more attractive form of read mostly memory is electrically erasable programmable read-only memory (EEPROM). It can be written into at any time without erasing prior contents; only the byte or bytes addressed are updated.

一种更吸引人的只读存储器形式是电可擦可编程只读存储器(EEPROM)。它可以在任何时候写入,而无需擦除先前的内容;只有被寻址的一个或多个字节被更新。

The EEPROM combines the advantage of nonvolatility with the flexibility of being updatable in place, using ordinary bus control, address, and data lines.

EEPROM结合了非易失性的优点和可就地更新的灵活性,使用普通的总线控制、地址和数据线。

Another form of semiconductor memory is flash memory (so named because of the speed). Flash memory is intermediate between EPROM and EEPROM in both cost and functionality. Like EEPROM, flash memory uses an electrical erasing technology. An entire flash memory can be erased in one or a few seconds, which is much faster than EPROM. In addition, it is possible to erase just blocks of memory rather than an entire chip. However, flash memory does not provide byte-level erasure. Like EPROM, flash memory uses only one transistor per bit, and so achieves the high density of EPROM.

半导体存储器的另一种形式是闪存(因速度而得名)。闪存在成本和功能上都介于EPROM和EEPROM之间。与EEPROM一样,闪存使用电擦除技术。整个闪存可以在一秒钟或几秒钟内擦除,这比EPROM快得多。此外,可以只擦除存储器块,而不是整个芯片。然而,闪存不提供字节级擦除。与EPROM一样,闪存每比特只使用一个晶体管,因此实现了EPROM的高密度。

Cache Memory

Program and data are loaded to RAM from secondary storage because the time required to access a program instruction or piece of data from RAM is significantly less than from secondary storage. Thousands of instructions or pieces of data can be accessed from RAM in the time it would take to access a single piece of data from disk storage. RAM is essentially a high-speed holding area for data and programs. In fact, nothing really happens in a computer system until the program instructions and data are moved to the processor. This transfer of instructions and data to the processor can be time-consuming, even at microsecond speeds. To facilitate an even faster transfer of instructions and data to the processor, most computers are designed with cache memory. Cache memory is employed by computer designers to increase the computer system throughput (the rate at which work is performed).

程序和数据从辅助存储器加载到RAM,因为从RAM访问程序指令或数据段所需的时间明显少于从辅助存储器访问。在从磁盘存储器访问单个数据所需的时间内,可以从RAM访问数千条指令或数据。RAM本质上是用于数据和程序的高速存储区域。事实上,在程序指令和数据被移动到处理器之前,计算机系统中什么都不会真正发生。这种将指令和数据传输到处理器的过程可能非常耗时,即使是以微秒的速度。为了更快地将指令和数据传输到处理器,大多数计算机都设计了高速缓存。计算机设计者使用高速缓冲存储器来增加计算机系统的吞吐量(执行工作的速率)。

Like RAM, cache is a high-speed holding area for program instructions and data. However, cache memory uses SRAM (Static RAM) technology that is about 10 times faster than RAM and about 100 times more expensive. With only a fraction of the capacity of RAM, cache memory holds only those instructions and data that are likely to be needed next by the processor. Two types of cache memory appear widely in computers. The first is referred to as internal cache and is built into the CPU chip. The second, external cache, is located on chips placed close to the CPU chip. A computer can have several different levels of cache memory. Level 1 cache is virtually always built into the chip. Level 2 cache used to be external cache but is now typically also built into the CPU like level 1 cache.

与RAM一样,高速缓存是程序指令和数据的高速存储区域。然而,高速缓冲存储器使用SRAM(静态RAM)技术,该技术比RAM快大约10倍,并且贵大约100倍。高速缓冲存储器的容量只有RAM的一小部分,只保存处理器接下来可能需要的指令和数据。两种类型的高速缓冲存储器广泛出现在计算机中。第一个被称为内部缓存,内置在CPU芯片中。第二个是外部缓存,位于靠近CPU芯片的芯片上。一台计算机可以有几个不同级别的缓存。一级缓存实际上总是内置在芯片中。二级缓存曾经是外部缓存,但现在通常也像一级缓存一样内置在CPU中。

  • 19
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值