计算机专业英语教程翻译完整版_第1页
计算机专业英语教程翻译完整版_第2页
计算机专业英语教程翻译完整版_第3页
计算机专业英语教程翻译完整版_第4页
计算机专业英语教程翻译完整版_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、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

2、 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 nucleu

3、s of the computer system the processor. 我们已经知道,所有的计算机都具有相似的能力,并且在本质上执行相同的功能,尽管一些可能会比另一些快一点。我们也知道,一个计算机系统具有输入,输出,存储和处理部件;处理器是一个计算机系统智能核心,并且一个计算机系统可以有许多个处理器。我们已经讨论过如何在计算机系统内部,用被称作“位”的电子状态来表现数据,现在我们要弄明白计算机系统的核心,即处理器,的内在的工作方式。The internal operation of a computer is interesting, but there really is no my

4、stery 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.计算机的内部操作很有意思,但确实没有什么神秘可言。所谓的神秘只是存在于那些听信传闻和相信科幻小说作家的人的意识中。计

5、算机就是一种没有思想的需要接通电源的电子设备而已,与烤面包机和台灯差不多。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:

6、 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. Lets look at their functions and the relationships between them.不

7、加夸张地讲,市场上有几百种不同类型的计算机在销售.每种电脑在复杂性上可能有很大区别,但归根结底,每种处理器,有时称为中央处理器即cpu,只有两个基本部分:控制单元和计算逻辑单元.主内存在处理器内部操作中也是一个不可缺少的部分.这三个部件-主内存,控制单元和计算逻辑单元-一起工作.然我们看看它们(各自的)功能和它们之间的联系。 Unlike magnetic secondary storage devices, such as tape and disk, primary storage has no moving parts. With no mechanical movement, data

8、 can be accessed from primary storage at electronic speeds, or close to the speed of light. Most of todays 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

9、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

10、 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

11、, 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” pr

12、imary 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

13、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

14、 program instructions, and a report is written from primary storage to a printer.图 1-1描述了输入/输出设备与主存储器间的读和写过程。在图中,VDT发出一个输入请求,请求是以消息模式通过通道(如同轴电缆)发送到主存储器。这个查询被解释,处理器发起操作从辅助存储器中调用合适的程序和数据。程序和数据从辅助存储器传送到主存储器中,这是一个非破坏性的读取过程,也就是说,程序和数据同时存在于主存(临时保存)和辅助存储器(永久保存)中。根据程序指令的指示,处理器对数据进行操作,并从主存传送一份报告到打印机。A progra

15、m 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

16、.程序指令和数据是存储在主存中一个特殊的位置,称为地址空间。通过地址空间可以实现计算机对程序指令和数据的定位、访问和处理。地址空间的内容是经常变化的,这是由于计算机一直在执行不同的程序和数据。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

17、” (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。还有一种特殊的主存储器,称为只读

18、存储器(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, ch

19、anged 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在进行一次写操作之前,所有的存储单元必须被

20、还原为同一初始状态。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)。它可以在任何时候写入,而且不会擦除以前的内容;只会更新被寻址

21、的字节。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 spee

22、d). 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 o

23、f 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的。另外,它还可以对部分记忆块而不是

24、整个存储器进行清除。然而,闪存并不提供字节级的擦除。像EPROM,闪存只使用一个晶体管每比特,因此可以实现高密度的EPROM。Cache MemoryProgram 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 pie

25、ces 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 proce

26、ssor. 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

27、the computer system throughput (the rate at which work is performed).程序和数据从辅助存储器装载到RAM中是因为对RAM中的程序指令和数据的访问时间要明显的少于从辅助存储器访问。数以千条的指令和数据能被访问而只需花费从硬盘访问一次数据的时间。RAM是数据和程序的重要的高速存放区,事实上,计算机系统不会进行任何操作直到程序指令被传入处理器进行执行,这种指令和数据的传输是需要花费时间的,即使传输速度已经是以纳秒来计算了。为了能更快速的传输指令和数据,大多数计算机设计使用高速缓存。计算机设计者使用高速缓存来提高计算机系统的总处理能力

28、(工作效率)。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 instruc

29、tions 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 severa

30、l 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只保存内存中那一小部分最有可能被处理器执行的指令和数据

31、。两种类型的cache广泛应用于计算机,第一种被植入cpu中的叫做内部高速存储,第二种是外部高速存储,它位于那些靠近cpu的芯片中。一台计算机可以拥有几个不同级别的高速缓存。一级缓存实际上总是植入芯片中,二级缓存过去常常作为外部高速缓存,但是现在也像一级缓存植入cpu内部。3.2 C+和面向对象的程序设计一些面向对象的程序设计概念在语言间渗透。例如微软Quick Pascal是允许使用对象的第一批语言中的一个。C+有什么使得它是一种适合于开发面向对象程序的语言?如同先前所提到的,答案是类(class)数据类型。给该语言建立对象之能力的是建立在C结构类型之上的C+类(class)类型。还有,C+

