

MCQOPTIONS
Saved Bookmarks
This section includes 70 Mcqs, each offering curated multiple-choice questions to sharpen your Operating System knowledge and support exam preparation. Choose a topic below to get started.
1. |
A consumable resource is one that can be |
A. | Access |
B. | Count |
C. | Created |
D. | Control |
Answer» D. Control | |
2. |
The dining philosophers problem can be seen as representative of |
A. | Users |
B. | Problems |
C. | Process |
D. | Application |
Answer» C. Process | |
3. |
A direct method of deadlock prevention is to prevent the occurrence of a circular |
A. | Data |
B. | Process |
C. | Movement |
D. | Wait |
Answer» E. | |
4. |
Deadlock prevention strategies are very |
A. | Conservative |
B. | Straight |
C. | Complex |
D. | Simple |
Answer» B. Straight | |
5. |
The simplest way of remove deadlock from the system is to ... |
A. | preempt a resource |
B. | rollback |
C. | kill one of the processes |
D. | lock one of the processes |
Answer» D. lock one of the processes | |
6. |
Linux includes all of the concurrency mechanism found in other |
A. | UNIX System |
B. | Linux System |
C. | Windows System |
D. | None |
Answer» B. Linux System | |
7. |
The common technique used for protecting a critical section in Linux is the |
A. | Lock Step |
B. | Program lock |
C. | Spinlock |
D. | None |
Answer» D. None | |
8. |
Which of the following approaches do not require knowledge of the system state? |
A. | deadlock detection. |
B. | deadlock prevention. |
C. | deadlock avoidance. |
D. | none of the above. |
Answer» E. | |
9. |
In one of the deadlock prevention methods, impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. This violates the _______________ condition of deadlock. |
A. | Mutual exclusion |
B. | Hold and Wait |
C. | Circular Wait |
D. | No Preemption |
Answer» D. No Preemption | |
10. |
Four necessary conditions for deadlock are non pre-emption, circular wait, hold and wait and |
A. | mutual exclusion |
B. | race condition |
C. | buffer overflow |
D. | None of above |
Answer» B. race condition | |
11. |
Which of the following statements is not valid for deadlock prevention scheme? |
A. | Number the resources uniquely and never request a lower numbered resource than the last one requested. |
B. | Request and all required resources be allocated before execution. |
C. | Release all resources before requesting a new resource. |
D. | Never request a resource after releasing any resource. |
Answer» E. | |
12. |
Deadlocks can be described by which graph? |
A. | Resource-Allocation Graph |
B. | Hamilton Graph |
C. | Complete Graph |
D. | None of the above. |
Answer» B. Hamilton Graph | |
13. |
Which of following is not a condition of Dead Lock ? |
A. | Mutual Exclusion |
B. | No Preemption |
C. | Hold and Wait |
D. | Data Transfer |
Answer» E. | |
14. |
What is the maximum number of processes that may enter simultaneously inside the critical section to avoid race condition ? |
A. | One |
B. | Two |
C. | Three |
D. | Four |
Answer» B. Two | |
15. |
From the following statements which one is not a valid deadlock prevention scheme? |
A. | Number the resources uniquely and never request a lower numbered resource than the last one |
B. | Release all the resources before requesting for a new resource |
C. | Request all the resources before execution |
D. | Never request a resource after releasing any resources |
Answer» E. | |
16. |
Banker's algorithm deals with |
A. | deadlock prevention |
B. | deadlock avoidance |
C. | deadlock recovery |
D. | mutual exclusion |
Answer» C. deadlock recovery | |
17. |
Once deadlock has been detected, some strategy is needed for |
A. | Control |
B. | Access |
C. | Recovery |
D. | None |
Answer» D. None | |
18. |
The state of a process after it encounters an I/O instruction is __________. |
A. | Ready |
B. | Blocked/Waiting |
C. | Idle |
D. | Running |
Answer» C. Idle | |
19. |
An operating system contains 3 user processes each requiring 2 units of resource R .The minimum number of units of R such that no deadlocks will ever arise is |
A. | 4 |
B. | 3 |
C. | 5 |
D. | 6 |
Answer» B. 3 | |
20. |
Deadlock involves reusable |
A. | Resources |
B. | Users |
C. | Time |
D. | Cost |
Answer» B. Users | |
21. |
The fastest form of inter process communication provided in UNIX is |
A. | Virtual Memory |
B. | Memory |
C. | Shared Memory |
D. | Main Memory |
Answer» D. Main Memory | |
22. |
A set of resources' allocations such that the system can allocate resources to each process in some order, and still avoid a deadlock is called ________. |
A. | Unsafe state |
B. | Safe state |
C. | Starvation |
D. | Greeedy allocation |
Answer» C. Starvation | |
23. |
Which of the following is not the approach to dealing with deadlock ? |
A. | Prevention |
B. | Avoidance |
C. | Detection |
D. | Deletion |
Answer» E. | |
24. |
Choose the correct option regarding deadlock. |
A. | If a resource-allocation graph contains no cycles, then no process in the system is deadlocked. |
B. | If the graph does contain a cycle, then a deadlock may exist. |
C. | Only a |
D. | Both a and b are correct. |
Answer» E. | |
25. |
What are the necessary conditions to occur the deadlock? |
A. | Sharable resource, Hold and wait, Preemption, Circular wait. |
B. | Mutual exclusion, Hold and wait, No preemption, Circular wait. |
C. | Mutual exclusion, Hold and wait, Preemption, Circular wait. |
D. | None of the above. |
Answer» C. Mutual exclusion, Hold and wait, Preemption, Circular wait. | |
26. |
A process is starved |
A. | if it is permanently waiting for a resource |
B. | if semaphores are not used |
C. | if a queue is not used for scheduling |
D. | if demand paging is not properly implemented |
Answer» B. if semaphores are not used | |
27. |
Which of the following statements is not true for the deadlock prevention and deadlock avoidance schemes? |
A. | Deadlock avoidance is less restrictive than deadlock prevention. |
B. | In deadlock prevention, the request for resources is always granted, if the resulting state is safe. |
C. | It is the priority to have the knowledge of resource requirements for deadlock avoidance. |
D. | In deadlock avoidance, the request for resources is always granted, if the resulting state is safe. |
Answer» E. | |
28. |
A process said to be in ___________ state if it was waiting for an event that will never occur. |
A. | Safe |
B. | Unsafe |
C. | Starvation |
D. | Dead lock |
Answer» E. | |
29. |
Consider a computer system with 6 tape drives and 'n' processes completing for them. What is the maximum value of 'n' for the system to be deadlock free? (Assuming that each processes may need 3 tape drives) |
A. | 3 |
B. | 2 |
C. | 4 |
D. | 7 |
Answer» C. 4 | |
30. |
The following conditions of policy must be present for a deadlock to be possible.i) Mutual exclusion ii) Hold and waitiii) No preemption iv) Circular wait |
A. | i, ii and iii only |
B. | ii, iii and iv only |
C. | i, iii and iv only |
D. | All i, ii, iii and iv |
Answer» E. | |
31. |
Let S and Q be two semaphores initialized to 1, where P0 and P1 processes the following statements wait(S);wait(Q); ---; signal(S);signal(Q) and wait(Q); wait(S);---;signal(Q);signal(S); respectively. The above situation depicts a _________ . |
A. | Semaphore |
B. | Deadlock |
C. | Signal |
D. | Interrupt |
Answer» C. Signal | |
32. |
A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.Process P0 P1 P2 Maximum needs (process-wise : P0 through P2 top to bottom) 10 4 9 Currently allocated (process-wise)522Which of the following sequence is a safe sequence ? |
A. | P0, P1, P2 |
B. | P1, P2, P0 |
C. | P2, P0, P1 |
D. | P1, P0, P2 |
Answer» E. | |
33. |
In a graph the number of vertices of odd degree is always |
A. | even |
B. | odd |
C. | sometimes odd sometimes even |
D. | None of the above. |
Answer» B. odd | |
34. |
The circular wait condition can be prevented by defining a linear ordering of |
A. | Program Type |
B. | User Type |
C. | Resource Type |
D. | Process Type |
Answer» D. Process Type | |
35. |
In an undirected graph, the sum of degrees of all vertices is |
A. | Odd |
B. | Even |
C. | Even and odd both. |
D. | None of the above. |
Answer» C. Even and odd both. | |
36. |
To avoid race condition, the maximum number of processes that may be simultaneously inside the critical section is |
A. | zero |
B. | one |
C. | two |
D. | more than two |
Answer» C. two | |
37. |
No preemption means that a resource is released as |
A. | Terminated |
B. | Non Voluntarily |
C. | Voluntarily |
D. | None |
Answer» D. None | |
38. |
To solve the dining philosophers, the monitor consist of two |
A. | Users |
B. | Programs |
C. | Applications |
D. | Procedures |
Answer» E. | |
39. |
In the multiprogramming system, a set of processes is deadlock if each process in the set is waiting for an event to occur that can be initialized only by another process in the set. Which of the following is not one of the four conditions that are necessary for deadlock to occur? |
A. | nonpreemption |
B. | process suspension |
C. | partial assignment of resources |
D. | circular wait |
Answer» C. partial assignment of resources | |
40. |
UNIX provides a variety of mechanisms for inter processor |
A. | Information |
B. | Communication |
C. | Process |
D. | Resource |
Answer» C. Process | |
41. |
All deadlocks involve conflicting needs for |
A. | Resources |
B. | Users |
C. | Computers |
D. | Programs |
Answer» B. Users | |
42. |
Semophores are used to solve the problem of |
A. | race condition |
B. | process synchronization |
C. | mutual exclusion |
D. | belady problem |
Answer» D. belady problem | |
43. |
When two or more processes attempt to access the same resource a _________ occurs. |
A. | Critical section |
B. | Fight |
C. | Communication problem |
D. | Race condition |
Answer» E. | |
44. |
Match the following.i) Mutual exclusion a) A process may hold allocated resources while waiting assignment.ii) Hold and wait b) No resource can be forcibly removed from a process holding it.iii) No preemption c) Only one process may use a resource at a time. |
A. | i-a, ii-b, iii-c |
B. | i-a, ii-c, iii-b |
C. | i-b, ii-c, iii-a |
D. | i-c, ii-a, iii-b |
Answer» E. | |
45. |
Before proceeding with its execution, each process must acquire all the resources it needs is called |
A. | hold and wait |
B. | No pre-emption |
C. | circular wait |
D. | starvation |
Answer» B. No pre-emption | |
46. |
The conditions for deadlock, only one process may use a resource at a |
A. | Program |
B. | Time |
C. | Process |
D. | None |
Answer» C. Process | |
47. |
A signal is a software mechanism that informs a |
A. | Processor |
B. | User |
C. | Program |
D. | Process |
Answer» E. | |
48. |
An unsafe state is of course a state that is not |
A. | Require |
B. | Safe |
C. | Run |
D. | Control |
Answer» C. Run | |
49. |
What is known as a race condition? |
A. | When a deadlock occurs |
B. | When it has a starvation and not a deadlock |
C. | When the result of a computation depends on the speed of the processes involved |
D. | When it cannot have a subroutine call. |
Answer» D. When it cannot have a subroutine call. | |
50. |
______ is a high level abstraction over Semaphore. |
A. | Shared memory |
B. | Message passing |
C. | Monitor |
D. | Mutual exclusion |
Answer» D. Mutual exclusion | |