java相关毕业论文外文翻译内容摘要:

. But to enjoy features such as multitasking and hardware abstraction, nearly everybody uses an OS of some kind to run their programs. In multitasking OSs, including AIX, more than one program uses system resources, including memory. Each program needs to be allocated regions of physical memory to work in. It39。 s possible to design an OS such that every program works directly with physical memory and is trusted to use only the memory it has been given. Some embedded OSs work like this, but it39。 s not practical in an environment consisting of many programs that are not tested together because any program could corrupt the memory of other programs or the OS itself. Virtual memory allows multiple processes to share physical memory without being able to corrupt one another39。 s data. In an OS with virtual memory (such as AIX and many others), each program has its own virtual address space — a logical region of addresses whose size is dictated by the address size on that system (so 31, 32, or 64 bits for desktop and server platforms). Regions in a process39。 s virtual address space can be mapped to physical memory, to a file, or to any other addressable storage. The OS can move data held in physical memory to and from a swap area when it isn39。 t being used, to make the best use of physical memory. When a program tries to access memory using a virtual address, the OS in bination with onchip hardware maps that virtual address to the physical location. That location could be physical RAM, a file, or the swap partition. If a region of memory has been moved to swap space, then it39。 s loaded back into physical memory before being used. Each instance of a native program runs as a process. On AIX a process is a collection of information about OScontrolled resources (such as file and socket information), a virtual address space, and at least one thread of execution. Although a 32bit address can reference 4GB of data, a program is not given the entire 4GB address space for its own use. As with other OS the address space is divided up into sections, only some of which are available for a program to use。 the OS uses the rest. Compared to Windows and Linux, the AIX memory model is more plicated and can be tuned more precisely. The AIX 32bit memory model is divided and managed as 16 256MB segments. Figure 2 shows the layout of the default 32bit AIX memory model. The user program can only directly control 12 out of 16 segments — 3 out of 4GB. The most significant restriction is that the native heap and all thread stacks are held in segment 2. To acmodate programs with larger data requirements, AIX provides the large memory model. The large memory model allows a programmer or a user to annex some of the shared/mapped segments for use as native heap either by supplying a linker option when the executable is built or by setting the LDR_CNTRL environment variable before the program is started. To enable the large memory model at run time, set LDR_CNTRL=MAXDATA=0xN0000000 where N is between 1 and8. Any value outside this range will cause the default memory model to be used. In the large memory model, the native heap starts at segment 3。 segment 2 is only used for the primordial (initial) thread stack. When you use the large memory model, the segment allocation is static。 that is, if you request four data segments (for 1GB of native heap) but then only allocate one segment (256MB) of native heap, the other three data segments are unavailable for memory mapping. If you want a native heap larger than 2GB and you are running AIX or later, you can use the AIX very large memory model. The very large memory model, like the large memory model, can be enabled for an executable at pile time with a linker option or at run time using the LDR_CNTRL environment variable. To enable the very large memory model at run time, setLDR_CNTRL=MAXDATA=0xN0000000@DSA where N is between 0 and D if you use AIX or greater, or between 1 and A if you are using AIX . The value of N specifies the number of segments that can be used for native heap but, unlike in the large memory model, these segments can be used for mmapping if necessary. The IBM Java runtime uses the very large memory model unless it39。 s overridden with the LDR_CNTRL environment variable. Setting N between 1 and A will use the segments between 3 and C for native storage as you would expect. From AIX , setting Nto B or higher changes the memory layout — it no longer uses segments D and F for shared libraries and allows them to be used for native storage or mmapping. Setting N to D gives the maximum 13 segments () of native heap. Setting N to 0allows segments 3 through F to be used for mmapping — the native heap is held in segment 2. A native memory leak or excessive native memory use will cause different problems depending on whether you exhaust the address space or run out of physical memory. Exhausting the address space typically only happens with 32bit processes — because the maximum 4GB of address space is easy to allocate. A 64bit process has a user space of hundreds or thousands of gigabytes and is hard to fill up even if you try. If you do exhaust the address space of a Java process, then the Java runtime can start to show the odd symptoms I39。 ll describe later in the article. When running on a system with more process address s。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。