Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Chapter: 11
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
Correct Answer: B
Chapter: 11
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
Correct Answer: A
Chapter: 11
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
Correct Answer: A
Chapter: 11
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
Correct Answer: A
Chapter: 11
Q285:
Which UNIX/Linux command gives a snapshot of the current processes?
A. ps
B. ls
C. top
D. grep
Correct Answer: A
Chapter: 11
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
Correct Answer: B
Chapter: 11
Q287:
What is the correct system call to create a FIFO in UNIX/Linux?
A. mknod
B. open
C. mkfifo
D. write
Correct Answer: B
Chapter: 11
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
Correct Answer: D
Chapter: 11
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
Correct Answer: A
Chapter: 12
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
Correct Answer: B
Chapter: 12
Q291:
Which of the following key presses suspends a process in UNIX/Linux?
A. <Ctrl-C>
B. <Ctrl-Z>
C. <Alt-F4>
D. <Ctrl-Q>
Correct Answer: B
Chapter: 12
Q292:
The bg command in UNIX/Linux is used to _________.
A. Move a process to the foreground
B. Resume a process in the background
C. Suspend a process
D. Terminate a process
Correct Answer: B
Chapter: 12
Q293:
In UNIX/Linux, what is the default signal sent by the kill command if no signal is specified?
A. SIGTERM
B. SIGINT
C. SIGKILL
D. SIGSEGV
Correct Answer: A
Chapter: 12
Q294:
What is the primary purpose of the jobs command in UNIX/Linux?
A. Terminate processes
B. Background processes
C. Move processes to foreground
D. Display status of background and suspended processes
Correct Answer: D
Chapter: 12
Q295:
The kill command in UNIX/Linux sends a signal to a process identified by its _________.
A. Job ID
B. Thread ID
C. Process ID
D. Signal ID
Correct Answer: C
Chapter: 12
Q296:
The fg command assumes the current job if _________.
A. %job_id is specified
B. %job_id is omitted
C. Signal ID is specified
D. PID is omitted
Correct Answer: B
Chapter: 12
Q297:
A thread is a basic unit of _________.
A. Memory usage
B. CPU utilization
C. File handling
D. Network communication
Correct Answer: B
Chapter: 12
Q298:
In a multi-threaded process, multiple threads share the _________.
A. Stack
B. Memory and resources
C. Registers
D. Process ID
Correct Answer: B
Chapter: 12
Q299:
Which of the following is an advantage of multithreading?
A. Single-threaded processes are faster
B. Threads cannot share resources
C. Threads consume less memory
D. Threads can run simultaneously on multiple CPUs
Correct Answer: D
Chapter: 12
Q300:
Which of the following is a disadvantage of multithreading?
A. Resource sharing
B. Improved CPU utilization
C. Parallel execution on multiple processors
D. Increased memory usage
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now