Embedded Linux >> Memory management in embedded Linux

by vinaynk » Wed, 13 Jul 2005 00:05:53 GMT

Hello

I am little confused about the memory managent in Embedded Linux. My
understanding is that, one of the properties of embedded OS it
predictability. And the demand-paging/swapping is something that brings
in un-predictability.

But in practical situations how is demand-paging handled in embedded
linux ? Is it disabled? Are all the pages needed by a process loaded
earlier itself??

Is MMU used in such embedded devices? Can we have a system where MMU is
enabled but demand-paging/swapping is disabled ?

Just how does the whole thing work in embedded Linux system like a
mobile phone????

thanx
Vinay


Embedded Linux >> Memory management in embedded Linux

by Grant Edwards » Wed, 13 Jul 2005 00:49:42 GMT



"Embedded" just means that it's in a device that isn't a
general-purpose computer (one that runs all sorts of different
programs depending on what the user wants to do). An embedded
comptuer has a "single" function and it runs a fixed set of SW.


Yes it does.


That depends on the device. Simpler devices that don't have
MMUs, don't do demand paging.


Not usually -- unless you're talking about uCLinux, which
doesn't have demand-paging.


If it has one it usually is used.


Sure. I don't know if Linux supports that particular
situation.


You'll have to ask somebody who's used Linux in a mobile phone.

--
Grant Edwards grante Yow! I just remembered
at something about a TOAD!
visi.com

Embedded Linux >> Memory management in embedded Linux

by Geronimo W. Christ Esq » Wed, 13 Jul 2005 05:30:33 GMT


Linux isn't an embedded OS.


I love questions like this.

Embedded Linux >> Memory management in embedded Linux

by Grant Edwards » Wed, 13 Jul 2005 10:36:22 GMT


It can be (and is in millions of devices), but that wasn't it's
orignal intent.


It's almost like asking what's the answer to the ultimate
question of life, the universe, and everything. :)

--
Grant Edwards grante Yow! ... Blame it on the
at BOSSA NOVA!!!
visi.com

Embedded Linux >> Memory management in embedded Linux

by vinaynk » Wed, 13 Jul 2005 11:43:43 GMT

Well Geronimo , If Linux isn't an embedded OS, then why so much hype
about embedded Linux ?

I am stuck at this demand-paging/swapping issue in embedded linux!!!

Embedded Linux >> Memory management in embedded Linux

by Grant Edwards » Wed, 13 Jul 2005 12:09:40 GMT


What do you mean you're "stuck at it"?

You can use uCLinux without VM, demand paging, or swapping.

You can use "regular" Linux with or without swapping.

I'm not sure if you can have VM without demand-paging, though.

--
Grant Edwards grante Yow! .. he dominates the
at DECADENT SUBWAY SCENE.
visi.com

Embedded Linux >> Memory management in embedded Linux

by Mile Blenton » Wed, 13 Jul 2005 14:54:03 GMT


it's ... 42

:)

Embedded Linux >> Memory management in embedded Linux

by vinaynk » Wed, 13 Jul 2005 22:40:04 GMT

Well...

So from the replies, it seems that in an embedded device we can have
swapping enabled or disabled. Lets assume its enabled. In that case
where would the swap partition reside??? A small device cannot have a
hard disk for that purpose. That leaves some kind of flash device,
which is much slower than a hard disk. So why at all enable swapping in
an embedded device???

Can any one give an example of an embedded device where the swapping in
embedded linux is enabled?

Vinay

Embedded Linux >> Memory management in embedded Linux

by floyd » Wed, 13 Jul 2005 23:11:33 GMT


Why is it that a small device cannot have a hard disk?

But more important, if it doesn't have a device suitable for
swap, why would it be enabled?


Well, why *are* you enabling it?


Any embedded device with a 10g or larger hard disk... :-)

An embedded system to control machinery, navigate a boat, fly an
airplane, or play music in a car might fit that ticket, or might
not.

Regardless, given the price of RAM these days, it doesn't make a
lot of sense to design a system to *need* swap.

--
Floyd L. Davidson < http://web.newsguy.com/floyd_davidson> ;
Ukpeagvik (Barrow, Alaska) XXXX@XXXXX.COM

Embedded Linux >> Memory management in embedded Linux

by Grant Edwards » Wed, 13 Jul 2005 23:13:33 GMT


On a hard drive. Embedded devices can have hard drives.


Is an iPod small? It has a hard drive.


Unless it has a hard-drive, it's probaby not practical.


Something like a Tivo box or other Linux-based media players?
My MythTV box is for all practical purposes an "ebedded"
device, and it has 200GB of disk space and swap is enabled.

--
Grant Edwards grante Yow! Yow! I'm out of
at work...I could go into
visi.com shock absorbers...or SCUBA
GEAR!!

Embedded Linux >> Memory management in embedded Linux

by vinaynk » Wed, 13 Jul 2005 23:35:54 GMT

So from the discussions above it seems like an embedded device can have
swapping enabled or disabled. Lets say its enabled. In that where would
the swap partition reside? For a small device it can't be hard disk. so
can it be some kind of flash device ? But that is too slow.

Can any body give me a practical example where the swapping is enabled
for an embedded environment?

Embedded Linux >> Memory management in embedded Linux

by FLY135 » Fri, 15 Jul 2005 21:47:19 GMT


Wow! Who knew that understanding how Linux works in a mobile phone is
akin to understanding the "ultimate question of life". Ya learn a lot
on Usenet.

Embedded Linux >> Memory management in embedded Linux

by Geronimo W. Christ Esq » Sat, 16 Jul 2005 22:30:08 GMT


Small devices should never swap. Under Linux, you simply configure no
swap partitions.

Embedded Linux >> Memory management in embedded Linux

by Geronimo W. Christ Esq » Sat, 16 Jul 2005 22:31:38 GMT


I'm being a bit nit-picky. Linux doesn't have fine-grained control over
memory allocation and CPU scheduling in the way that other embedded OSs do.


I don't think you should worry about it.

Similar Threads

1. Memory management in embedded Linux

2. Memory management in embedded linux

Hello

I am little confused about the memory managent in Embedded Linux. My
understanding is that, one of the properties of embedded OS it
predictability. And the demand-paging/swapping is something that brings
in un-predictability.

But in practical situations how is demand-paging handled in embedded
linux ? Is it disabled? Are all the pages needed by a process loaded
earlier itself??

Is MMU used in such embedded devices? Can we have a system where MMU is
enabled but demand-paging/swapping is disabled ?

Just how does the whole thing work in embedded Linux system like a
mobile phone????

thanx
Vinay

3. Embedded Linux's memory management - Embedded Linux

4. Memory Management on Embedded Devices

Hi All,

Embedded Devices don't have swap device, so how demand paging is done?

- A

5. Out of memory management in embedded systems - Linux

6. [News] Embedded Database Management System Supports Linux

7. power management on embedded linux? - Embedded Linux

8. [linux-pm] Re : [HELP] Power management for embedded system