The Atlas Computer
In the early 1960s, the University of Manchester developed a machine that would forever change the world of computing: the Atlas computer. At the time, Atlas was one of the world’s first supercomputers, a true pioneer in the realm of computer science. It was so powerful that when Atlas went offline, it was said that half of the United Kingdom’s computing power was lost. But Atlas wasn’t just about raw power; it introduced a groundbreaking concept that would shape the future of computing - virtual memory.
What is Virtual Memory?
To understand the significance of virtual memory, let’s step back into 1962. Imagine you’re a computer program. In those days, managing memory was a complex and manual process. Each program had to know exactly where its data was stored in the computer’s physical memory (known as RAM). If two programs tried to use the same memory space, it could lead to crashes or corrupted data.
This is where virtual memory comes into play. Virtual memory allows each program to operate as if it has access to a large, continuous block of memory, called a virtual address space. The program doesn’t need to worry about the actual physical location of the data. This makes programming simpler and more efficient, as each program can operate independently without interfering with others.
How Does Virtual Memory Work?
Virtual Addresses vs. Physical Addresses
- A program uses virtual addresses to refer to memory locations. These virtual addresses don’t correspond directly to physical memory locations.
- The computer’s RAM, where data is actually stored, uses physical addresses.
Memory Pages
- Memory is divided into small, fixed-sized blocks called pages. These pages are like small chunks of memory that can be easily managed.
- When a program wants to access a piece of data, it refers to the data using a virtual address.
Memory Management Unit (MMU)
Computers use a special hardware component called a Memory Management Unit (MMU). The MMU is responsible for translating virtual addresses into physical addresses using a simple table lookup. This table is called the page table or page map. For example, if a program tries to access data at a virtual address, the MMU finds out where that data is stored in physical memory and directs the program to the correct location.
Page Table/Map
To keep track of where each virtual page is stored in physical memory, the operating system maintains a page table. MMU uses page table to translate virtual addresses into physical ones. When a program requests data, the MMU consults the page table to find the correct physical address, retrieves the data, and hands it back to the program.
The Impact of Virtual Memory
The introduction of virtual memory by the Atlas computer was a game-changer. It allowed multiple programs to run simultaneously without interfering with each other, making computers more reliable and efficient. Programs no longer needed to be concerned about where their data was stored in physical memory; they could simply use virtual addresses and let the MMU handle the rest.
Although virtual memory was a revolutionary idea, it wasn’t without its challenges. The process of translating virtual addresses to physical addresses can be slow, as the MMU needs to look up the correct location in the page table. However, the benefits far outweighed the drawbacks, and virtual memory became a standard feature in modern computing systems.