‘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…

  1. A.

    connecting an output of a program/command to the input of another program/command.

  2. B.

    connecting one device with another.

  3. C.

    connecting one user with another.

  4. 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

  1. A producing program writes data to its stdout stream.

  2. The shell operator | directs that stream into a pipe.

  3. A consuming program reads the same data from its stdin stream; for example, producer | consumer sends 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.

Explore the full course: Up Police Computer Operator

Loading lesson…