yakoub abaya wrote:
what is the difference between two processes
communicating through a normal file discriptor and a fifo pipe discriptor ?
> [Transfer by a fifo vs. a shared file]

The difference is that the file is stored in the filesystem, and if the processes have a lot to talk about it is wasteful of filesystem space.

The blocking part is convenience and simplicity as well, how will the shared file reader know when the other side has some new data in the file? It requires polling and is not efficient in OS resources.

A fifo also has semantics that help you, such as atomicity of operations (up to some size of a message) and synchronization of work, the blocking gives you synchronization since the second process won't wake up (and won't waste OS time) until it has data to work on.

Baruch

--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]




Reply via email to