A few of the important differences between named pipes and un-named pipes are:
Named Pipes | Unnamed pipes |
Named pipes are given a name and exist as a file in a system, represented by an inode. mkfifo ( char *path, mode_t access_mode) | They do not have names, also referred to as anonymous and identified by their two file descriptors. pipe (int fd[2]); |
They can be used even among unrelated processes. | They can be used only between related processes. |
They are bidirectional, which means the same FIFO can be read from as well as written into. | They are unidirectional, two separate pipes are needed for reading and writing. |
Once created, they exist in the file system independent of the process, can be used by other processes. | Un-named pipes vanish as soon as it is closed or one of the related processes terminates. |
Named pipes can be used for communication between systems across networks | They are local, they cannot be used across networks. |
For details:
Categories: Operating system (OS)
Leave a Reply