Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Multiple Choice Questions

Q261: Which of the following is true about FIFOs in UNIX/Linux?
  • A: FIFOs require a process to be created each time they are used
  • B: FIFOs are destroyed once a process using them exits
  • C: FIFOs are used only between related processes
  • D: FIFOs cannot be opened for writing
View Answer
B

Q262: A named pipe (FIFO) can be created using:
  • A: mknod() and mkfifo()
  • B: mkfifo() and open()
  • C: ls and mkfifo()
  • D: open() and read()
View Answer
A

Q263: In the following command: "$ find ~ -name foo -print 2> errors", what is redirected to the file 'errors'?
  • A: Standard input
  • B: Standard output
  • C: Error messages
  • D: Error data
View Answer
C

Q264: The 'tee' command in UNIX/Linux is used to:
  • A: Redirect error messages to a file
  • B: Redirect output to a file and the display
  • C: Redirect standard input
  • D: Redirect standard output to a file
View Answer
B

Q265: The command "command 1> output-file" redirects:
  • A: Standard input
  • B: Standard output
  • C: Error messages
  • D: Standard error
View Answer
B

Q266: Which function is used to create a FIFO in C?
  • A: mknod()
  • B: mkfifo()
  • C: open()
  • D: write()
View Answer
B

Q267: Which operator is used for error redirection in UNIX/Linux?
  • A: 0<
  • B: 1>
  • C: 2>
  • D: |
View Answer
C

Q268: Which command is used to display the status of processes in UNIX/Linux?
  • A: ps
  • B: ls
  • C: top
  • D: mkdir
View Answer
A

Q269: The server process in the client-server model creates which two FIFO files?
  • A: FIFO1 and FIFO2
  • B: FIFO1 and FIFO3
  • C: FIFO2 and FIFO3
  • D: FIFO4 and FIFO5
View Answer
A

Q270: In the provided example, what is the first message that the client sends to the server?
  • A: Hello, world!
  • B: Hello, class!
  • C: Good morning!
  • D: Goodbye!
View Answer
A

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now