Re: why LogWatch send me a mail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 09, 2004 at 08:11:33AM -0500, Brian Fahrlander wrote:
.... big snip ....
> standard.
> 
>     /dev/shm is kinda new to me, but it vaguely relates to 'shared
> memory' and I *think* deals with swap space, or a RAM-based temporary
> storage (think: /tmp directory).  I'm no expert on this.

Not swap, not /tmp

About shm check out the man pages:
    $ apropos shm
    ...
    pvm_shmd             (1)  - PVM shared memory (2) daemon
    shm_open             (3)  - Create/open or unlink POSIX shared memory objects
    shm_unlink [shm_open] (3)  - Create/open or unlink POSIX shared memory objects
    shmctl               (2)  - shared memory control
    shmget               (2)  - allocates a shared memory segment
    shmop                (2)  - shared memory operations
    ...

Shared memory is a fast way to build an interprocess communication
path.  Messages, locks, and other functions can be established in the
shared memory for communicating between cooperating processes.

The kernel will establish resource limits and enforce permission
and ownership so that a cooperating set of processes can operate 
safely.

See the shm* man pages above as well as the 
man pages for ipc  ....
    ipc                  (2)  - System V IPC system calls
    ipc                  (5)  - System V interprocess communication mechanisms
    ipcrm                (8)  - remove a message queue, semaphore set or shared memory id
    ipcs                 (8)  - provide information on ipc facilities


Recommended reading:

   "The Magic Garden Explained, the internals of UNIX sys V
    release 4", by Berny Goodheart and James Cox, 1993.

Sadly it out of print and has gotten expensive.  Check used bookstores
and libraries.

This book is valuable as a learning and reference tool.  It contains
sample code that uses lots of interesting advanced functions.  Most of
that code can be found on the net...  Look for it.

Converting from sysV stuff in the book to POSIX is mostly easy.  Most
of the problems in the first book have answers in a companion
Solutions Manual.  (i.e. there are two books).

BTW, IMO, if you have the choice of SysV, BSD or POSIX code
as you do with ipc and signal stuff in Linux go with POSIX.


-- 
	T o m  M i t c h e l l 
	Just say no to 74LS73 in 2004



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux