Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Multiple Choice Questions

Q221: UNIX/Linux pipes are typically used for communication between:
  • A: Related processes
  • B: Unrelated processes
  • C: Independent processes
  • D: Networked computers
View Answer
A

Q222: A named pipe (FIFO) can be used for communication between:
  • A: Only related processes
  • B: Only unrelated processes
  • C: Both related and unrelated processes
  • D: Just one process at a time
View Answer
C

Q223: In UNIX/Linux, what system call is used to close a file descriptor?
  • A: open()
  • B: close()
  • C: write()
  • D: read()
View Answer
B

Q224: Which system call can fail if the buffer space in the kernel is not available?
  • A: pipe()
  • B: fork()
  • C: close()
  • D: wait()
View Answer
A

Q225: The open system call can fail for the following reasons except:
  • A: Non-existent file
  • B: File permissions issue
  • C: Disk is full
  • D: File table is full
View Answer
D

Q226: Which of the following commands would you use to read the contents of a file using a pipe operator?
  • A: cat file
  • B: grep "search_string" file
  • C: cat file
  • D: pipe
View Answer
A

Q227: What does the wait() system call do in UNIX/Linux?
  • A: Starts a new process
  • B: Terminates the current process
  • C: Waits for the child process to finish
  • D: Opens a file
View Answer
C

Q228: Which system call allows a process to write to a file in UNIX/Linux?
  • A: read()
  • B: open()
  • C: write()
  • D: fork()
View Answer
C

Q229: The fork() system call is used to:
  • A: Create a new process
  • B: Open a file
  • C: Write data to a file
  • D: Read data from a file
View Answer
A

Q230: Pipes in UNIX/Linux are used for:
  • A: Sharing files between processes
  • B: Communication between processes
  • C: File management
  • D: Storing data
View Answer
B

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now