Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Virtual Memory in Microcontrollers

Status
Not open for further replies.

vinoth14

Junior Member level 1
Joined
Feb 27, 2015
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
184
What is virtual memory?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,914
Helped
14,335
Reputation
28,933
Reaction score
13,080
Trophy points
1,393
Location
Bochum, Germany
Activity points
282,243
virtual = not really existent, in contrast to pysical memory

I don't believe that virtual memory is a clearly defined technical term specific to microcontrollers.

The term may be used with microcontrollers that have a MMU (memory managment unit) and can "map" physical memory to different logical (or "virtual") addresses. It would be easier if you give a context for your question.

See also https://en.wikipedia.org/wiki/Virtual_memory
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
14,179
Helped
2,807
Reputation
5,622
Reaction score
2,744
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
105,769
Virtual memory is a substitute for ram when all the ram is occupied. The virtual memory is on hard disk. It is a slow and cumbersome substitute. It tends to give the disk a workout.

My PowerMac has a program called Activity Monitor. One of its functions is to display
amounts of memory being used. Some of it is in ram (wired), some is virtual (disk). My ram is 2GB (it does not change). Virtual can be any size (mine is currently 34GB).
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
15,152
Helped
4,943
Reputation
9,907
Reaction score
4,754
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
128,689
In computers the use of hard disk as 'paged' virtual memory is a common practice but the question referred to microcontrollers so FvM's answer is probably more relevant.

Brian.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,914
Helped
14,335
Reputation
28,933
Reaction score
13,080
Trophy points
1,393
Location
Bochum, Germany
Activity points
282,243
There's a relation to a PC's virtual memory in so far that it also depends on a MMU. In case of the memory pages swapped to disk, the memory managment unit detects the intended virtual memory access and reloads the memory content before program execution can continue.
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
14,179
Helped
2,807
Reputation
5,622
Reaction score
2,744
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
105,769
In computers the use of hard disk as 'paged' virtual memory is a common practice but the question referred to microcontrollers so FvM's answer is probably more relevant.

Brian.

You are correct.

I was all set to bring up 'extended' and 'expanded' memory, which were used in DOS to get around the 640k ram limit. To command the computer to use the additional memory, we had to insert special commands in the startup routine (autoexec.bat or config.sys).

Bill Gates claims he never said '640k is more than enough memory for anyone.'
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
15,152
Helped
4,943
Reputation
9,907
Reaction score
4,754
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
128,689
I think the first large scale 'microcontroller' with virtual memory was the 80186/80286 which although not advertized, worked in real or virtual mode by simply locking the values in the segment registers together (real mode) or allowing them to hold different values (protected or virtual mode). They did it on a purely silicon level, primarily to allow programs to 'think' they used the same memory addresses while in reality each was in a different region of physical memory.

The Bill Gates story dates back to the early 80's and I think it's true. The first IBM PC's I worked on only had 64K of RAM and a cassette tape for mass storage!

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top