Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Multiple Choice Questions

Q191: In UNIX/Linux IPC, what does the pipefd[0] descriptor represent in the child process?
  • A: Read end of the pipe
  • B: Write end of the pipe
  • C: A communication channel with the parent process
  • D: The mailbox for the process
View Answer
A

Q192: Which of the following is true about indirect communication in IPC?
  • A: Processes must share a mailbox to communicate
  • B: Messages are always sent directly between processes
  • C: Every process has its own mailbox
  • D: Communication occurs only through a shared memory
View Answer
A

Q193: What does the write() system call do in UNIX/Linux?
  • A: Reads data from a file descriptor
  • B: Closes a file descriptor
  • C: Writes data to a file descriptor
  • D: Creates a communication link between processes
View Answer
C

Q194: In UNIX/Linux, a pipe is referred to as a ________ channel for communication.
  • A: Full-duplex
  • B: Half-duplex
  • C: Bounded-buffer
  • D: Synchronization channel
View Answer
B

Q195: What happens if the write() system call fails in UNIX/Linux?
  • A: It returns 0 indicating successful writing
  • B: It returns -1 and sets errno
  • C: It retries the operation
  • D: It closes the file descriptor automatically
View Answer
B

Q196: The read() system call in UNIX/Linux is used to ______.
  • A: Write data to a file descriptor
  • B: Read data from a file descriptor
  • C: Close a file descriptor
  • D: Create a new file descriptor
View Answer
B

Q197: The close() system call in UNIX/Linux does NOT perform which of the following actions?
  • A: Close a file descriptor
  • B: Frees resources associated with the file descriptor
  • C: Sets the file position pointer to the beginning
  • D: Deletes a file
View Answer
D

Q198: Which of the following is a characteristic of zero-capacity buffering in IPC?
  • A: The sender does not block
  • B: The queue length is infinite
  • C: The sender blocks until the message is received
  • D: The queue is capable of storing multiple messages
View Answer
C

Q199: A pipe in UNIX/Linux is primarily used for ______ communication.
  • A: One-way
  • B: Two-way
  • C: Three-way
  • D: Multi-channel
View Answer
A

Q200: What is the primary use of the fork() system call in UNIX/Linux IPC?
  • A: To create a copy of the parent process
  • B: To wait for a child process to finish
  • C: To write data into a pipe
  • D: To create a communication link between processes
View Answer
A

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now