OS Practice MCQs F24
OS Practice MCQs F24
2. Which component of the operating system interacts directly with the hardware?
a) Kernel
b) Shell
c) File System
d) Application Software
3. System calls provide an interface to the services made available by the operating system to:
a) Hardware components
b) Applications
d) Network protocols
a) fork()
b) open()
c) exec()
d) wait()
1|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
c) To schedule processes
a) Round Robin
d) Priority Scheduling
a) Pipes
b) Threads
c) CPU Scheduling
d) Context Switching
a) Managing processes
b) Achieving synchronization
c) Memory allocation
d) File management
10. Which memory allocation technique supports the concept of virtual memory?
2|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
b) Paging
c) Segmentation
d) Swapping
12. Which threading model allows multiple threads to run concurrently on multiple processors?
a) Many-to-One Model
b) One-to-One Model
c) Many-to-Many Model
d) Two-level Model
a) Mutual exclusion
b) No preemption
d) Circular wait
3|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
17. What is the purpose of a file allocation table (FAT) in file systems?
18. Which disk scheduling algorithm aims to minimize the average seek time?
b) SCAN
c) C-LOOK
4|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
21. Which directory structure organizes files and folders in a hierarchical tree-like structure?
22. What is the purpose of the Master File Table (MFT) in the NTFS file system?
23. Which free space management technique maintains a list of free disk blocks?
a) Bit vector
b) Linked list
c) Counting method
d) Bitmap
24. In disk scheduling algorithms, which technique prioritizes requests that are closest to the
current position of the disk arm?
b) SCAN
5|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
c) C-LOOK
a) Type-1 runs directly on the hardware, while Type-2 runs on a host operating system
27. Which file access method allows reading and writing operations at any point in the file?
a) Sequential access
b) Direct access
c) Indexed access
d) Contiguous access
a) File contents
c) Directory structure
29. How does memory mapping of files enhance performance in an operating system?
6|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
b) By eliminating the need for file system access for I/O operations
30. Which term describes the situation where the operating system spends a significant amount
of time swapping pages instead of executing instructions?
a) Fragmentation
b) Paging
c) Thrashing
d) Contention
31. Which system call is used to create a new process in Unix-like operating systems?
a) exec()
b) fork()
c) wait()
d) pipe()
32. What is the purpose of the 'chmod' command in Unix-like operating systems?
c) Compress files
d) Copy files
d) Fragmentation issues
7|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
b) Segmentation allows logical division of programs into segments, while paging divides
programs into fixed-size pages
35. Which scheduling algorithm gives priority to the process with the highest CPU burst time?
b) Round Robin
d) Priority Scheduling
37. What is the purpose of the Translation Lookaside Buffer (TLB) in virtual memory systems?
8|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
a) Banker's Algorithm
b) Deadlock Ignorance
c) Deadlock Detection
d) Deadlock Prevention
41. Which synchronization mechanism allows multiple threads to access a shared resource
simultaneously?
a) Mutex
b) Semaphore
c) Critical section
d) Barrier
43. Which part of the address generated by the CPU is used as an index in the page table?
a) Offset
9|Page
Engr. Majida Hassan Ghouri
Software Engineering Department
b) Segment
c) Page number
d) Frame number
45. In a Unix-like file system, what is the purpose of the 'unlink' system call?
a) Deletes a file
c) Renames a file
d) Opens a file
46. Which disk scheduling algorithm optimizes disk arm movement by selecting requests in
the direction of disk head movement until there are no more requests in that direction?
a) SCAN
b) C-SCAN
c) LOOK
d) C-LOOK
47. What is the purpose of an Access Control List (ACL) in operating system security?
10 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
48. Which security mechanism restricts a process from accessing resources beyond its allocated
memory space?
a) Sandbox
b) Firewall
c) Encryption
d) Access Control
50. Which memory management technique allows the allocation of memory blocks that aren't
necessarily contiguous?
a) Segmentation
b) Paging
c) Swapping
51. Which security measure ensures that a system remains functional and operational despite
potential attacks or failures?
b) Redundancy
c) Firewalls
d) Security Patching
52. In the context of security, what does the principle of "least privilege" mean?
11 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
53. Which file system structure allows for the efficient and quick retrieval of files by using a
hash table?
a) Indexed allocation
b) Linked allocation
55. In a two-level directory structure, what does the first level directory contain?
a) File names
b) File metadata
c) File pointers
d) Subdirectories
56. Which disk scheduling algorithm allows requests to be processed based on their priority?
b) Priority-based Scheduling
12 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
57. What is the purpose of a TLB (Translation Lookaside Buffer) in a paging system?
58. What is the drawback of using large page sizes in paging systems?
59. Which system call is used to terminate a process in Unix-based operating systems?
a) exit()
b) fork()
c) wait()
d) exec()
60. In Unix-like file systems, what does the 'chmod' command do?
61. Which disk scheduling algorithm aims to minimize the movement of the disk arm?
a) SCAN
b) C-LOOK
c) LOOK
13 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
62. What is the purpose of a FAT (File Allocation Table) in file systems like FAT32?
a) Mutual exclusion
c) No preemption
d) Circular wait
c) To prevent deadlock
65. Which scheduling algorithm allows the process that has the highest priority to execute first?
a) Round Robin
c) Priority Scheduling
a) Enhanced security
14 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
c) Increased parallelism
67. What is the purpose of the page table in virtual memory systems?
70. Which disk scheduling algorithm scans in both directions, servicing all requests on its path?
a) SCAN
b) C-SCAN
c) LOOK
d) C-LOOK
71. Which security measure ensures that a user can access only the resources permitted for their
role?
15 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
b) User authentication
73. What is the purpose of the working set model in virtual memory management?
74. Which term describes the situation where a page is fetched from disk into memory but is
removed before being used?
a) Page fault
b) Page replacement
c) Page thrashing
d) Page aging
75. Which file allocation method uses pointers to link allocated disk blocks together?
a) Contiguous allocation
b) Linked allocation
c) Indexed allocation
16 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
76. What is the primary role of the disk scheduler in an operating system?
77. Which access control model is based on defining rules that specify what actions subjects
can take on objects?
78. What does the principle of "defense in depth" emphasize in operating system security?
79. Which scheduling algorithm selects the process with the highest priority for execution?
c) Priority Scheduling
b) To synchronize processes
17 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
d) To allocate memory
81. What is the purpose of the MMU (Memory Management Unit) in a computer system?
82. How does a TLB (Translation Lookaside Buffer) contribute to memory access in a paging
system?
83. Which disk scheduling algorithm offers better response time for I/O requests closer to the
disk arm's current position?
a) SCAN
b) C-SCAN
c) LOOK
d) C-LOOK
18 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
85. Which security principle ensures that one user's actions or access cannot negatively impact
other users or the system itself?
a) Least Privilege
c) Separation of Duties
d) Integrity
86. What does the term "authentication" refer to in the context of operating system security?
a) Mutual Exclusion
b) No Preemption
d) Circular Wait
89. What is a TLB (Translation Lookaside Buffer) used for in virtual memory systems?
19 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
90. In the context of paging, what does the term "page fault" signify?
91. Which file allocation method maintains a table for each file indicating the blocks it occupies
on the disk?
a) Contiguous allocation
b) Linked allocation
c) Indexed allocation
93. Which access control model uses labels to define the sensitivity and integrity of objects and
subjects?
94. What is the purpose of encryption in the context of operating system security?
20 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
95. Which scheduling algorithm provides better response time for time-sharing systems?
d) Priority Scheduling
98. Which term refers to a scenario where a required page is not found in the main memory?
a) Page fault
b) Page hit
c) Page replacement
d) Page allocation
21 | P a g e
Engr. Majida Hassan Ghouri
Software Engineering Department
//==========//==========//==========//==========//==========//
22 | P a g e
Engr. Majida Hassan Ghouri