Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Multiple Choice Questions
Q131: What does the 'mkdir -p' command do in UNIX/Linux?
- A: Creates directories recursively
- B: Deletes directories recursively
- C: Renames directories
- D: Lists directories
View Answer
A
Q132: A process can be thought of as a program in _______.
- A: Compilation
- B: Execution
- C: Storage
- D: Termination
View Answer
B
Q133: When you use the 'cd ~/courses/cs604/programs' command, you are changing the directory to _______.
- A: ~/home
- B: ~/courses/cs604
- C: ~/courses/cs604/programs
- D: ~/programs
View Answer
C
Q134: A process that waits for I/O to complete before continuing is known as a _______ process.
- A: CPU bound
- B: IO bound
- C: Multi-threaded
- D: Background
View Answer
B
Q135: In UNIX/Linux, the 'mv' command is used to _______.
- A: Copy files
- B: Remove files
- C: Move or rename files
- D: List files
View Answer
C
Q136: What does the 'rmdir' command do?
- A: Removes a non-empty directory
- B: Removes an empty directory
- C: Removes files
- D: Creates a directory
View Answer
B
Q137: Which state is a process in when it has finished execution?
- A: New
- B: Running
- C: Waiting
- D: Terminated
View Answer
D
Q138: What system call is used to create a new process in UNIX/Linux?
- A: fork()
- B: exec()
- C: wait()
- D: exit()
View Answer
A
Q139: In UNIX, what is the parent process’s role when creating a new process?
- A: It waits for the child to finish
- B: It terminates immediately
- C: It creates the child process
- D: It shares resources with the child process
View Answer
C
Q140: Which system call is used to load a new program into a process’s memory space?
- A: fork()
- B: exec()
- C: wait()
- D: exit()
View Answer
B