differentiate between named & unnamed pipe.

Answers were Sorted based on User's Feedback



differentiate between named & unnamed pipe...

Answer / sri

Unnamed pipe:
1) These are created by the shell automatically.
2) They exists in the kernel.
3) They can not be accesses by any process, including the
process that creates it.
4) They are opened at the time of creation only.
5) They are unidirectional.

Named Pipe:( also called FIFO, First In FIrst Out)
1) They are created programatically using the command mkfifo.
2) They exists in the file system with a given file name.
3) They can be viewed and accessed by any two un-related
processes. ls cmd shows "p" in the permission bits for a
named pipe.
4) They are not opened while creation.
5) They are Bi-directinoal.

6) A process writing a named pipe blocks until there is a
process that reads that data.
7) Broken pipe error occurs when the writing process closes
the named pipe while another reading process reads it.

Is This Answer Correct ?    172 Yes 21 No

differentiate between named & unnamed pipe...

Answer / ramprasad g

named pipe ( is commonly known as FIFO) can be used between
2 totally unrelated processes to communicate.

however pipes cannot be used by process that don't have some
common ancestry (eg parent-child).

Is This Answer Correct ?    128 Yes 12 No

differentiate between named & unnamed pipe...

Answer / rama

Named Pipes will still exist even after the process which
create the named pipe exit

Is This Answer Correct ?    80 Yes 18 No

differentiate between named & unnamed pipe...

Answer / vidya

1. Unnamed pipe: Which is what the shell uses to pipe data
between
processes
2. Named pipe: Allows two independent processes to find the pipe

Is This Answer Correct ?    43 Yes 4 No

differentiate between named & unnamed pipe...

Answer / ankit shah

- Pipes are opened while it is being created and named pipes are first created and then opened for writing and reading by the process.

Is This Answer Correct ?    39 Yes 5 No

differentiate between named & unnamed pipe...

Answer / k. jagan

Named pipe:It has only one fd(file descriptor returned by
open() function).

unnamed pipe:It has two fds(file descriptor returned by
system call pipe(),i.e p[0] for read and p[1] for write).

Is This Answer Correct ?    38 Yes 11 No

differentiate between named & unnamed pipe...

Answer / zee

PIPE : PIPE IS AN INTER PROCESS COMMUNICATION.
PIPE IS NOTHING BUT PASSING INFORMATION FROM ONE
PROCESS PROGRAM TO ANOTHER PROCESS.
PIPE CONSISTS OF TWO TYPES
NAMED PIPE
UNNAMED PIPE

NAMED PIPE:NAMED PIPE IS AN UNRELATED PROCESS
NAMED PIPE USES FIFO OPERATION
IT IS CREATED BY USING mkfifo
IT IS BIDIRECTIONAL
IT EXISTS IN FILE SYSTEM WITH A GIVEN FILE NAME

UNNAMED PIPE:UNNAMED PIPE IS A RELATED PROCESS
IT IS CREATED BY SHELL AUTOMATICALLY
IT IS UNIDIRECTIONAL
IT EXISTS IN KERNAL

Is This Answer Correct ?    24 Yes 4 No

differentiate between named & unnamed pipe...

Answer / the named one

http://www.cs.fredonia.edu/zubairi/s2k2/csit431/pipes.html
go to this link and then you can see the unnamed and named
pipes both given properly.
Unnamed pipes can be bidirectional or unidirectional both
ways . In previous Unix systems it was unidirectional that's
why it used to return two pointers but in New it is
bidirectional so it returns a pointer.

Is This Answer Correct ?    9 Yes 4 No

differentiate between named & unnamed pipe...

Answer / vasanth

unnamed pipe:
1)pipe is an ipc mechanism which is not having any name will be referred by the discriptors one for writing and another for reading.
2)pipe is created using pipe function.
int pipe(int filedes[2]);
3)communication between related processes.
4)it has only one fd.
5)unidirectional.
named pipe:
1)fifo is an ipc mechanism it can be said as named pipe.
2)fifo is created using mkfifo.
int mkfifo(const char *pathnam,mode_t mode);
3)communication between any two processes.
4)it has only two fd.
5)biidirectional.

Is This Answer Correct ?    13 Yes 13 No

differentiate between named & unnamed pipe...

Answer / jhsjksk

NAMED PIPE:A pipe whose name exist in the file system.
unnamed pipe:it does not contain any name.

Is This Answer Correct ?    7 Yes 12 No

Post New Answer

More Unix AllOther Interview Questions

Give the command to display space usage on the UNIX file system.

6 Answers  


differentiate between named & unnamed pipe.

11 Answers   Cisco, IIT, ISEC,


How to find the version details of unix? if any application is installed in unix OS how to find the version of that application is it possilbe or not? pls let me know cmd in detail.

5 Answers   HCL,


How to put a job in background & bring it to foreground?

3 Answers  


why unix commands simpler rather than complex task

0 Answers   CGI,






What is a pipe?

18 Answers   Fichtner,


What does mknod do? What?s a named pipe?

1 Answers   Datamatics,


What does init do? What does inetd do?

1 Answers  


How do you execute a UNIX command in the background?

2 Answers  


How will you run the script in UNIX?

5 Answers   BMC,


What is the difference between windows environment and Unix environment ?

8 Answers   Oracle,


In this command sqlplus -s username/password what is -S and what's the use..???

1 Answers   TCS,


Categories