|
|

This is only a preview of the paper Click here to register and get the full text. Existing members click here to login
|
|
|
VIRTUAL MEMORY:
Virtual Memory: introduction
· Virtual memory is a technique for making relatively expensive RAM appear to be larger than it is by temporarily holding some information on disk, then transferring it to RAM when it is needed.
· Modern microprocessors may have facilities to support virtual memory, but it is the operating system that determines the strategy and implements the transfers between disk and RAM.
Main features of Virtual Memory
· The size of "chunk" that is transferred between disk and RAM is important. ...
· All Virtual Memory systems will be slower than a purely RAM based system: they are generally most suitable for reasonably large systems, i. ...
Virtual memory is a common part of most operating systems on desktop computers. ...
Most computers today have something like 64 or 128 megabytes of RAM (random-access memory) available for use by the CPU (central processing unit). ... If there were no such thing as virtual memory, your computer would have to say, "Sorry, you cannot load any more applications. ... " With virtual memory, the computer can look for areas of RAM that have not been used recently and copy them onto the hard disk. ... Because hard-disk space is so much cheaper than RAM chips, virtual memory also provides a nice economic benefit. ... If your system has to rely too heavily on virtual memory, you will notice a significant performance drop. ... Then, the only time you "feel" the slowness of virtual memory is in the slight pause that occurs when you change tasks. When you have enough RAM for your needs, virtual memory works beautifully. ...
Computer memory consists of primary memory - RAM (random access memory) and various forms of secondary (disk) storage. RAM is so called because you can access the contents of a memory location directly if you know the location. ... The operating system should take care of these things, so the programmer can concentrate on the task in hand, without worrying about the specifics of the architecture and memory that their program may run on.
The solution (now almost universally adopted) is to use "virtual memory". Virtual memory separates the concepts of address space and actual memory locations. We can see how this works by considering computers with a very small amount of memory - lets say 4096 bytes. ... With virtual memory the OS is reponsible for managing a mapping between the address space used in the programs (ie, e. ...
A virtual memory system usually deals with memory blocks of fixed size called pages. ... We also talk of pages being swapped in and out, as pages of data are swapped between disk and memory. ...
Memory that appears to the application program to be in one place, but is actually somewhere else. The operating system manages the virtual memory scheme on behalf of programs. In a multitasking system, some form of virtual memory is almost essential, because the operating system may have to break up the programs code and data to fit into gaps in the available memory. Virtual memory is also a pre-requisite for the implementation of a swap space, although swap space and virtual memory are not synonymous, whatever Microsoft says.
Virtual Memory
Step 1: The Concept
Computer operating systems, including Windows® Millennium Edition (Me), Windows 98 and Windows 95 use virtual memory to enhance computer RAM. Virtual memory can be defined as the method of using hard disk space for temporary storage to simulate RAM, and thereby extend it. ...
Step 2: How It Works
Virtual memory works automatically to load new applications more easily and with fewer errors. ...
Step 4: Balancing RAM and Virtual Memory
Virtual memory is economical, since hard disk space is considerably cheaper than buying additional RAM. However, insufficient RAM cannot be entirely compensated by virtual memory, since hard drives are not designed to access small pieces of information. If you regularly notice a significant slowdown (referred to as "thrashing") when moving from application to application, you are probably relying too much on virtual memory. A good balance between RAM and virtual memory is indicated by a slight pause when changing tasks. ... 1 Virtual memory
Virtual memory is an operating system feature that was originally used to provide large usable address spaces for every process on machines that had very little physical memory. It is used by an operating system to fool(7) a running process into believing that it can allocate a vast amount of memory for its own purposes, although whether it is allowed to or not depends on the operating system and the permissions of the individual user.
Virtual memory works by translating a virtual address (which the process uses) into a physical address (which the operating system uses). It is generally implemented via a piece of hardware called a memory management unit, or MMU. The MMUs primary job is to translate any virtual addresses that are referred to by machine instructions into physical addresses by looking up a table which is built by the operating system. ... As a result, every virtual memory operation operates on pages, which are indivisible and are always aligned to the system page size.
Even though each process can now see a huge address space, what happens when it attempts to allocate more pages than actually physically exist, or allocate an additional page of memory when all of the physical pages are in use by it and other processes? ... Such a problem is called thrashing and can only really be overcome by using less virtual memory or buying more physical memory.
It is also possible to take advantage of the virtual memory systems interaction between physical memory and the file system in program code, since mapping an existing file to memory means that the usual file I/O operations can be replaced with memory read and write operations. The operating system will work out the optimum way to read and write any buffers and it means that only one copy of the file exists in both physical memory and the file system. ...
Another major feature of virtual memory is its ability to read protect and write protect individual pages of process memory. This means that the operating system can control access to different parts of the address space for each process, and also means that a process can read and/or write protect an area of memory when it wants to ensure that it wont ever read or write to it again. If an illegal memory access is detected then a signal will be sent to the process, which can either be caught and handled or will otherwise terminate the process. Note that as with all virtual memory operations, this ability to protect memory only applies to pages, so that it is not possible to protect individual bytes. ... These are normally used by debuggers to watch a specified area of memory that is expected to be read from or written to, but can just as easily be used to implement memory protection at byte level.
Approximate Word count = 5763 Approximate Pages = 23.1 (250 words per page double spaced)
|
|
|

|
|
|