Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 41
Q1121:
The working set model uses a parameter ∆ to define what?
A. The working set window
B. The total demand for frames
C. The page fault rate
D. The degree of multiprogramming
Correct Answer:
A
Chapter: 41
Q1122:
In the working set model, what happens if ∆ is too large?
A. It may overlap several localities
B. It will be too small to capture the locality
C. It causes more page faults
D. It reduces the accuracy of the model
Correct Answer:
A
Chapter: 41
Q1123:
In which scenario would local page replacement be preferred?
A. To prevent one process from affecting others
B. When all processes are equally important
C. When CPU utilization is low
D. When page faults are rare
Correct Answer:
A
Chapter: 41
Q1124:
When is pre-paging useful?
A. When a process has a large number of page faults at the start
B. When there are no page faults
C. When the CPU utilization is high
D. When the memory is fully utilized
Correct Answer:
A
Chapter: 42
Q1125:
What is the primary function of an operating system in relation to files?
A. Storing data
B. Interpreting file types
C. Managing file operations
D. Executing programs
Correct Answer:
C
Chapter: 42
Q1126:
In UNIX, what is the inode used for?
A. Accessing file contents
B. Accessing file attributes
C. Accessing file permissions
D. Accessing directory entries
Correct Answer:
B
Chapter: 42
Q1127:
What file attribute refers to the symbolic name of a file?
A. Location
B. Size
C. Owner
D. Name
Correct Answer:
D
Chapter: 42
Q1128:
A file in UNIX can be created using the __________ system call.
A. creat
B. open
C. write
D. delete
Correct Answer:
A
Chapter: 42
Q1129:
Which of the following file types is used to store data on secondary storage in UNIX?
A. Directory
B. Block-special file
C. Character-special file
D. Ordinary file
Correct Answer:
D
Chapter: 42
Q1130:
Which system call is used to read from a file in UNIX?
A. read
B. write
C. open
D. lseek
Correct Answer:
A
Chapter: 42
Q1131:
In UNIX, what is the function of the 'lseek' system call?
A. Repositions within a file
B. Deletes a file
C. Writes to a file
D. Opens a file
Correct Answer:
A
Chapter: 42
Q1132:
Which file type in UNIX allows communication between processes running on the same system?
A. Symbolic link
B. FIFO
C. Socket
D. Directory
Correct Answer:
B
Chapter: 42
Q1133:
Which directory structure allows each user to have a separate directory?
A. Single-level directory
B. Tree directory
C. Two-level directory
D. Multi-level directory
Correct Answer:
C
Chapter: 42
Q1134:
The UNIX command to create a new directory is __________.
A. mkdir
B. rmdir
C. cd
D. ls
Correct Answer:
A
Chapter: 42
Q1135:
Which of the following file access methods allows reading and writing records in no particular order?
A. Sequential Access
B. Direct Access
C. Index Access
D. Binary Access
Correct Answer:
B
Chapter: 42
Q1136:
What does the 'readdir' function do in UNIX?
A. Opens a file
B. Reads a directory entry
C. Closes a directory
D. Changes a directory path
Correct Answer:
B
Chapter: 42
Q1137:
In UNIX, the absolute pathname always starts with the __________ directory.
A. Home
B. Current
C. Root
D. Parent
Correct Answer:
C
Chapter: 42
Q1138:
Which of the following is an example of a relative pathname in UNIX?
A. /etc/passwd
B. /home/user/documents
C. ~/courses/cs604
D. /usr/bin
Correct Answer:
B
Chapter: 42
Q1139:
The system call used to delete a file in UNIX is __________.
A. unlink
B. remove
C. delete
D. rmdir
Correct Answer:
A
Chapter: 42
Q1140:
Which of the following file types in UNIX corresponds to character-oriented devices?
A. Character-special file
B. Block-special file
C. Directory
D. Socket
Correct Answer:
B