Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Chapter: 6
Q141:
Which system call is used to terminate a process in UNIX/Linux?
A. exit()
B. fork()
C. wait()
D. terminate()
Correct Answer: A
Chapter: 6
Q142:
In UNIX, which process gets a new process identifier (PID) when a fork() system call is made?
A. The parent process
B. The child process
C. Both processes
D. Neither process
Correct Answer: B
Chapter: 6
Q143:
A parent process must call which system call to wait for a child process to terminate?
A. fork()
B. wait()
C. exit()
D. exec()
Correct Answer: B
Chapter: 6
Q144:
When a process terminates, what is the status information returned to?
A. The parent process
B. The operating system
C. The kernel
D. Another child process
Correct Answer: A
Chapter: 6
Q145:
Which of the following is NOT shared between parent and child processes after a fork() system call?
A. Open file descriptor table
B. Current working directory
C. Parent process ID (PPID)
D. Signal handling settings
Correct Answer: C
Chapter: 6
Q146:
The child process created by fork() has its own copy of the parent’s _______.
A. File descriptors
B. Environment
C. Current working directory
D. PID
Correct Answer: D
Chapter: 6
Q147:
When a process exceeds its allocated resources, it can be terminated by the _________.
A. Operating system
B. Parent process
C. Child process
D. Kernel
Correct Answer: B
Chapter: 6
Q148:
Which of the following is a possible reason for the fork() system call to fail?
A. Maximum number of processes for a user exceeded
B. Memory allocation failed
C. Parent process terminated
D. Child process has no resources
Correct Answer: A
Chapter: 6
Q149:
If the parent process terminates, all of its children are assigned to which process?
A. Init process
B. Parent process
C. IDLE process
D. Kernel process
Correct Answer: A
Chapter: 6
Q150:
The system call used to destroy the memory image of a program and load a new program is _______.
A. fork()
B. exec()
C. wait()
D. exit()
Correct Answer: B
Chapter: 6
Q151:
What does the wait() system call do in UNIX/Linux?
A. Starts a new process
B. Waits for a process to terminate
C. Loads a new program into a process’s memory space
D. Ends the execution of a process
Correct Answer: B
Chapter: 6
Q152:
When a process is created, which resource is NOT typically allocated to it?
A. CPU time
B. Memory
C. I/O devices
D. Operating system code
Correct Answer: D
Chapter: 6
Q153:
If a process creates a child process and then terminates, the child process will be assigned a new parent. This new parent is typically the _______.
A. Kernel
B. Init process
C. Child process
D. Parent process
Correct Answer: B
Chapter: 6
Q154:
A process can terminate itself using which system call?
A. exit()
B. fork()
C. wait()
D. terminate()
Correct Answer: A
Chapter: 6
Q155:
What is the main purpose of the exec() system call in UNIX/Linux?
A. Terminate a process
B. Replace the process's memory with a new program
C. Wait for a process to terminate
D. Create a child process
Correct Answer: B
Chapter: 6
Q156:
The fork() system call is used to _______.
A. Terminate a process
B. Create a new process
C. Replace a process with a new program
D. Wait for a process to finish
Correct Answer: B
Chapter: 6
Q157:
In a UNIX system, a parent process that creates a child process can _______.
A. Terminate the child process after its creation
B. Wait for the child process to terminate
C. Let the child process run indefinitely
D. Assign new resources to the child process
Correct Answer: B
Chapter: 6
Q158:
After a fork() system call, the return value for the parent process is the _______.
A. Process ID of the child
B. -1
C. Process ID of the parent
Correct Answer: C
Chapter: 6
Q159:
In the process tree of UNIX/Linux, the first process created is the _______.
A. Parent process
B. Init process
C. Child process
D. Supervisor process
Correct Answer: B
Chapter: 6
Q160:
Fill in the blank: When a parent process terminates, its child processes are typically adopted by the _______ process.
A. Init
B. Process
C. Kernel
D. Parent
Correct Answer: D

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now