Olete.in
Articles
Mock Tests
🧪 Operating system MCQ Quiz Hub
Operating Systems MCQs
Choose a topic to test your knowledge and improve your Operating system skills
1. Supervisor call :-
is a call made by the supervisor of the system
is a call with a control functions
are pixilated calls that are used to perform resource management functions
in a call made by someone working in root directory
2. Round-robin scheduling is essentially the preemptive version of :-
FIFO
Shortest job first
shortest remaining time first
longest time first
3. FIFO scheduling is :-
Preemptive scheduling
Non preemptive scheduling
deadline scheduling
fare share scheduling
4. In real time operating system,which of the following is the most suitable scheduling algorithms
Round-robin
FCFS
preemptive
Random
5. In round-robin CPU scheduling, as the time quantum is increased , the average turn around time
increase
decrease
remain constant
varies irreguraly
6. Preemptive scheduling is the strategy of temporarily suspending a running process
before the CPU time slice expires
to allow starving process to run
when it request I/O
None of the above
7. Which of the following statements is true? 1. Shortest remaining time first scheduling may cause starvation 2.Preemptive scheduling may cause starvation 3. Round robin is better than FCFS in terms
1 only
1 and 3
2 and 3
1,2 and 3
8. Function of operating system :-
resource utilization
resource allocation
file management
All of the above
9. In which state, a process goes to the CPU
New
Running
Waiting
Ready
10. If a process require a input/output then process goes to
ready state
running state
waiting state
none of the above
11. Which of the following statements are true?
value of binary semaphore is a subset of value of counting semaphore
counting semaphore is a subset of binary semaphore
binary semaphore contain only 0 or 1
1 and 3 are true
12. At particular time, the value of a counting semaphore is 10. It will become 7 after
3V operation
3P operation
13 P operation and 10 V operation
2 and 3
13. At particular time, the value of a counting semaphore is 4. It will become 7 after
3V operation
3P operation
13 P operation and 10 V operation
All of the above
14. At particular time, the value of a counting semaphore is 10. It will become 9 after
1P operation
1V operation
2P operation and 3V operation
1 and 3
15. At particular time of computation the value of a counting semaphore in 7. Then 20P operation and X V operation were performed on this semaphore. If the final value of semaphore is 5, X will be -
22
18
15
13
16. Value of Counting semaphore is -
0 or 1
7
Natural number
All of the above
17. A critical region
is a piece of code which only one process execute at a time
is a region prone to deadlock
is a piece of code which only a finite number of process execute
None of the above
18. A thread -
is a light weight process where the context switching is low
is a light weight process where the context switching is high
is used to speed up paging
None of the above
19. which one is a high level abstraction over semaphore ?
shared memory
message passing
monitor
mutual exclusion
20. A binary semaphore
has the value one or zero
is essential to binary computers
is used only for synchronization
is used only for mutual exclusion
21. A threads is a
Heavy weight process
multi process
inter-tread process
light weight process
22. Consider The following statements with respect to user clever threads and kernel supported threads: a. context switch is faster with kernel supported threads b. for user level threads, a system call
a,c,d
b,c
a,c
a,b
23. Necessary condition for deadlock
Mutual exclusion
Hold and wait
No preemption and circular wait
All of the above
24. Method of handling deadlock ?
deadlock avoidance
deadlock prevention
deadlock detection and prevention
All of the above
25. Banker algorithms is a example of
deadlock avoidance
deadlock prevention
deadlock detection and prevention
All of the above
26. Mutual exclusion is a problem occurs between
two disjoint process that do not interact
processes that share resources
processes that do not use the some resources
None of the above
27. A system has 3 processes sharing 4 resources. If a each process need maximum of 2 units, then
deadlock can never occur
deadlock may occur
deadlock has to occur
None of the above
28. With a single resource, deadlock occurs
if there are more than one processes competing for that resources
if there are only two processes competing for that resources
if there is a single processes competing for that resources
None of the above
29. Processes wait for infinite time in
Deadlock
starvation
Both of the above
None of the above
30. A state is safe if the system call allocate resources to each process(upto its maximum) in same order and still avoid deadlock. Then
deadlock state is safe
unsafe state may lead deadlock situation
deadlock state is subset of unsafe state
All of the above
31. Resources are allocated to a process on non-shareable basic in
Mutual exclusion
Hold and wait
No preemption
circular wait
32. The method of dealing with deadlock problem is
use a protocol to make sure that the system never enters to a deadlock stat
allow a system to enter a deadlock state and increases
ignore the problem and pretend that deadlocks never occur
All of the above
33. Which of the following is NOT a valid deadlock prevention scheme?
Release all resources before requesting a new resource
Number the resources uniquely and never request a lower numbered resource t
Never request a resource after releasing any resource
Request and all required resources be allocated before execution
34. Consider a virtual memory system with FIFO page replacement policy. For an arbitrary page access pattern, increasing the number of page frames in main memory will
Always decrease the number of page faults
Always increase the number of page faults
Some times increase the number of page faults
Never affect the number of page faults
35. Which of the following requires a device driver?
Disk
Cache
Main memory
Register
36. Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at times 0, 2 and 6, respectively. How many context switches are needed if the operating system implements a s
1
2
3
4
37. A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative.
11 bit
20 bit
13 bit
15 bit
38. In which one of the following page replacement policies, Belady’s anomaly may occur?
FIFO
Optimal
LRU
MRU
39. The essential content(s) in each entry of a page table is / are
Virtual page number
Page frame number
Both of the above
None of the above
40. Consider a disk system with 100 cylinders. The requests to access the cylinders occur in following sequence: 4, 34, 10, 7, 19, 73, 2, 15, 6, 20 Assuming that the head is currently at cylinder 50, wh
190ms
256ms
119ms
341ms
41. A process executes the code fork(); fork(); fork(); The total number of child processes created is
3
4
5
7
42. Total number of child processes created by following program is for(i=0;i<3;i++) fork();
3
0
7
6
43. Total number of child processes created by following program is for(i=0;i<4;i++) fork();
15
4
7
1
44. Total number of child processes created by following program is for(i=0;i<1;i++) fork();
7
2
0
1
45. Total number of child processes created by following program is x for(i=0;i<8;i++) fork(); then x-250= ?
5
0
6
1
46. A file system with 300 GByte uses a file descriptor with 8 direct block address. 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of
3KB
34KB
35KB
21KB
47. A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because
It reduces the memory access time to read or write a memory location
It helps to reduce the size of page table needed to implement the virtual a
It is required by the translation lookaside buffer
It helps to reduce the number of page faults in page replacement algorithm
48. Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size is 4KB, what is the approximate size of the page table?
2 MB
12 MB
16 MB
8 MB
49. A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 100 distinct pages in some order and then accesses the same 100 pages
196
197
123
234
50. Memory protection is of no use in
single user system
non-multiprogramming system
non-multitasking system
None of the above
51. In which of the following page replacement policies Belady anomaly may occur ?
FIFO
Optimal
LRU
MRO
52. A page fault occurs
when page is not in the memory
when the page is in the memory
when the page is in blocked state
when process is in new state
53. Virtual memory is commonly implemented by -
segmentation
fragmentation
demand paging
page replacement
54. The mechanism that bring a page into memory only when it is needed is called-
segmentation
fragmentation
demand paging
page replacement
55. Which of the following statement is false?
segmentation suffers from external fragmentation
paging suffer from internal fragmentation
segmented memory can be paged
virtual memory is used only in multi user system
56. The first fit best fit and worst fit algorithm can be used for-
contiguous memory allocation
linked allocation of memory
index allocation of memory
All of the above
57. The essential contents in each entry of a page table is -
Virtual page number
Page frame number
both virtual and page frame
access right information
58. A file is
an abstraction data type
logical storage unit
file is usually non volatile
All of the above
59. The simplest directly structure is -
single level directory
two level directory
tree structure directory
None of the above
60. Disadvantage of single level directory is -
the confusion of file names between different user
the confusion of file data
Both of the above
None of the above
61. Solution of name collision problem is
single level directory
two level directory
tree structure directory
None of the above
62. which structure prohibits sharing of file and directory
single level directory
two level directory
tree structure directory
None of the above
63. There are no cycle in which of the directory -
general graph directory
a cyclic graph directory
one level directory
two level directory
64. The lowest level of I/O control consists of -
device drivers
interrupt handles
Both of the above
None of the above
65. Access time is the highest in case of
floopy disk
cache
swapping device
magnetic disk
66. What is the shell ?
It is hardware component
It is command interpreter
It is a part in compiler
It is a tool in CPU scheduling
67. If the disk head located initially at 32, find the no of disk moves required with FCFS if the disk queue of I/O block requests are 98,37,14,124,65,67
310
324
315
343
68. Magnetic tape can serve as
input media
output media
Secondary storage media
All of the above
69. Supervisor state is
entered by program when they enter the processor
required to perform any I/O
only allowed to the operating system
never used
70. The operating systems manages
memory
processor
disk and I/O devices
All of the above
71. PCB is stands for -
program control block
process control block
process communication block
None of the above
72. Which of the following file name extension suggests that the file is backup copy of another file ?
TXT
COM
BAS
BAK
73. Which is not the state of the process ?
Blocked
Ready
Running
privileged
74. Which is the state of process ?
Blocked
Ready
Running
All of the above
75. The problem of thrashing is effected by scientifically by-
program structure
program size
primary storage size
None of the above
76. The number of processes completed per unit time is known as
output
throughput
efficiency
capacity
77. What is the memory from 1k to 640k called ?
Extended memory
normal memory
low memory
conventional memory
78. Process state is a part of
process control block
inode
file allocation table
None of the above
79. A program at time of execution is called ?
dynamic program
static program
binded program
a process
80. A thread is a ?
Heavy weight process
multi process
inter-thread process
light weight process
81. The state of process after it encounters an I/O instruction is
ready
blocked / waiting
idle
running
82. The major problem with priority scheduling is ?
definite blocking
starvation
low priority
None of the above
83. ______ OS pays more attention on the meeting of the the time limit
distributed
network
real time
online
84. A process said to be in ______ state if it was waiting for an event that will never occur
safe
unsafe
starvation
deadlock
85. The operating system of a computer serve as a software between the user and the
hardware
peripheral
memory
screen
86. The removal of process from active contention of CPU and reintroduce them into memory later is known as
interrupt
swapping
signal
thread
87. _______ allocates the largest hole available in the memory
Best fit
Worst fit
First fit
None of the above
88. A binary semaphore -
has the value one or zero
is essential to binary computers
is used only for synchronization
is used only for mutual exclusion
89. The hardware mechanism that enable a device to notify the CPU is called
polling
interrupt
system call
None of the above
90. The banker algorithms is used
to prevent deadlock in operating systems
to detect deadlock in operating systems
to rectify a deadlock state
None of the above
91. Which data structure are used for process scheduling ?
stack
tree
queue
heap
92. _______ is a high level abstraction over semaphore
shared memory
message passing
monitor
mutual exclusion
93. How many page faults occur for optimal page replacement following reference string, with four page frames ? 1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2
14
13
11
12
94. If you dont know which version of MS-DOS you are working with, which command will you use after booting your operating system ?
format command
FAT command
VER command
DISK command
95. How many page faults occur in LRU replacement following reference string, with four page frames ? 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1
8
7
6
9
96. Which scheduling policy is most suitable for a time sharing operating systems ?
Shortest job first
Round robin
First come first serve
Elevator
97. A processor needs software interrupts to
test the interrupt system of the processor
implement coroutine
obtain system services which need execution of privileged instruction
return from subroutine
98. Which of the following does not interrupt a running process
A device
timer
scheduler process
power failure
99. System calla are usually invoked by using
a software interrupt
polling
an indirect jump
a privileged instruction
Submit