GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Operating System
Go To First  |  Previous Question  |  Next Question 
 Operating System  |  Question 13 of 82    Print  
What is the difference between the socket and pipe?

  
Total Answers and Comments: 7 Last Update: March 01, 2009     Asked by: vignesh karthikeyan 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 03, 2006 05:55:33   #1  
       

RE: what is the difference between the socket and pipe...

socket and Pipe are all togeather different thinks

socket -It is part of OSI LAYER MODEL. in Osi model communication between diferrent layer takes places through sockets.say apllication layer provide services trough certain sockets to presentation layer and presentation layer uses certain other socket to communicate with upper application layer.

socket are used in SECURE SOCKET LAYER NETWORKS

pipes- it is realated to processing of a process in

cpu pipes are segments of a process in execution.

generaly process are divided into distinct segments which are linearly dependent.ie output of first segment become input for next segment and so on

generally by processing multiple pipes simultaneously we can imporve productivity.ie we can run differnt pipe segment simultaneosuly by keeping in mind that they dont indulge in wainting for each other.


 
Is this answer useful? Yes | No
March 03, 2006 05:58:46   #2  
       

RE: what is the difference between the socket and pipe...

socket and Pipe are all togeather different thinks

socket -It is part of OSI LAYER MODEL. in Osi model communication between diferrent layer takes places through sockets.say apllication layer provide services trough certain sockets to presentation layer and presentation layer uses certain other socket to communicate with upper application layer.

socket are used in SECURE SOCKET LAYER NETWORKS

pipes- it is realated to processing of a process in

cpu pipes are segments of a process in execution.

generaly process are divided into distinct segments which are linearly dependent.ie output of first segment become input for next segment and so on

generally by processing multiple pipes simultaneously we can imporve productivity.ie we can run differnt pipe segment simultaneosuly by keeping in mind that they dont indulge in wainting for each other.

ABHISHEK TRIPATHI

M.C.A 4TH SEM

M.L.S.U UDAIPUR RAJ

EMAIL - abhipounty@yahoo.co.in


 
Is this answer useful? Yes | No
March 18, 2006 01:47:34   #3  
Anand        

RE: what is the difference between the socket and pipe...
Socket and Pipes both are the modes of inter process communicationin Linux or UNIX like systems.Socket is used to communicate between network processes..and kernel mediates for that..like for your internet explorer a socket is created and your Device driver(of Modem)communicates to socket for communicationpipes is another mode of bi directonal communication between orocesses
 
Is this answer useful? Yes | No
July 06, 2006 23:30:58   #4  
pravin        

RE: what is the difference between the socket and pipe...

Socket: it is logical connection for communication of application or two different system. Socket is given named. Then it is called Port. OS have near about 65536 sockets. (i.e 2 pair 1 for TCP & other for UDP). Socket from 0 to 1024 are reserved for OS used. While we can use socket above this in our program say for socket programming in JAva. Socket that are used by client to communicate with Server are ephermal port (short lived) & are released after their session are over. This name socket (port) have wellknown with port number ex. Telnet Server work onTCP port no. 23 TFTP on UDP port 69.

Pipe: pipe is use for connection link. This is used for sending and reciving information within OS or application. Output/ Input through pipe can be buffered or cached. ( in processor also there are pipe U & V pipes)


 
Is this answer useful? Yes | No
July 26, 2007 14:12:09   #5  
vigrem Member Since: July 2007   Contribution: 2    

RE: What is the difference between the socket and pipe...
Pipe is a linear array of bytes as is a file but it is used solely as an I/O stream and it is unidirectional. It also has no name and thus cannot be opened with open. Instead it is created by the pipe system call which returns two descriptors one of which accepts input that is sent to the other descriptor reliably without duplication and in order. The system also supports a named pipe or FIFO. A FIFO has properties identical to a pipe except that it appears in the filesystem; thus it can be opened using the open system call. Two processes that wish to communicate each open the FIFO: One opens it for reading the other for writing. A socket is a transient object that is used for interprocess communication; it exists only as long as some process holds a descriptor referring to it. A socket is created by the socket system call which returns a descriptor for it. There are different kinds of sockets that support various communication semantics such as reliable delivery of data preservation of message ordering and preservation of message boundaries.
 
Is this answer useful? Yes | No
June 17, 2008 15:12:55   #6  
indranilacharyya Member Since: June 2008   Contribution: 1    

RE: What is the difference between the socket and pipe?
pipe is not bi directional communication. pipe is uni directional communication.
 
Is this answer useful? Yes | No
March 01, 2009 05:07:33   #7  
navaneetha.bachu Member Since: February 2009   Contribution: 1    

RE: What is the difference between the socket and pipe?
Pipe is a special file. Two types of pipes are:
unnamed pipes
named pipes (FIFO)
1) Pipe is used for IPC - (Inter Process Communication) whereas socket is used for IPC and also for communication of process in network.
2) pipe supports destructive reading (once if you read it vanishes) Socket does not.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape