|
Memory protection is a system that prevents one process from corrupting the memory of another process running on the same computer at the same time. It usually employs hardware (i.e. a memory management unit) and system software to allocate distinct memory to different processes and to handle exceptions arising when a process tries to access memory outside its bounds. In computing, a process is, roughly speaking, a task being run by a computer, often simultaneously with many other tasks. ...
To meet Wikipedias quality standards, this article or section may require cleanup. ...
A computer is a machine for manipulating data according to a list of instructions known as a program. ...
MMU, short for Memory Management Unit, is a class of computer hardware components responsible for handling memory accesses requested by the CPU. Among the functions of such devices are the translation of virtual addresses to physical addresses (i. ...
System software is a generic term referring to any computer software whose purpose is to help run the computer system. ...
There are different ways to achieve memory protection. These include: - Segmentation
- Segmentation means that the currently running process is restricted to using only certain parts of memory called segments. A segment is defined by a pair of hardware registers which give the limits of allowed memory addresses. If the data that is about to be read, or written to, is outside the permitted address space of that process, a general protection fault will occur. (This should not be confused with the x86-processors realmode segmentation.)
- Paging
- Paging is the method mostly used for memory protection. In paging, the memory address space is divided into small pieces, called pages. Using a virtual memory mechanism, each page can be made to reside in any location of the physical memory, or be flagged as being protected. Paging makes it possible to have a linear virtual memory address space access pieces out of a fragmented physical memory space.
- Each process is given a page table to define the valid addresses and map them to physical memory. The page table is usually invisible to the process. Page tables make it easy to allocate new memory for a process, as the each new page can be allocated from anywhere in physical memory.
- Parts of an application's memory can be "swapped out" to other forms of storage. This happens to memory that is seldom used, and it allows the application to act as if it has a much larger working memory than actually exists. By swapping out memory, the virtual memory layout will not change, but it frees a lot of physical memory (i.e. RAM) for other uses.
- If the process is accessing a virtual memory location that is not mapped by the page table, a page fault will occur. Page faults could mean either that the process has tried to access memory that it should not have access to, or that part of the application's memory has been swapped out. In the last case, the page will be swapped back in and execution will proceed where it was interrupted.
- Protection Keys
- A protection key mechanism divides physical memory up into blocks of a particular size (e.g. 2KB), each of which has an associated numerical value called a protection key. Each process also has a protection key value associated with it. On a memory access the hardware checks that the current process's protection key matches the value associated with the memory block being accessed; if not, an exception occurs. This mechanism was used in the System/360 architecture.
If both paging and segmentation are used at the same time, as in the IA-32 architecture, paging does not map into physical memory at once, but goes through a linear memory stage first. Linear memory is the memory as seen solely by the processors segmentation circuitry, or as if the pages were turned off but the segmentation was still active. Segmentation is one of the most common ways to achieve memory protection; another common one is paging. ...
Look up Process in Wiktionary, the free dictionary Process (lat. ...
In computing, a hardware register is a storage area for hardware I/O (input/output) of different kinds. ...
A general protection fault in the Intel x86 architecture is a fault indicating that a currently executing program has in some way violated the rules of the hardware on which it is running. ...
x86 or 80x86 is the generic name of a microprocessor architecture first developed and manufactured by Intel. ...
Intel 80486DX2 microprocessor in a ceramic PGA package A central processing unit (CPU), or sometimes simply processor, is the component in a digital computer that interprets instructions and processes data contained in software. ...
Real mode is an operating mode of 80286 and later x86-compatible CPUs. ...
In computer operating systems, paging memory allocation algorithms divide computer memory into small partitions, and allocates memory using a page as the smallest building block. ...
The memory pages of the virtual address space seen by the process, may reside non-contiguously in primary, or even secondary storage. ...
It has been suggested that this article or section be merged with Primary storage. ...
Relationship between pages addressed by virtual addresses and the frames in physical memory, within a simple address space scheme. ...
Application software is a loosely defined subclass of computer software that employs the capabilities of a computer directly to a task that the user wishes to perform. ...
Virtual memory is intended to help the programmer by taking care of some memory housekeeping duties. ...
To meet Wikipedias quality standards, this article or section may require cleanup. ...
To meet Wikipedias quality standards, this article or section may require cleanup. ...
In computer storage technology, a page fault is an interrupt (or exception) to the sofware raised by the hardware, when a program accesses a page that is not mapped in physical memory. ...
System 360 Model 65 operators console, with register value lamps and toggle switches (middle of picture) and emergency pull switch (upper right). ...
It has been suggested that this article or section be merged with X86 assembly language. ...
It is important to note that virtual memory is not the same as RAM, that linear memory is a hardware register-defined part of the RAM and that physical memory more or less is the equivalent of RAM. Physical memory is actually both RAM and memory mapped I/O-ports. In computing, a hardware register is a storage area for hardware I/O (input/output) of different kinds. ...
- Operating systems with Protected memory
- Apple Mac OS X, Linux, NetBSD, FreeBSD and all other Unix based systems. No version of Microsoft Windows has true protected memory, as one process can invade another's memory. Developer previews of Mac OS 9.1 were rumored to have protected memory (a long requested feature), but the feature was pulled when Mac OS X was announced.
|