Question

In: Computer Science

What are the similarities and the differences between Linux files and pipes

What are the similarities and the differences between Linux files and pipes

Solutions

Expert Solution

Everything in Linux can be considered a file, but the main difference between a file and a pipe is that a pipe is a special instance of a file that has no contents on the filesystem.

A documentation from man fifo says that:

"A FIFO special file (a named pipe) is similar to a pipe, except that it is accessed as part of the filesystem. It can be opened by multiple processes for reading or writing. When processes are exchanging data via the FIFO, the kernel passes all data internally without writing it to the filesystem. Thus, the FIFO special file has no contents on the filesystem; the filesystem entry merely serves as a reference point so that processes can access the pipe using a name in the filesystem.

The kernel maintains exactly one pipe object for each FIFO special file that is opened by at least one process. The FIFO must be opened on both ends (reading and writing) before data can be passed. Normally, opening the FIFO blocks until the other end is opened also."

This means that the pipe does not occupy any space until and unless a process reads/writes some data to it.


Related Solutions

Differences Between Linux and Windows Operating Systems Two key differences between a Linux operating system and...
Differences Between Linux and Windows Operating Systems Two key differences between a Linux operating system and a Windows operating system are the concepts of “mounting” and “drive” letters. Provide an example for each. Why is it important to plan disk partitioning before installing Linux? Discuss the advantages of disk partitioning. Also discuss what logical volume management (LVM) is and why or why you might use it.
What are the similarities and differences between hedging and speculating?
What are the similarities and differences between hedging and speculating?
Discuss the differences and similarities between these three business forms : 1. Differences and similarities between...
Discuss the differences and similarities between these three business forms : 1. Differences and similarities between LLC in USA vs SARL in Lebanon 2. Corporation in USA vs S.A.L in Lebanon 3. General Partnership in USA vs. Unlimited Partnership in Lebanon
What are the similarities and differences between photosynthesis and cellular respiration?
What are the similarities and differences between photosynthesis and cellular respiration?
What were the similarities and differences between the two implementations?
What were the similarities and differences between the two implementations?
What are the similarities and differences between genomics, transcriptomics and metabolomics?
What are the similarities and differences between genomics, transcriptomics and metabolomics?
Discuss the differences and similarities between these two business forms : 1.Similarities and differences between limited...
Discuss the differences and similarities between these two business forms : 1.Similarities and differences between limited partnership in USA vs Limited partnership in Lebanon 2. Similarities and differences between Sole proprietorship in USA vs. Establishment in Lebanon
Describe the similarities and/or differences between the following (at least 4 similarities or differences for each):...
Describe the similarities and/or differences between the following (at least 4 similarities or differences for each): production of ATP in oxidative phosphorylation and production of ATP in the membrane associated (light) reactions photosystem I and photosystem II citric acid cycle (Kreb cycle) and Calvin cycle
Describe the similarities and/or differences between the following (at least 4 similarities or differences for each):...
Describe the similarities and/or differences between the following (at least 4 similarities or differences for each): production of ATP in oxidative phosphorylation and production of ATP in the membrane associated (light) reactions photosystem I and photosystem II citric acid cycle (Kreb cycle) and Calvin cycle
What is the intrinsic value of a share? What are the differences and similarities between capital...
What is the intrinsic value of a share? What are the differences and similarities between capital budgeting project analysis and firm valuation?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT