views:

116

answers:

4

Hi,

How to give single common address space for all tasks. IF its happening like this can we avoid virtual to physical memory mapping.

I f all task sharing common address space then how can we avoid virtual to physical memory mapping.

A: 

I'm not sure why you would want to disable virtual memory mapping - it's a built in function of the cpu, and pretty much essential when running an OS to properly isolate processes from each other.

Most operating systems allow you to disable virtual memory, so that your memory capacity is limited by physical memory. However, A processes address space is still virtual, and virtual to physical mapping is still happening.

A way to get what you want is to run an operating system that executes in Real Mode, such as DOS or Windows 3.0, or write your own.

The advantages of virtual memory far outweigh the disadvantages. Why do you want to avoid virtual memory.

mdma
A: 

This is how some older operating systems and even how some modern operating systems that lack VM still work. It has many disadvantages for things like desktop and server applications but it can be useful in an embedded and/or real-time context, or where you have minimal hardware.

Paul R
+1  A: 

There are a few modern (research) OS's that do this, like Singularity and there are performance benefits, primarily because it no longer needs to do context changes and the file/symbol loader no longer needs to do address translation for global caches and kernel functions.

You do need to be a bit more specific about what you're looking for, tho'. You tagged your post as OSX and Linux, both of which require virtual memory. When running on systems without a MMU (and thus no virtual memory) it emulates it, which I'm fairly certain you can't circumvent. I'm not an expert by any means.

TkTech
+1  A: 

uClinux is an implementation of Linux that runs on processors that lack an MMU (such as ARM7), so by definition must have a single address space for all tasks.

So one answer to "how" is "use uClinux".

You tagged this VxWorks, and there is another answer; VxWorks supports a flat memory. In fact when I last used it the MMU protection was an (expensive) add on. Many other RTOS designed for micro controllers similarly do not support an MMU, such as eCOS, and FreeRTOS.

Of RTOS's that do support an MMU, QNX is probably amongst the most robust and mature, while still maintaining high performance.

Clifford