993397246毕业设计(论文)外文翻译基于WEB的新农村村政务系统设计_第1页
993397246毕业设计(论文)外文翻译基于WEB的新农村村政务系统设计_第2页
993397246毕业设计(论文)外文翻译基于WEB的新农村村政务系统设计_第3页
993397246毕业设计(论文)外文翻译基于WEB的新农村村政务系统设计_第4页
993397246毕业设计(论文)外文翻译基于WEB的新农村村政务系统设计_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

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

文档简介

1、java虚拟机的10年摘要:jvm的设计目标是提供一个基于抽象规格描述的计算机模型,为解释程序开发人员提供很好的灵活性,同时也确保java代码可在符合该规范的任何系统上运行。关键字:虚拟机 接口 语言java虚拟机的起源与构造当我们说到“java”这个词的时候,指的是四个相互关联的概念:java语言、 java api、java class文件格式、java虚拟机。整个java体系是基于java 虚拟机构造的,正因为如此,才能实现java的安全性和网络移动性。java并非是第一个采用“虚拟机”概念的体系,但却是第一个得到广泛运用的虚拟机平台。 “虚拟”,是一种隔离物理资源与逻辑资源的手段。ja

2、va虚拟机的“虚拟”,则是用来隔离物理机器、底层操作系统与java语言规范实现的手段。虽然java是一种面向对象的语言,我们平时大量使用的,是对象间的多态、组合(composition)、委派(delegation),但当我们讨论虚拟机的时候,我们看见的基本概念却是“栈(stack)”和“堆(heap)”。根据冯诺依曼的“存储计算”模型,所有的代码都保存在代码空间中,随着程序计数器指针的变化进行程序的执行、跳转。java虚拟机中没有寄存器的概念,方法调用是采用“栈”进行的,这是一种安全、简洁的方法。java虚拟机通过类装载器支持对类的隔离,这也是java实现安全性的基础。每个类都具有自己的命名

3、空间,在具有不同安全级别的沙箱中运行,因此不会产生低安全级别的代码来越权访问高级别代码的机会。类装载器的出现是java虚拟机与大部分用c实现的虚拟机的显著不同之处。java虚拟机的另外一个显著特点就是实现了自动的垃圾收集。在往常,写程序的时候要牢记对象之间的关联,在每个程序块中假若申请了对象空间,就必须在出口释放掉,方法调用往往同时也就是对象的边界。而自动垃圾收集带给开发者的最大好处,就是可以非常方便地从整体上把系统的对象组织成一张对象图,只需往这张图中添加对象,维护对象之间的关联,却不需要自己做复杂的清扫工作。正是有了这种思维单纯的对象图的支持,or mapping(关系数据库与对象映射)技

4、术在最近得以大行其道,设计模式也更容易被java群体所接受。虚拟机的优化1995年第一代的java出台之时,其虚拟机执行是依靠“字节码解释器(byte code interceptor)”的,也就是说每条指令都由虚拟机来当场解释执行,这造成速度令人抓狂地缓慢。更有甚者有人开始总结许多的“速度优化经验”,比如说:“尽量把所有的代码都放在较大的方法中执行”与“少用接口”等等,这完全与java语言的设计目的背道而驰,现在看起来是多么可笑的奇谈怪论,当时却是很多程序员津津乐道的经验之谈。无他,java本身执行太慢了。java生命的前十分之三就是如此缓慢地渡过的。于是,sun的工程师开始拼命想着提高执行

5、速度。jit静态编译器的出现是在1996年十月,sun放出了第一个编译器。jit编译器在每段代码执行前进行编译,编译的结果为本地静态机器码,执行速度有了质的提高。symantec公司当时凭借其傲人的jit编译器,在整个java界受到热烈的追捧。在其后的1998年,java 1.2发布的时候,附带了jit编译器,从此java的使用者终于可以抛开上面说的那些奇怪的“速度优化经验”了。jit静态编译器虽然可以解决一些问题,但是性能仍然和c/c+有很大的差距。对一段程序而言,一名优秀的程序员是如何来改进运行速度的呢?首先,他不会傻到把所有的代码都来优化,他会观察、思考到底哪段代码对整体性能影响最大?然

6、后集中精力来优化这一段代码。按照经验,整个程序 10%-20%的代码,会占据 80%-90%的运行时间。用这种方法,在同样的时间、付出同样程度的努力后,这名优秀的程序员使整个程序的性能得到了很大程度的优化。hotspot引擎,就是模仿人工的这种方法进行优化的。在程序运行的开始,java代码仍然解释执行,但hotspot引擎开始进行采样(profiling)。根据采样的结果,决定某段程序是占用较多运行时间的,就认为它是“hotspot”,它也就是目前程序的瓶颈, 引擎开始启动一个单独的线程进行优化。因为不象原始的 jit编译器那样无差别的编译所有代码,hotspot引擎可以集中精力来对hotsp

