Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

it is possible to run without virtual memory at all, just physical memory (in fact, most embedded systems run this way). How?

I am learning computer architecture and came across one statement that " It is possible to run without virtual memory at all, just physical memory (in fact, most embedded systems run this way) ".

So is it true ? if yes, then I want to know how ?

Thanks.

like image 578
user2872463 Avatar asked Oct 12 '13 16:10

user2872463


People also ask

What happens if there is no virtual memory?

If virtual memory doesn't exist, we can't load more than one program in the main memory. This means that without virtual memory, we can only run one program at a time. This is because each program might have to use different functions that may point to the same addresses in RAM.

Do embedded systems use virtual memory?

Embedded systems and other special-purpose computer systems that require very fast and/or very consistent response times may opt not to use virtual memory due to decreased determinism; virtual memory systems trigger unpredictable traps that may produce unwanted and unpredictable delays in response to input, especially ...

What happens when RAM is full and there is no virtual memory?

If there were no such thing as virtual memory, then once you filled up the available RAM your computer would have to say, "Sorry, you can not load any more applications.

What is virtual memory in embedded systems?

Virtual memory is a function provided by many operating systems where the operating system creates a virtual memory space that applications can access as if it were a single piece of contiguous memory. This virtual memory space can be a combination of actual physical memory as well as disk-based resources in concert.


1 Answers

Embedded systems that do not use virtual memory typically run as a single process or thread or support a multi-threading rather than multi-processing task model. That is to say all threads/tasks share a common address space but have separate stacks (although also in the single address space).

On a processor that has an MMU and supports virtual memory this is done simply by not configuring the MMU or at least having a static MMU configuration with a one-to-one mapping so that physical and MMU addresses are identical, or at least so that there is a single virtual address space.

Many low to mid-range architectures used in embedded systems such as, PIC, AVR, ARM7, ARM Cortex-M, Zilog Z8 etc. lack an MMU, and typically have much smaller memory resources than a typical ARM9/11/Cortex-A or x86 based system.

For multi-threading support in an MMU-less system you would typically use a real-time operating systems (RTOS). Most RTOS, with some notable exceptions are simple task schedulers with IPC and synchronisation primitives and do not use or support an MMU. High-end RTOS such as QNX and VxWorks have MMU support, although in VxWorks it is optional.

uCLinux is a GPOS targeted at processors that have sufficient memory resources to run Linux but which lack an MMU such as ARM7 and Cortex-M. Although arguably, Linux without an MMU rather misses one of the major advantages of using Linux while lacking hard real-time performance, and requiring large memories; a typical RTOS kernel requires (much) less than 10kBytes of code.

like image 96
Clifford Avatar answered Sep 21 '22 15:09

Clifford