Virtual memory in computer architecture

  1. Why Do We Need Virtual Memory?
  2. Virtual Memory I – Computer Architecture
  3. Virtual Memory in Operating System
  4. Virtual Memory: Overcoming the Limitations of Physical Memory


Download: Virtual memory in computer architecture
Size: 5.62 MB

Why Do We Need Virtual Memory?

Computers are designed to be able to execute many programs, each operating on different amounts of data. Operating systems are expected to exploit better computer resources, guaranteeing fast and efficient processing. Three main problems cause the processing to be slow in terms of time and consumed memory. Since we store data in bytes in the disk, the CPU must load the needed data into RAM when executing programs. While being executed, an OS allows a program to use a certain range of addresses from RAM. Suppose this space is bits, which means an expected RAM size of (Exabyte) is required here. Now let’s assume that the OS already reserved a portion of it ( ), but the computer has less memory than the required RAM. Trying to use addresses that are out of range will crash the computer. Furthermore, it’s not feasible for an OS to have the capacity of such a large RAM: When executing multiple programs simultaneously, an OS will assign each one of them a continuous partition of RAM, allowing them to be processed at the same time. Now let’s assume that two programs finished their execution. If the space freed up by the two programs is not This results in Since many programs are executed simultaneously, more than one program can access the same case of memory. To change their value, these programs can collide with each other, corrupt the memory, or crash the system. The figure below shows how data can be easily corrupted when accessed by multiple programs: 3. Introduction to Virt...

Virtual Memory I – Computer Architecture

The objectives of this module are to discuss the concept of virtual memory and discuss the various implementations of virtual memory. All of us are aware of the fact that our program needs to be available in main memory for the processor to execute it. Assume that your computer has something like 32 or 64 MB RAM available for the CPU to use. Unfortunately, that amount of RAM is not enough to run all of the programs that most users expect to run at once. For example, if you load the operating system, an e-mail program, a Web browser and word processor into RAM simultaneously, 32 MB is not enough to hold all of them. If there were no such thing as virtual memory, then you will not be able to run your programs, unless some program is closed. With virtual memory, we do not view the program as one single piece. We divide it into pieces, and only the one part that is currently being referenced by the processor need to be available in main memory. The entire program is available in the hard disk. As the copying between the hard disk and main memory happens automatically, you don’t even know it is happening, and it makes your computer feel like is has unlimited RAM space even though it only has 32 MB installed. Because hard disk space is so much cheaper than RAM chips, it also has a n economic benefit. Techniques that automatically move program and data blocks into the physical main memory when they are required for execution are called virtual-memory techniques. Programs, and hen...

Virtual Memory in Operating System

Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of the main memory. The addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify physical storage sites, and program-generated addresses are translated automatically to the corresponding machine addresses. The size of virtual storage is limited by the addressing scheme of the computer system and the amount of secondary memory is available not by the actual number of the main storage locations. It is a technique that is implemented using both hardware and software. It maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory. • All memory references within a process are logical addresses that are dynamically translated into physical addresses at run time. This means that a process can be swapped in and out of the main memory such that it occupies different places in the main memory at different times during the course of execution. • A process may be broken into a number of pieces and these pieces need not be continuously located in the main memory during execution. The combination of dynamic run-time address translation and use of page or segment table permits this. If these characteristics are present then, it is not necessary that all the pages or segments are present in the main memory during execution. This means that the required pages need to b...

Virtual Memory: Overcoming the Limitations of Physical Memory

• Virtual memory is defined as a memory management method where computers use secondary memory to compensate for the scarcity of physical memory. • Virtual memory provides benefits in terms of costs, physical space, multitasking capabilities, and data security. • This article explains the fundamentals of virtual memory, its core architecture, benefits, and challenges. Table of Contents • • • Virtual memory refers to a memory management method where computers use secondary memory to compensate for the scarcity of physical memory. The technique is exploited by a computer’s operating system (OS) in situations when the system lacks sufficient RAM to execute instructions. With virtual memory, computers can run complex and sophisticated programs as the conflicting memory demands of multiple programs are met within a fixed memory space. Before virtual memory, systems used RAM and secondary memory. In the early 1940s and 1950s, computer memory was quite expensive. However, with time, computer programs became more complex, and developers feared that these large programs might consume all of a computer’s main memory and eventually run out of it. This led to the development of virtual memory in the late 1950s. In 1959, researchers at the University of Manchester, England, developed the first virtual memory system for a computer named ‘Atlas.’ This was followed by Burroughs Corp’s development of the first commercial computer in 1961 with built-in virtual memory. Later in 1982, Intel ...