32、把另外几个特性引入面向对象的程序设计,这些特性并不包含在简单地利用对象的其他一些语言中。C+的优点包括强类型、运算符重载和较少地强调预处理。的确你能使用其他一些产品和采用其他一些语言来进行面向对象的程序设计,但是采用C+的众多好处是显著的。这是为面向对象的程序设计而设计的语言,并非(现有语言的)式样翻新。面向对象的程序设计是一种程序设计技术,使得你能把一些概念看作各种各样的对象。通过使用对象,你能表示要被执行的任务、它们之间的相互作用和必须观察的某些给定的条件。一种数据结构经常形成某个对象的基础;因此,在C或C+中,结构类型能形成某种基本对象。与对象的通信,如前提到的,能通过使用消息来完成。消

33、息的使用类似于在面向过程的程序中对函数的调用。当某对象收到一个消息时,包含在该对象内的一些方法作出响应。方法类似于面向过程程序设计的函数。然而,方法是对象的一部分。C+的类是对C和C+结构类型的扩充,并且形成了面向对象程序设计所需要的抽象数据类型。类能包含紧密相关的一些条目,它们共享一些属性。更正式地说,对象只不过是类的实例。最终,应该出现包含很多对象类型的类库,你能使用这些对象类型的实例去拼合程序代码。在你更详细地考察这些术语之前,一个好的主意是熟悉与C+和面向对象程序设计相关的另外几个概念,如同下面几节所述的。封装封装指的是每个对象把它的成员数据和成员函数(方法)组合成单个结构的方式。图3

34、-1举例说明了你如何能组合数据域和方法以建立对象。 数据域 方法 数据数据成员函数成员函数成员函数数据数据成员函数成员函数成员函数 图3-1 为建立对象而组合的数据域和方法典型地,一个对象的描述是一个C+类的一部分, 且包括对该对象内部结构的描述、该对象如何与其他对象相关,以及把该对象的功能细节和该类的外部相隔离的某种形式的保护。C+类结构做到了所有这些。在一个C+类中,你使用私有的、公共的和/或受保护的描述符来控制对象的功能细节。在面向对象的程序设计中,公共(public)部分一般用于接口信息(方法),使得该类可在各应用中重用。如果数据或方法被包含在公共部分,它们在该类外部也可用。类的私有部

35、分把数据或方法的可用性局限于该类本身。包含数据或方法的受保护部分被局限于该类和任何派生子类。类层次结构C+类实际上用作创建对象的模板或模式。从类描述形成的对象都是该类的实例。开发类层次结构是可能的,其中有一个主类和几个子类。在C+中, 做这事的基础是派生类。父类表示更一般化的任务,而派生子类执行一些特定的任务。例如,早先讨论的林肯类也许包含整个林肯系列公共的数据和方法,诸如引擎、检测仪表、电池、制动能力和操纵。从父类派生的子类,诸如Tour Car、Mark 和Continental可能包含该类专用的一些款项。例如,1995 Continental是该系列中唯一具有主动悬架系统的汽车。继承面向

36、对象程序设计中的继承使得一个类能继承某对象类的一些性质。父类用作派生类的模式,且能以几种方式被改变(在下一章中你将了解成员函数能被重载、新的成员函数能被添加,并且成员存取特权能被改变)。如果某个对象从单个父类继承其属性,称为单继承。如果某个对象从多个父类继承属性,便称为多继承。继承是一个重要概念,因为它使得无须对代码做大的改变就能重用类定义。继承鼓励重用代码,因为子类是对父类的扩充。多态性与类层次结构相关的另一个重要的面向对象概念是公共消息能被发送到诸父类对象和所有派生子类对象。按正式的术语,这称为多态性。多态性使每个子类对象能以一种对其定义来说适当的方式对消息格式作出响应。试设想收集数据的一

37、个类层次结构。父类可能负责收集某个个体的姓名、社会安全号、职业和雇佣年数,那末你能使用子类来决定根据职业将添加什么附加信息。一种情况,一个管理职位会包括年薪,而另一种情况,销售员职位会包括小时工资和回扣信息。因此,父类收集一切子类公共的通用信息,而子类收集与特定工作描述相关的附加信息。多态性使得公共的数据收集消息能被发送到每个类。父类和子类两者都以对该消息是恰当的方式作出响应。多态性促进现有代码的可扩充性。虚函数多态性赋予对象以当对象的精确类型还未知时响应来自例行程序之消息的能力。在C+中这能力是迟绑定的结果。使用迟绑定,地址在运行时刻动态地确定,而不是如同传统的编译型语言在编译时刻静态地确定

38、。这静态的(固定的)方法往往称为早绑定。函数名被替换为存储地址。你使用虚函数来完成迟绑定。在随后的派生类将通过重定义函数之实现而重载该函数时,在父类中定义虚函数。当你使用虚函数时,消息不是直接传给对象,而是作为指向对象的指针传送。虚函数利用了地址信息表, 该表在运行时刻使用构造符而被初始化。一个构造符每当创建它的类的一个对象时被调用。这里构造符的工作是把虚函数与地址信息表链接,在编译运转期间虚函数的地址是未知的;相反,给出的是(在运行时刻确定的)地址表中将包含该函数(入口)地址的位置。3.4 JavaScript教程 Java is designed to meet the challenge

39、s 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是为

40、了解决在复杂的、大规模分布式网络环境下开发应用程序的挑战而设计的。其中最大的一个挑战是确保交付的程序:占用最少的系统资源,并且能在任何硬件、软件平台下运行,能被动态扩展。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 oper

41、ating 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 suc

42、h 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最初只是一个为各种网络和嵌入式设备而研究的软件

43、系统的一部分,这个系统的目标是一个小的、可信赖的、可移植的,分布式的、实时的平台。最开始C+语言是这个平台的首选。但随着时间的推移,C+出现了很多问题,有必要开发一个全新的语言平台。我们根据Eiffel, SmallTalk, Objective, C, and Cedar/Mesa等语言来做出决策,结果是开发出了一个理想的、能在从嵌入式网络设备到万维网到桌面等各种环境下方便的开发安全的、分布的、基于网络的应用程序的平台。The design requirements of Java are driven by the nature of the computing environments

44、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

45、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 t

46、raditional 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

47、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 applica

48、tions that need to perform multiple concurrent activities , such as multimedia; and interpreted ,for maximum portability and dynamic capabilities.Java系统的出现使得这些需求变得简单,所以可以很容易的被大多数开发人员所使用;大众的,所以现在的开发人员可以很容易的学习Java;面对对象的,利用现代软件开发方法的优势以适应分布式客户端-服务器应用程序;多线程的,用于高性能的执行多个并发活动,如多媒体;解释型的,为了最大的可移植性和动态能力。Togeth

49、er, the above requirements comprise quite a collection of buzzwords, so lets examine some of them and their respective benefits before going on.总的来说,上述包括相当多的专业术语,所以在继续之前先让我们来认识一下它们以及它们所带来的的各种好处。Whats completely new is the manner in which java and its run-time system have combined them to produce a f

50、lexible and powerful programming system.Java和它在运行时的系统能包含有良好的操作性以及强大的编译设计系统是一种全新的方式。 Developing your applications using Java results in software that is portable across multiple machine architectures, operating systems, and graphical user interfaces, secure, and high performance. With Java, your job

51、as a software developer is much easier-you focus your full attention on the end goal of shipping innovative products on time, based on the solid foundation of Java. The better way to develop software is here, now, brought to you by the Java language platform.使用Java开发您的应用软件所带来的是可在多种机器总体结构、操作系统和图形用户借口

52、间的移植,安全性和高性能。使用Java,你作为软件开发人员的工作室非常容易的-基于Java的基础您可以专注发展和及时创新。开发软件的最好方法在这里,现在,给您带来Java语言平台。 Very dynamic languages like lisp, TCL, and SmallTalk are often used for prototyping. one of the reasons for their success at this is that they are very robust-you dont have to worry about freeing or corrupting

53、 memory.非常具有生命力的语言如lisp、tcl和SmallTalk常常用于充当原型构造技术。他们在这取得成功的其中一个原因是:他们非常强大,您不需要内存的释放或者损坏。Similarly ,programmers can be relatively fearless about dealing with memory when programming in java .the garbage collection system makes the programmers job vastly easier ;with the burden of memory management ta

54、ken off the programmers shoulders , storage allocation errors go away.同样的,程序员在使用Java编程的时候可以不用过多担心存储问题。无用单元手机系统使程序员的工作大为容易,卸下了程序员肩上存储管理的负担,存储分配错误不再发生。 Another reason commonly given that like lisp , TCl, and smalltalk are good for prototyping is that they dont require you to pin down decision early on

55、 these languages are semantically rich.一般认为像LISP、TCL和SmallTack这样一些语言十分适合于原型法的另一理由,是因为它们不要求你受早期决定的约束-这样的语言的语义是很丰富的。 Java has exactly the opposite property ; it forces you to make explicit choices . along with these choices come a lot of assistance you can write method invocations and ,if you get some

56、thing wrong, you get told about it at compile time . you dont have to worry about method invocations error.Java具有完全相反的性质,它强制你做出明确的选择。伴随着这些选择的是许多助理-如:你可以写一些方法的调用,如果有错误,你会在编译时被告知。您也不需要担心方法调用错误。4.1 summary of osAn operating system is the software which acts as an interface between a user of a computer

57、and the computer hardware.操作系统是计算机用户和硬件的软件接口。The purpose of an operating system is to provide an environment in which a user may execute program. 操作系统的目的是提供用户一个可以执行程序的环境。The primary goal of an operating system is thus to make the computer system convenient to use. 操作系统的主要目标因此是使计算机系统便于使用。A secondary

58、goal is to use the computer hardware in an efficient way. 其次是高效地使用计算机硬件。We can view an operating system as a resource allocator. 我们可以把操作系统看做是一个资源分配器。A computer system has many resources which may be required to solve a problem: CPU time, memory space, file storage, input/output(I/O) devices, and so on.一个计算机系统拥有许多资源,因此需要去解决一些问题,如cpu时间,内存空间,文件存储,输入输出设备等。The operating system acts as the manager of these resources and allocates them to specific program

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论