开发者

single common address space for all tasks

开发者 https://www.devze.com 2022-12-29 13:02 出处:网络
H开发者_Python百科ow to give single common address space for all tasks. IF its happening like this can we avoidvirtual to physical memory mapping.

H开发者_Python百科ow 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.


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.


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.


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.


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.


The VxWorks AE(Advanced Edition supports) deviates from the concept of Common address space for all tasks.So it can effectively be used in both systems with MMU and without MMU .The common address space for all tasks is called flat memory model and the separate address space for different tasks is called over lapped memory model or segmented memory model.You should not confuse the memory model with the memory lay out as seen in object files which divides data in to Code Segment ,Data Segment ,BSS etc .Both are entirely different things :).

This link in stack overflow will help better

Difference between flat memory model and protected memory model?

0

精彩评论

暂无评论...
验证码 换一张
取 消