Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Multiple Choice Questions
Q281: What is the purpose of the 'write' system call in the client process?
- A: Send data to FIFO1
- B: Send data to FIFO2
- C: Read data from FIFO1
- D: Read data from FIFO2
View Answer
B
Q282: What does the 'read' system call do in the server process?
- A: Reads data from FIFO1
- B: Reads data from FIFO2
- C: Writes data to FIFO1
- D: Writes data to FIFO2
View Answer
A
Q283: What is the main purpose of using FIFOs in the client-server model?
- A: To provide inter-process communication (IPC)
- B: To read and write files
- C: To manage user permissions
- D: To display process information
View Answer
A
Q284: What happens if the 'open(FIFO1, 0)' system call fails in the client process?
- A: It prints an error and terminates
- B: It continues without reading data
- C: It creates a new FIFO1
- D: It opens FIFO2 instead
View Answer
A
Q285: Which UNIX/Linux command gives a snapshot of the current processes?
- A: ps
- B: ls
- C: top
- D: grep
View Answer
A
Q286: In the provided example, what happens after the server writes to FIFO2?
- A: The client reads the message from FIFO2
- B: The client writes to FIFO2
- C: The server waits for the client to write
- D: Nothing happens
View Answer
B
Q287: What is the correct system call to create a FIFO in UNIX/Linux?
- A: mknod
- B: open
- C: mkfifo
- D: write
View Answer
B
Q288: Fill in the blank: The server process terminates after closing both FIFOs and __________.
- A: receiving a message
- B: sending a message
- C: waiting for the client
- D: terminating the client process
View Answer
D
Q289: What is displayed by the 'ps' command in UNIX/Linux?
- A: Information about the processes running on the system
- B: Information about disk usage
- C: Information about system logs
- D: Information about user accounts
View Answer
A
Q290: What does the fg command do in UNIX/Linux?
- A: Move a process to background
- B: Resume a suspended process in the foreground
- C: Terminate a process
- D: Kill a process
View Answer
B