Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Chapter: 5
Q121:
Which of the following UNIX/Linux commands is used to compile a C program?
A. gcc
B. rm
C. mv
D. mkdir
Correct Answer: A
Chapter: 5
Q122:
Which process state refers to a process that is currently being executed?
A. Running
B. Ready
C. Waiting
D. Terminated
Correct Answer: A
Chapter: 5
Q123:
What is represented by the process control block (PCB) in an operating system?
A. Process state and associated information
B. Program counter
C. List of files opened by the process
D. Memory management information
Correct Answer: A
Chapter: 5
Q124:
Which of the following processes spends more time doing input/output operations than computations?
A. CPU bound
B. IO bound
C. Hybrid bound
D. Time bound
Correct Answer: B
Chapter: 5
Q125:
Which scheduling queue holds all processes that are in the system?
A. Ready queue
B. Job queue
C. Device queue
D. Process queue
Correct Answer: B
Chapter: 5
Q126:
What does the 'mv' command do in UNIX/Linux?
A. Moves or renames files
B. Copies files
C. Deletes files
D. Creates directories
Correct Answer: A
Chapter: 5
Q127:
In the context of processes, what is context switching?
A. Switching from one task to another
B. Saving process information before switching processes
C. Switching the CPU between different processes
D. Saving memory information
Correct Answer: C
Chapter: 5
Q128:
What type of processes is associated with long CPU bursts and few I/O operations?
A. CPU bound
B. IO bound
C. Multi-threaded
D. Time-bound
Correct Answer: A
Chapter: 5
Q129:
In UNIX/Linux, hidden files are those whose names start with _______.
A. .
B. _
C. $
D. /
Correct Answer: A
Chapter: 5
Q130:
In UNIX/Linux, which command is used to display the absolute pathname of the current directory?
A. pwd
B. ls
C. cd
D. mkdir
Correct Answer: A
Chapter: 5
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
Correct Answer: A
Chapter: 5
Q132:
A process can be thought of as a program in _______.
A. Compilation
B. Execution
C. Storage
D. Termination
Correct Answer: B
Chapter: 5
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
Correct Answer: C
Chapter: 5
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
Correct Answer: B
Chapter: 5
Q135:
In UNIX/Linux, the 'mv' command is used to _______.
A. Copy files
B. Remove files
C. Move or rename files
D. List files
Correct Answer: C
Chapter: 5
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
Correct Answer: B
Chapter: 5
Q137:
Which state is a process in when it has finished execution?
A. New
B. Running
C. Waiting
D. Terminated
Correct Answer: D
Chapter: 6
Q138:
What system call is used to create a new process in UNIX/Linux?
A. fork()
B. exec()
C. wait()
D. exit()
Correct Answer: A
Chapter: 6
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
Correct Answer: C
Chapter: 6
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()
Correct Answer: B

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now