You are not logged in.

#1 2009-02-06 05:09:56

Erroneous
Member
Registered: 2006-08-28
Posts: 35

Point of /dev/shm

I'm looking through my mounted files systems and see that /dev/shm has no data on it and is using up (I assume) some of my RAM but not all 247 MB shown on df -h. Is it safe to take this out of /etc/fstab or is it used for some system function?

Last edited by Erroneous (2009-02-06 05:11:16)

Offline

#2 2009-02-06 05:50:27

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Point of /dev/shm

'shared memory' is extensively used in inter-process communications.
Especially if you don't use threads (which has data common with parent and parallel threads), ie 'fork' - then shared memory is more or less your only opttion ;-)

Offline

#3 2009-02-06 10:57:41

Erroneous
Member
Registered: 2006-08-28
Posts: 35

Re: Point of /dev/shm

Ah I see. So if I don't run anything with threading then it would be safe to take it out. Since I do I won't. Just to make sure I understand, whenever a program requires multiple threads to have common data it stores it in /dev/shm? Like for instance while encoding a video with 2 threads?

Offline

#4 2009-02-06 11:04:36

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: Point of /dev/shm

You can have a look at this link http://www.cyberciti.biz/tips/what-is-d … usage.html to have an idea about the shared memory.

Offline

#5 2009-02-06 16:41:29

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Point of /dev/shm

Hmmm - that would be the other way around!
If you use 'fork' - you need shared memory; if you use 'threads' you can but you don't have to.
Otherwise - kgas' link above is a good one.

Offline

Board footer

Powered by FluxBB