Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Chapter: 12
Q301:
A thread in UNIX/Linux is sometimes called a _________.
A. Heavyweight process
B. Lightweight process
C. Job process
D. Kernel process
Correct Answer: B
Chapter: 12
Q302:
The ________ command in UNIX/Linux terminates a foreground process by sending a SIGINT signal.
A. kill
B. fg
C. bg
D. <Ctrl-C>
Correct Answer: D
Chapter: 12
Q303:
A thread in a multi-threaded process has its own _________.
A. Register set
B. Memory space
C. File descriptor
D. Process ID
Correct Answer: A
Chapter: 12
Q304:
In UNIX/Linux, the <Ctrl-Z> command is used to _________.
A. Suspend a process
B. Terminate a process
C. Move a process to the foreground
D. Resume a suspended process
Correct Answer: A
Chapter: 12
Q305:
The main disadvantage of using threads is the difficulty of _________.
A. Debugging and synchronization
B. Memory management
C. CPU utilization
D. Parallel execution
Correct Answer: A
Chapter: 12
Q306:
Which command is used to display all signals supported by a UNIX/Linux system?
A. kill
B. kill -l
C. ps
D. top
Correct Answer: B
Chapter: 12
Q307:
Which of the following is NOT an attribute of a thread?
A. Program counter
B. Stack
C. Memory address space
D. Memory shared with other threads
Correct Answer: C
Chapter: 12
Q308:
In a multi-threaded process, each thread has its own _________.
A. Stack
B. Program counter
C. Registers
D. All of the above
Correct Answer: D
Chapter: 12
Q309:
The fork() system call is expensive because it requires _________.
A. Memory copy
B. Signal handling
C. CPU scheduling
D. IPC handling
Correct Answer: A
Chapter: 12
Q310:
What is the function of the kill -9 command in UNIX/Linux?
A. Suspend a process
B. Terminate a process with SIGTERM
C. Send SIGINT signal to a process
D. Send SIGKILL signal to a process
Correct Answer: D
Chapter: 12
Q311:
Which of the following commands moves a process from background to foreground in UNIX/Linux?
A. bg
B. fg
C. kill
D. ps
Correct Answer: B
Chapter: 12
Q312:
Threads within the same process share the _________.
A. Stack
B. Memory and resources
C. Thread ID
D. CPU resources
Correct Answer: B
Chapter: 12
Q313:
The command to resume a suspended job in UNIX/Linux is _________.
A. kill
B. bg
C. fg
D. <Ctrl-Z>
Correct Answer: C
Chapter: 12
Q314:
Which of the following commands displays the status of suspended and background jobs in UNIX/Linux?
A. ps
B. kill
C. fg
D. jobs
Correct Answer: D
Chapter: 12
Q315:
A thread's register set is _________.
A. Shared with other threads
B. Unique to each thread
C. Shared with the process
D. Not relevant
Correct Answer: B
Chapter: 12
Q316:
A thread's program counter points to _________.
A. The start of the program
B. The next instruction to execute
C. The memory address of the program
D. Other threads' code
Correct Answer: B
Chapter: 12
Q317:
The UNIX/Linux command _________ is used to suspend a running process.
A. <Ctrl-Z>
B. kill
C. bg
D. fg
Correct Answer: A
Chapter: 12
Q318:
In multi-threaded applications, the threads share the _________.
A. Code section and data section
B. Stack and heap
C. Program counter
D. All of the above
Correct Answer: A
Chapter: 12
Q319:
What is the correct syntax to use the fg command?
A. fg %job_id
B. fg job_id
C. fg -job_id
D. fg
Correct Answer: A
Chapter: 12
Q320:
The ________ system call is used to create a new process.
A. fork()
B. join()
C. execute()
D. kill()
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now