‘Pipes’ are used for
2019
‘Pipes’ are used for
Answer: A. connecting an output of a program/command to the input of another program/command. — ConceptIn an operating system, a pipe is an inter-process communication mechanism that carries a stream of data in one direction. It connects the standard…
- A.
connecting an output of a program/command to the input of another program/command.
- B.
connecting one device with another.
- C.
connecting one user with another.
- D.
None of these
Attempted by 1 students.
Show answer & explanation
Correct answer: A
Concept
In an operating system, a pipe is an inter-process communication mechanism that carries a stream of data in one direction. It connects the standard output of one process to the standard input of another, allowing the processes to work as a pipeline.
Application
A producing program writes data to its
stdoutstream.The shell operator
|directs that stream into a pipe.A consuming program reads the same data from its
stdinstream; for example,producer | consumersends the producer output to the consumer input.
Contrast
A device-to-device connection is normally handled through a hardware bus, cable, or network protocol.
A user-to-user connection is normally provided by a communication application or service.
None of these does not apply because the process-stream use is explicitly listed.
Cross-check
Tracing the data flow gives process A stdout → pipe → process B stdin, which matches the stated program-to-program use.
Therefore, pipes connect the output of one program or command to the input of another program or command.