7、ot代码进行深度优化,这样这部分代码执行起来更加迅捷。之前的静态编译器只能按照预定的策略进行编译优化,而hotspot引擎的优化是基于采样的结果的,因此这种方法对所有的应用程序都有效。1999年3月27日,sun放出了第一个hotspot引擎。在随后的2000年5月的jdk 1.3中,包含了hotsopt引擎,这也使1.3成了一个具有里程碑意义的发行版本。到这里,java的十年生命,已经过去了一半。hotspot代表的是一种动态编译的技术。对java这种大量使用委派、组合等面向对象特性的程序来说,动态编译比起静态编译来有显著的优势。比如method inlining。方法的调用是一个很耗时的操

8、作,假若可以把方法调用直接内嵌到调用者的代码中,就可以节省大量的时间, 这被称为“method inlining”。因为涉及到类的重载,静态优化很难确切知道哪些属性、方法被重载,因此很难对method进行合并,只好在方法内部进行静态编译,假若每个方法都很小,静态优化能起到的作用也就比较小。而动态编译因为可以完全随时掌握类的重载情况,就可以把相关的方法合并进行深度优化。现代的java程序,特别是在设计模式教育得到普及之后,大量使用类的继承、委派,形成了很多短小的方法,动态编译的优势就更加明显。自从出现了hotspot之后,整个java界为之一振。最近的五年,就是继续优化的五年。继续进行优化的方法

9、有几条路,一是研究新的采样算法。因为采样关系到不同的优化策略,会对整体性能有比较大的影响。二是研究深度优化的方法。三是研究垃圾收集的算法。垃圾收集会带来程序短暂的停顿,这会带来负面的用户体验。于是,如何提高垃圾收集的效率,减少延迟,出现了五花八门的算法,比如渐进式收集、火车算法等。在多处理器的时候,如何利用多处理器进行并行收集也是研究的一个热点。这方面,bea的jrocket走在了前面。现实生活中的虚拟机最后,让我们来盘点一下目前市面上可见的各个虚拟机。首先要提到的,毫无疑问是sun的虚拟机。作为大众心目中的“官方实现”,sun拥有最大的用户群,并且拥有“兼容基准”的地位,其他虚拟机都必须要考

10、虑和sun虚拟机的兼容性问题。比如 jrocket就会在某些特殊情况下表现出和sun不同的特性,可能对程序运行有影响。不过sun也的确没有让广大用户失望,虽然在早期性能比不上symantec,后来在1.2 的时候性能又被ibm超越,但sun一直在努力革新,特别是 1.4.2之后,性能有了长足的进步。虽然jdk 1.5的虚拟机在性能上没有什么提高,但是增强了稳定性,据说修改了8000处bug,真是让人汗流不止。原来我们在1.4.2下面一直在享受这么多bug啊。其次是老牌劲旅ibm。ibm的jdk在1.3的时代创下了最好的性能记录,从此树立了高端形象。特别是在其websphere产品中得到了很好的

11、评价。其jdk也是最早支持64bit的jdk之一。到了现在,ibm jdk在高端仍然是和bea可以一拼的。然后是后起之秀,bea的jrocket。说到bea突然在jvm领域一夜之间异军突起,多少让人有些瞠目,不过它采取的战略特别简单:自己没有,索性花钱买了在此领域深有研究的jrocket,在前面加上bea的标志就可以了。jrocket瞄准高端服务器市场,在多处理器环境下有不俗的表现。除此之外,还有几个开放源代码的jvm值得一提。首先就是大名鼎鼎的jikesrvm。说起其大名,大多数人都知道jikes编译器是 ibm开发的,效率比同等的javac编译器高得多,很多开发者都使用jikes编译器来取

12、代javac。而jikesrvm则是ibm开源出来的一整套虚拟机技术,包含了jit,gc的完整实现,在其网站上也有众多的论文,实在是想要深入研究jvm者的绝佳资源()。kaffe是一个老牌的jvm,不过现在已经很少听到了。结束语时光流转,轰轰烈烈的java虚拟机性能争论仿佛还在耳边回响,现在新的争论却已经是“java的性能是否已经超越c/c+”。joakim dahlstedt 是 jrockit 的主要架构设计师之一,他坚持认为,java绝不是一种速度慢,效率低的语言,jvm 是一个关键的组件,确保了系统的部署与运行和开发一样快速、轻松。特别是在目前开发趋势是采用大量预制的框架时,动态编译有

