类型详细计算机专业英语教学教育资料(第5版)翻译编辑版.doc

收藏

编号:2627106    类型:共享资源    大小:73.49KB    格式:DOC    上传时间:2020-04-25
  
8
金币
分享到微信 分享到微博 分享到QQ空间
关 键 词:
详细 计算机专业 英语教学 教育 资料 翻译 编辑 编纂
资源描述:
\\ 1.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 [1]. 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 256,000,000 bits, or over 25,600,000 characters of data! 主存与其他的辅助存储器(如:磁带、硬盘)不一样的是,主存不含有运转部件。由于没有机械运转的需要,主存种数据访问可以达到电子的速度,或接近于光速。当今计算机的主存大多数使用DRAM(动态随机存取存储器)技术。目前最新的工艺水平是:一块只有大约1/8张邮票大小的DRAM芯片却可以存储大约256,000,000位,约25,6000,000个字符的数据。 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/O) 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 [3].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描述了输入/输出设备与主存储器间的读和写过程。在图中,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中的一个程序会自动就绪等待计算机系统的调用,然后在显示器中显示开机提示。 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 [4]. 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. 可编程只读存储器(PROM)是另一种ROM,它可以载入只读的程序和数据,一旦载入,将不再改变。然而,若果你需要去修正PROM的内容,可以使用可擦可编程只读存储器。 EPROM在进行一次写操作之前,所有的存储单元必须被还原为同一初始状态。 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 [6], using ordinary bus control, address, and data lines. 电可擦可编程存储器把非易失性优点和可更新、需要更新的地方的灵活性结合起来,修改时使用普通的总线控制线、地址线和数据线。 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 [7]. Like EPROM, flash memory uses only one transistor per bit, and so achieves the high density of EPROM. 另一种半导体记忆体是闪存(意味着速度快)。闪存在性价比上处于EPROM和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 [8]. 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是数据和程序的重要的高速存放区,事实上,计算机系统不会进行任何操作直到程序指令被传入处理器进行执行,这种指令和数据的传输是需要花费时间的,即使传输速度已经是以纳秒来计算了。为了能更快速的传输指令和数据,大多数计算机设计使用高速缓存。计算机设计者使用高速缓存来提高计算机系统的总处理能力(工作效率)。 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一样,高速缓存也是程序指令和数据的高速存储区。然而,高速缓存使用静态RAM技术,这种技术比RAM在速度上要高出10倍,价格上高出100倍。cache只保存内存中那一小部分最有可能被处理器执行的指令和数据。两种类型的cache广泛应用于计算机,第一种被植入cpu中的叫做内部高速存储,第二种是外部高速存储,它位于那些靠近cpu的芯片中。一台计算机可以拥有几个不同级别的高速缓存。一级缓存实际上总是植入芯片中,二级缓存过去常常作为外部高速缓存,但是现在也像一级缓存植入cpu内部。 3.2 C++和面向对象的程序设计 一些面向对象的程序设计概念在语言间渗透。例如微软Quick Pascal是允许使用对象的第一批语言中的一个。C++有什么使得它是一种适合于开发面向对象程序的语言?如同先前所提到的,答案是类(class)数据类型。给该语言建立对象之能力的是建立在C结构类型之上的C++类(class)类型。还有,C++把另外几个特性引入面向对象的程序设计,这些特性并不包含在简单地利用对象的其他一些语言中。C++的优点包括强类型、运算符重载和较少地强调预处理。的确你能使用其他一些产品和采用其他一些语言来进行面向对象的程序设计,但是采用C++的众多好处是显著的。这是为面向对象的程序设计而设计的语言,并非(现有语言的)式样翻新。 面向对象的程序设计是一种程序设计技术,使得你能把一些概念看作各种各样的对象。通过使用对象,你能表示要被执行的任务、它们之间的相互作用和必须观察的某些给定的条件。一种数据结构经常形成某个对象的基础;因此,在C或C++中,结构类型能形成某种基本对象。与对象的通信,如前提到的,能通过使用消息来完成。消息的使用类似于在面向过程的程序中对函数的调用。当某对象收到一个消息时,包含在该对象内的一些方法作出响应。方法类似于面向过程程序设计的函数。然而,方法是对象的一部分。 C++的类是对C和C++结构类型的扩充,并且形成了面向对象程序设计所需要的抽象数据类型。类能包含紧密相关的一些条目,它们共享一些属性。更正式地说,对象只不过是类的实例。 最终,应该出现包含很多对象类型的类库,你能使用这些对象类型的实例去拼合程序代码。 在你更详细地考察这些术语之前,一个好的主意是熟悉与C++和面向对象程序设计相关的另外几个概念,如同下面几节所述的。 封装 封装指的是每个对象把它的成员数据和成员函数(方法)组合成单个结构的方式。图3-1举例说明了你如何能组合数据域和方法以建立对象。 数据域 方法 数据 数据 成员函数 成员函数 成员函数 数据 数据 成员函数 成员函数 成员函数 图3-1 为建立对象而组合的数据域和方法 典型地,一个对象的描述是一个C++类的一部分, 且包括对该对象内部结构的描述、该对象如何与其他对象相关,以及把该对象的功能细节和该类的外部相隔离的某种形式的保护。C++类结构做到了所有这些。 在一个C++类中,你使用私有的、公共的和/或受保护的描述符来控制对象的功能细节。在面向对象的程序设计中,公共(public)部分一般用于接口信息(方法),使得该类可在各应用中重用。如果数据或方法被包含在公共部分,它们在该类外部也可用。类的私有部分把数据或方法的可用性局限于该类本身。包含数据或方法的受保护部分被局限于该类和任何派生子类。 类层次结构 C++类实际上用作创建对象的模板或模式。从类描述形成的对象都是该类的实例。开发类层次结构是可能的,其中有一个主类和几个子类。在C++中, 做这事的基础是派生类。父类表示更一般化的任务,而派生子类执行一些特定的任务。例如,早先讨论的林肯类也许包含整个林肯系列公共的数据和方法,诸如引擎、检测仪表、电池、制动能力和操纵。从父类派生的子类,诸如Tour Car、Mark Ⅷ和Continental可能包含该类专用的一些款项。例如,1995 Continental是该系列中唯一具有主动悬架系统的汽车。 继承 面向对象程序设计中的继承使得一个类能继承某对象类的一些性质。父类用作派生类的模式,且能以几种方式被改变(在下一章中你将了解成员函数能被重载、新的成员函数能被添加,并且成员存取特权能被改变)。如果某个对象从单个父类继承其属性,称为单继承。如果某个对象从多个父类继承属性,便称为多继承。继承是一个重要概念,因为它使得无须对代码做大的改变就能重用类定义。继承鼓励重用代码,因为子类是对父类的扩充。 多态性 与类层次结构相关的另一个重要的面向对象概念是公共消息能被发送到诸父类对象和所有派生子类对象。按正式的术语,这称为多态性。 多态性使每个子类对象能以一种对其定义来说适当的方式对消息格式作出响应。试设想收集数据的一个类层次结构。父类可能负责收集某个个体的姓名、社会安全号、职业和雇佣年数,那末你能使用子类来决定根据职业将添加什么附加信息。一种情况,一个管理职位会包括年薪,而另一种情况,销售员职位会包括小时工资和回扣信息。因此,父类收集一切子类公共的通用信息,而子类收集与特定工作描述相关的附加信息。多态性使得公共的数据收集消息能被发送到每个类。父类和子类两者都以对该消息是恰当的方式作出响应。多态性促进现有代码的可扩充性。 虚函数 多态性赋予对象以当对象的精确类型还未知时响应来自例行程序之消息的能力。在C++中这能力是迟绑定的结果。使用迟绑定,地址在运行时刻动态地确定,而不是如同传统的编译型语言在编译时刻静态地确定。这静态的(固定的)方法往往称为早绑定。函数名被替换为存储地址。你使用虚函数来完成迟绑定。在随后的派生类将通过重定义函数之实现而重载该函数时,在父类中定义虚函数。当你使用虚函数时,消息不是直接传给对象,而是作为指向对象的指针传送。 虚函数利用了地址信息表, 该表在运行时刻使用构造符而被初始化。一个构造符每当创建它的类的一个对象时被调用。这里构造符的工作是把虚函数与地址信息表链接,在编译运转期间虚函数的地址是未知的;相反,给出的是(在运行时刻确定的)地址表中将包含该函数(入口)地址的位置。 3.4 JavaScript教程 Java is designed to meet the challenges of application development in the context of heterogeneous, network-wide distributed environments. Paramount among these challenges is secure delivery of applications that consume the minimum of system resources, can run on any hardware and software platform, and can be extended dynamically. Java是为了解决在复杂的、大规模分布式网络环境下开发应用程序的挑战而设计的。其中最大的一个挑战是确保交付的程序:占用最少的系统资源,并且能在任何硬件、软件平台下运行,能被动态扩展。 Java originated as part of a research project to develop advanced software for a wide variety of network devices and embedded systems. The goal was to develop a small, reliable, portable, distributed, real-time operating platform. When the project started, C++ was the language of choice. But over time the difficulties encountered with C++ grew to the point where the problems could best be addressed by creating an entirely new language platform. Design an architecture decisions drew from a variety of language such as Eiffel, SmallTalk, Objective, C, and Cedar/Mesa. The result is a language platform that has proven ideal for developing secure, distributed, network based end-user applications in environments ranging from network-embedded devices to the World-Wide-Web an the desktop. Java最初只是一个为各种网络和嵌入式设备而研究的软件系统的一部分,这个系统的目标是一个小的、可信赖的、可移植的,分布式的、实时的平台。最开始C++语言是这个平台的首选。但随着时间的推移,C++出现了很多问题,有必要开发一个全新的语言平台。我们根据Eiffel, SmallTalk, Objective, C, and Cedar/Mesa等语言来做出决策,结果是开发出了一个理想的、能在从嵌入式网络设备到万维网到桌面等各种环境下方便的开发安全的、分布的、基于网络的应用程序的平台。 `The design requirements of Java are driven by the nature of the computing environments in which software must be deployed. Java的设计要求是由软件所部署的计算环境的本质决定的. The massive growth of the Internet and the World-Wide Web leads us to a completely new way of looking at development and distribution of software. To live in the world of electronic commerce and distribution, Java technology must enable the development of secure, high performance, and highly robust applications on multiple platforms in heterogeneous, distributed networks. 互联网和万维网的快速发展带领我们用新的眼光去看待开发和发布软件。在电子商务的时代,Java必须具有开发安全性、高效性、健壮的、大众的、能在多平台和多样化、分布式网络运行的程序。 Operating on multiple platforms in heterogeneous networks invalidates the traditional schemes of binary distribution , release, upgrade, patch, and so on. To survive in this jungle, java must be architecture neutral, portable, and dynamically adaptable. 为了能在异构网络的多个平台上执行二进制发布、升级、修补等计划的环境中发展,Java必须是总体结构不带偏向性的、可移植的、且能动态地自适应的。 The java system that emerged to meet there needs in simple, so it can be easily programmed by most developers; familiar, so that current developers can easily learn java; object oriented ,to take advantage of modern software development methodologies and to fit into distributed client-server application; multithreaded, for high performance in applications that need to perform multiple concurrent activities , such as multimedia; and interpreted ,for maximum portability and dynamic capabilities. Java系统的出现使得这些需求变得简单,所以可以很容易的被大多数开发人员所使用;大众的,所以现在的开发人员可以很容易的学习Java;面对对象的,利用现代软件开发方法的优势以适应分布式客户端-服务器应用程序;多线程的,用于高性能的执行多个并发活动,如多媒体;解释型的,为了最大的可移植性和动态能力。 Together, the above requirements comprise quite a collection of buzzwords, so let’s examine some of them and their respective benefits before going on. 总的来说,上述包括相当多的专业术语,所以在继续之前先让我们来认识一下它们以及它们所带来的的各种好处。 W
展开阅读全文
提示  得力文库 - 分享文档赚钱的网站所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:详细计算机专业英语教学教育资料(第5版)翻译编辑版.doc
链接地址:https://www.deliwenku.com/p-2627106.html
关于得利文库 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com  

收起
展开