3
$\begingroup$

I will soon be teaching a lesson on ROM, RAM, and virtual memory.

The problem is with “virtual memory”:

Some of the teaching resources correctly use the phrase virtual memory, and physical memory, and describe how virtual is mapped to physical via the memory management unit.

enter image description here from https://en.wikipedia.org/wiki/Virtual_memory

The computer's operating system, using a combination of hardware and software, maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory. Main storage, as seen by a process or task, appears as a contiguous address space or collection of contiguous segments. The operating system manages virtual address spaces and the assignment of real memory to virtual memory. Address translation hardware in the CPU, often referred to as a memory management unit or MMU, automatically translates virtual addresses to physical addresses. Software within the operating system may extend these capabilities to provide a virtual address space that can exceed the capacity of real memory and thus reference more memory than is physically present in the computer.

While in other resources they use the phrase “virtual memory”, and describe “paging”.

Virtual memory is a section of volatile memory created temporarily on the storage drive. It is created when a computer is running many processes at once and RAM is running low.

The operating system makes part of the storage drive available to use as RAM. Virtual memory is much slower than main memory because processing power is being taken up by moving data around, rather than just executing instructions. The guide on operating systems explains how the OS manages memory.

Taken from https://www.bbc.co.uk/education/guides/zmb9mp3/revision/8 Though I have seen the same in resources approved by the exam board.

So the question is what do I do in these situations?

  • The exam board is wrong, but clear about what they think the answer is.
  • The exam board is unclear about the answer.

Context:

UK England, GCSE / A-Level

$\endgroup$

2 Answers 2

1
$\begingroup$

You don't really have a dilemma. Just give them the information as you have presented it here and note to them that if it comes up on the exam, the older definition, though no longer strictly correct, should prevail. Hopefully, though, a valid question on an exam wouldn't depend on the distinction here.

Perhaps you have access to old exams and can learn what questions in the past have been used. Testing agencies often post old exams, though I don't know UK practice.


As to the old Mac system, it was Virtual Memory and stuff stored on the disk had to be brought to RAM before being manipulated. It just wasn't a UNIX-like Paged Memory Management System, but a simpler thing. And even Paged systems still talk about swapping. It is pages that get swapped, though, rather than a full application data space. So, the two things aren't as different as you might think. The Mac under OS9 did actually run a bit better with some VM enabled.

The only thing I find problematic with the "official" definition is that a student might conclude from it that data on the disk can be directly manipulated there. It doesn't actually say that, but a student might get confused.

Be honest. Be complete. Warn about caveats and possible trickery, though I doubt trickery will occur.

$\endgroup$
1
  • $\begingroup$ I agree, except I don't thing that using VM to mean swap is old (or new). It is probably just a mistake that has happened a lot. People confuse a thing with its implementation. I have just realised that I am confusing paging and swapping (Paging uses VM. Swapping is like paging.) $\endgroup$ Nov 15, 2017 at 9:37
2
$\begingroup$

You are seeing a difference between virtual memory as described to a computer user some number of years ago (this is more frequently called "swap" now), and virtual memory as understood by an operating system developer.

If one goes back and looks at, say... Mac OS System 7, one can see this description:

Virtual memory adds more memory to your Macintosh by making use of unused free space on the hard drive. Because the extra memory comes from the hard drive, though, it is much slower than the RAM chips.

Or over in retro computing

To avoid slow performance, Apple suggests that the amount of virtual memory you select be less than the system RAM.

This is the virtual memory as understood by a user.

Virtual memory as understood by a operating system designer and systems programmer deals with the virtual mapping of memory space used by a process to another space that is managed by the operating system. It is not necessarily on a disk or any other medium. It is not necessarily continuous in its physical addressing.

$\endgroup$
1
  • $\begingroup$ Yes there is confusion outside of education, it seems to be every where. Virtual memory is used to implement swap. Then people started to call swap virtual memory. But this answer does not answer the question. It is not about education. It does not answer my dilemma. $\endgroup$ Nov 14, 2017 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.