13、可能比c/c+这样的静态优化获得更好的性能。virtual machine of java of 10 yearabstract:the design goal of jvm is to provide computer module based on the abstract specification description, provide the very good flexibility for the interpreter developers, simultaneously also guarantee the java code to be possible to run o

14、n any system which conforms to this standard.key words: virtual machine,interface,languagethe origins and the structure of the virtual machine of javawhen we make reference to the phrasejava, what to point is four mutually the concept of the connection: language of java, java api, java class documen

15、t format, virtual machine of java. the whole java system is according to the java virtual machine structure of, positive as it does, then can carry out the java safety and networkses to move sex. the java is the first system that adopt virtual machine concept not, but is the first to get the extensi

16、ve usage of virtual machine terrace. conjecture, is a kind of means that insulates the physics resources and the logic resources.the conjecture of the virtual machine of java, then use to the means of insulate the physics machine, the first floor operate system and the java language norm realization

17、.although the java is a kind of language that faces to the object, the most using for us is many tais between objects and composition, delegation, when we discuss the virtual machine, the basic concepts that we can see are stack and heap. basis ping2 nuo4 depend onsaving calculation model of man , a

18、ll codes keep in the code space, counting the variety that the machine points the needle to carry on the performance of the procedure and jump to turn along with the procedure.did not deposit the concept of the machine in the virtual machine of java, the method adjusts to use is to adopt stack to ca

19、rry on of, this is a kind of safe, simple and direct method.the virtual machine of java passes a lading machine support to the insulation of the type, this is also the foundation that the java carries out the safety.each ones have to assign name to the space ownly, movement in the sand box have diff

20、erent and safe class, so will not produce the code of the low and safe class to come more the power interview high class do not the opportunity of the code. an emergence that loads the machine is a virtual machine of java to use the c with the big part the virtual machine of the realization shows th

21、e place of dissimilarity of the zhao.virtual machine of java of another a the show the characteristics of the zhao is to carry out the auto of garbage collections.want to keep firmly in mind the connection between object at the time of usually, writing the procedure, in each procedure piece if appli

22、ed for the object space, must release in the exit, the method adjusts to use usually also is the boundary of the object.but automatic garbage the collections brings the biggest advantage of the developer, is to become an object diagram from whole last object organization of a system very expediently

23、, need to be go toward only to increase the object in this zhang tu2, support the connection between object, but do not need the do-it-yourself to clean up the work complicatedly.had this kind of thinking support of the pure object diagram exactly, the or mapping( the relation database and objects r

24、eflect to shoot) technique can go the its teachings greatly recently, designing the mode to also was more easily accept by the community of java.virtual machine of excellent turnin 1995 hour of java pedestal of generation, its virtual machine performance is to depend on the byte code explained the m

25、achine( the byte code interceptor) of, also is to say that each instructions was come by the virtual machine to explain the performance there and then, this resulted in the speed make the person to grasp wildly slow-moving.even have very a someone starts tally up many the speed is excellent to turn

26、the experience, saying for example: put all codes as far as possible in bigger method performance with little use to connect etc., this is run in opposite directions with the design purpose of the java language completely, looking now is how and laughably strange to talk the strange theory, at that

27、time but is a lot of procedure members to take delight in talking about remark based on personal experience.have no him, java the performance is too slow.the front of the life of java very it three is to pass through slow-movingly thus of.hence, the sun engineer starts try very hard to want to raise

28、 to carry out the speed.the static state of jit edits and translate the emergence of the machine is in october of 1996, the sun let out the first edit and translate the machine.the jit edits and translate the machine to go forward to go to edit and translate in each code performance, the compiled re

29、sult is the native static state machine code, the performance speed contain the exaltation of the quality.company of symantec at that time with borrowed its proud jit to edit and translate the machine, was warmly make track for to hold in the whole java field.at the time of afterward of 1998, java 1

30、.2 release, supplementary the jit edits and translate the machine, from now on the java user can lay aside those strange the speed is excellent to turn the experiences that the top say finally.the static state of jit edit and translate although the machine can resolve some problems, function still a

31、nd c/ c+ have the very big margin.to a procedure, how an excellent procedure member is come improve the movement speed of ? first, he know better than to come all codes excellent turn, he would observe, thinking exactly which code affect to the whole function biggest?then concentrate the energy to c

32、ome excellent turn this code.according to the experience, the whole 10% of procedure-20% code, will occupy 80%-90% movement time. using this kind of method, after same of time, pay an effort of same degree, this excellent procedure member makes the whole function of procedure get the very big degree

33、 excellent to turn.engine of hotspot, is this kind of method of the artificial of mimicry to carry on excellent turn of. at the beginning that the procedure circulate, the code of java still explains the performance, but the engine of hotspot start carry on the sample( profiling).according to the re

