In a Computer System Utilizing Segmentation
페이지 정보
작성자 Numbers 댓글 0건 조회 9회 작성일 25-12-03 12:58필드값 출력
본문
Memory segmentation is an operating system memory management technique of dividing a pc's primary memory into segments or sections. In a pc system using segmentation, a reference to a memory location includes a price that identifies a phase and an offset (memory location) within that segment. Segments or sections are additionally used in object information of compiled packages when they're linked together right into a program image and when the image is loaded into memory. Segments may be created for program modules, or for classes of memory usage resembling code segments and information segments. Certain segments may be shared between packages. Segmentation was originally invented as a way by which system software program could isolate software program processes (duties) and knowledge they're using. It was supposed to extend reliability of the techniques running multiple processes concurrently. In a system using segmentation, computer memory addresses include a phase id and an offset throughout the section.
A hardware memory management unit (MMU) is liable for translating the section and offset right into a bodily tackle, and for performing checks to verify the translation can be finished and that the reference to that phase and offset is permitted. Every section has a length and brainwave audio program set of permissions (for instance, read, write, execute) related to it. A course of is simply allowed to make a reference right into a segment if the type of reference is allowed by the permissions, and if the offset inside the phase is throughout the range specified by the size of the segment. In any other case, a hardware exception corresponding to a segmentation fault is raised. Segments might even be used to implement digital memory. In this case every section has an associated flag indicating whether it's present in major memory or not. If a segment is accessed that isn't current in primary memory, an exception is raised, and the operating system will learn the phase into memory from secondary storage.
Segmentation is one methodology of implementing memory protection. Paging is one other, and they can be mixed. The dimensions of a memory phase is mostly not mounted and may be as small as a single byte. Segmentation has been carried out a number of methods on varied hardware, with or with out paging. Intel x86 memory segmentation does not fit either model and is mentioned individually beneath, and also in greater element in a separate article. Associated with each segment is information that signifies where the phase is located in memory- the section base. When a program references a memory location, the offset is added to the segment base to generate a physical memory address. An implementation of digital memory on a system using segmentation with out paging requires that complete segments be swapped back and forth between primary memory and secondary storage. When a segment is swapped in, the working system has to allocate sufficient contiguous free memory to hold your entire segment. Usually memory fragmentation results if there is not enough contiguous memory although there could also be enough in total.
As an alternative of a memory location, the phase info contains the deal with of a web page table for the section. When a brainwave audio program references a memory location the offset is translated to a memory tackle using the web page desk. A section could be extended by allocating another memory web page and adding it to the section's web page desk. An implementation of virtual memory on a system using segmentation with paging often only moves individual pages back and forth between principal memory and secondary storage, much like a paged non-segmented system. Pages of the section may be located wherever in predominant memory and want not be contiguous. This usually ends in a diminished amount of input/output between main and secondary storage and lowered memory fragmentation. The B5000 is equipped with a section info table called this system Reference Table (PRT) which is used to point whether or not the corresponding section resides in the primary memory, to take care of the base handle and the dimensions of the segment.
The later B6500 computer also implemented segmentation; a version of its architecture continues to be in use today on the Unisys ClearPath Libra servers. The GE 645 pc, a modification of the GE-635 with segmentation and paging support added, was designed in 1964 to assist Multics. 1975, attempted to implement a real segmented architecture with memory safety on a microprocessor. The 960MX model of the Intel i960 processors supported load and retailer directions with the supply or destination being an "entry descriptor" for an object, and an offset into the item, with the access descriptor being in a 32-bit register and with the offset computed from a base offset in the subsequent register and from an extra offset and, optionally, an index register specified in the instruction. An access descriptor comprises permission bits and a 26-bit object index; the object index is an index into a desk of object descriptors, giving an object kind, an object length, and a bodily address for the thing's data, a web page desk for the item, or the highest-level page table for a two-degree web page table for the thing, relying on the article sort.