34、sult of the sample, decide what a certain procedure is to take up more movement time, think that it is hotspot, it is also the bottleneck of the procedure currently, the engine starts start a lone line distance to carry on excellent turn.because not the jit of the elephant originality edits and tran

35、slate the machine to edit and translate all codes so indiscriminately, the engine of hotspot can concentrate the energy to come to carry on the depth to the code of hotspot excellent turn, thus this part of codes carry out more fast.the previous static state edits and translate the machine only the

36、ability carries on edit and translate according to the reserved strategy excellent turn, but engine of hotspot of excellent turn is according to result of sample of, therefore this kind of method to all pplied procedures are valid.on march 27 in 1999, the sun let out the first engine of hotspot.in t

37、he jdk of subsequent may of 20001.3, included the engine of hotsopt, this also makes 1.30% an issue edition that has the milestone meaning.arrive the here, java 10-year life, have already passed by the half.what hotspot represent is the technique that a kind of dynamic state edit and translate.appoi

38、nt to this kind of a great deal of usage of java, combination etc. faces to the procedure of the object characteristic to say, the dynamic state edits and translate to compare with the static state to edit and translate to have the advantage of show.for example method inlining.it is a that method ad

39、just to use the operation that consume very much, if can adjust the method to use direct inside the goes to adjust to use in code, can save a great deal of time, this is calledthe method inlining.because involve the type heavy to carry, the static state is excellent to turn very difficult accurate k

40、now which belong to sex, method drive heavy carry, so very difficult carry on the merger to the method, have to carry on static states edit and translate in the method inner part, if each method is all very small, the static state is excellent to turn the function that can rise also smaller.but the

41、dynamic state edit and translate because can completely and at any time control the type heavy to carry the circumstance, can carry on the depth to the related method merger excellent turn.the procedure of java of the modern, especially after designing the mode education to get universality, a great

42、 deal of usage inherit, appoints, becoming a lot of short and small of method, the advantage that dynamic state edit and translate more obvious.after appeared the hotspot, the whole java field is on flap for it.recent five years, be continue excellent turn of five years.continue to carry on excellen

43、t turn of method have several roads, one is to study the new sample calculate way.because the sample relate to different and excellent turn the strategy, will have the ratio the bigger influence to the whole function.two is study the depth excellent turn of method.three is a calculate way that studi

44、es the garbage collections.the garbage collections will bring the procedure the brief deadlock, this will bring the negative customer experience.hence, how raise the efficiency of the garbage collections, reduce to delay, appear the rich in variety calculate way, for example and gradually enter type

45、 collections, train calculate way etc.at the time of have another processor, how the exploitation have another the processor carries on proceeding together the collections is also a research of a hot point.this aspect, the bea jrocket walk at front.virtual machine within realistic lifeend, let us co

46、me to stocktaking once currently on the market it is thus clear that of each virtual machine.want to speak of first of, beyond all doubt is a sun virtual machine.be authorities realization in the publics heart, the sun owns biggest customers, and own the position of and permit the basis, other virtu

47、al machines must consider and virtual machine of sun of and permit the sex problem.for example the jrocket will express the different from sun characteristic of under the condition of some and special, may circulate to have the influence to the procedure.however sun also really didnt let large custo

48、mer disappointment, although at the time of the function of the earlier period canning not compare with the symantec, afterwards at 1.2 function again drive the ibm surmount, sun always at work hard to reform, especially 1.4.2 after, the function contain substantial progress.although jdk 1.5 of virt

49、ual machine has no exaltation on the function, strengthenned the stability, it is said modify 8000 bugs, is really let person the sweat flow not only.originally we are under 1.4.2 always at enjoy so many bugs.it is an old-brand crack troop ibm the next in order.ibm jdk at 1.3 of ages set the best fu

50、nction record, set up the high level image from now on.got the good evaluation in its product of websphere especially.its jdk also supported one of the jdk of the 64 bits at the earliest stage.now, the ibm jdk still can be on put together with bea in the high level.then is a talent person of younger

51、 generation, bea jrocket.make reference to the bea to rise in an a different soldier of the night of realm of jvm suddenly, how much make the person some to stare, however the strategy that it adopt is special simple:the oneself have no, straight-tempered spend the jrocket that money buys to have th

52、e research deeply in this realm, fore face the marking of plus the bea all right.the jrocket takes aim at the high level server market, there is not vulgar performance under many processor environments.in addition, still have well worth mentioning severals jvm that opens the source code.it is a well-known jikesrvm first.speak of

温馨提示

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

评论

0/150

提交评论