Operating System MCQ Number 01274

Operating System MCQ Set 1

1. Concurrent access to shared data may result in :
a) data consistency
b) data insecurity
c) data inconsistency
d) none of the mentioned

Answer

Answer: c [Reason:] None.

2. A situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called :
a) data consistency
b) race condition
c) aging
d) starvation

Answer

Answer: b [Reason:] None.

3. The segment of code in which the process may change common variables, update tables, write into files is known as :
a) program
b) critical section
c) non – critical section
d) synchronizing

Answer

Answer: b [Reason:] None.

4. The following three conditions must be satisfied to solve the critical section problem :
a) Mutual Exclusion
b) Progress
c) Bounded Waiting
d) All of the mentioned

Answer

Answer: d [Reason:] None.

5. Mutual exclusion implies that :
a) if a process is executing in its critical section, then no other process must be executing in their critical sections
b) if a process is executing in its critical section, then other processes must be executing in their critical sections
c) if a process is executing in its critical section, then all the resources of the system must be blocked until it finishes execution
d) none of the mentioned

Answer

Answer: a [Reason:] None.

6. Bounded waiting implies that there exists a bound on the number of times a process is allowed to enter its critical section :
a) after a process has made a request to enter its critical section and before the request is granted
b) when another process is in its critical section
c) before a process has made a request to enter its critical section
d) none of the mentioned

Answer

Answer: a [Reason:] None.

7. A minimum of _____ variable(s) is/are required to be shared between processes to solve the critical section problem.
a) one
b) two
c) three
d) four

Answer

Answer: b [Reason:] None.

8. In the bakery algorithm to solve the critical section problem :
a) each process is put into a queue and picked up in an ordered manner
b) each process receives a number (may or may not be unique) and the one with the lowest number is served next
c) each process gets a unique number and the one with the highest number is served next
d) each process gets a unique number and the one with the lowest number is served next

Answer

Answer: b [Reason:] None.

Operating System MCQ Set 2

1. Each request requires that the system consider the _______ to decide whether the current request can be satisfied or must wait to avoid a future possible deadlock.
a) resources currently available
b) processes that have previously been in the system
c) resources currently allocated to each process
d) future requests and releases of each process

Answer

Answer: a [Reason:] None.

2. Given a priori information about the ________ number of resources of each type that maybe requested for each process, it is possible to construct an algorithm that ensures that the system will never enter a deadlock state.
a) minimum
b) average
c) maximum
d) approximate

Answer

Answer: c [Reason:] None.

3. A deadlock avoidance algorithm dynamically examines the ____ to ensure that a circular wait condition can never exist.
a) resource allocation state
b) system storage state
c) operating system
d) resources

Answer

Answer: a [Reason:] Resource allocation states are used to maintain the availability of the already and current available resources.

4. A state is safe, if :
a) the system does not crash due to deadlock occurrence
b) the system can allocate resources to each process in some order and still avoid a deadlock
c) the state keeps the system protected and safe
d) all of the mentioned

Answer

Answer: b [Reason:] None.

5. A system is in a safe state only if there exists a :
a) safe allocation
b) safe resource
c) safe sequence
d) all of the mentioned

Answer

Answer: c [Reason:] None.

6. All unsafe states are :
a) deadlocks
b) not deadlocks
c) fatal
d) none of the mentioned

Answer

Answer: b [Reason:] None.

7. 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)
5
2
2

Which 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

Answer: d [Reason:] None.

8. If no cycle exists in the resource allocation graph :
a) then the system will not be in a safe state
b) then the system will be in a safe state
c) all of the mentioned
d) none of the mentioned

Answer

Answer: b [Reason:] None.

9. The resource allocation graph is not applicable to a resource allocation system :
a) with multiple instances of each resource type
b) with a single instance of each resource type
c) single & multiple instance of each resource type
d) none of the mentioned

Answer

Answer: a [Reason:] None.

10. The Banker’s algorithm is _______ than the resource allocation graph algorithm.
a) less efficient
b) more efficient
c) equal
d) none of the mentioned

Answer

Answer: a [Reason:] None.

11. The data structures available in the Banker’s algorithm are :
a) Available
b) Need
c) Allocation
d) All of the mentioned

Answer

Answer: d [Reason:] None.

12. The content of the matrix Need is :
a) Allocation – Available
b) Max – Available
c) Max – Allocation
d) Allocation – Max

Answer

Answer: c [Reason:] None.

13. A system with 5 processes P0 through P4 and three resource types A, B, C has A with 10 instances, B with 5 instances, and C with 7 instances. At time t0, the following snapshot has been taken :

Process
P0               
P1               
P2           
P3           
P4       
 
Allocation (process-wise : P0 through P4 top TO bottom) 
A   B   C
0   1   0
2   0   0
3   0   2
2   1   1
0   0   2
 
MAX (process-wise : P0 through P4 top TO bottom)
A   B   C
7   5   3
3   2   2
9   0   2
2   2   2
4   3   3
 
Available
A   B   C
3   3   2

The sequence <P1, P3, P4, P2, P0> leads the system to :
a) an unsafe state
b) a safe state
c) a protected state
d) a deadlock

Answer

Answer: b [Reason:] None.

Operating System MCQ Set 3

1. The wait-for graph is a deadlock detection algorithm that is applicable when :
a) all resources have a single instance
b) all resources have multiple instances
c) all resources have a single 7 multiple instance
d) all of the mentioned

Answer

Answer: a [Reason:] None.

2. An edge from process Pi to Pj in a wait for graph indicates that :
a) Pi is waiting for Pj to release a resource that Pi needs
b) Pj is waiting for Pi to release a resource that Pj needs
c) Pi is waiting for Pj to leave the system
d) Pj is waiting for Pi to leave the system

Answer

Answer: a [Reason:] None.

3. If the wait for graph contains a cycle :
a) then a deadlock does not exist
b) then a deadlock exists
c) then the system is in a safe state
d) either deadlock exists or system is in a safe state

Answer

Answer: b [Reason:] None.

4. If deadlocks occur frequently, the detection algorithm must be invoked ________
a) rarely
b) frequently
c) rarely & frequently
c) none of the mentioned

Answer

Answer: b [Reason:] None.

5. The disadvantage of invoking the detection algorithm for every request is :
a) overhead of the detection algorithm due to consumption of memory
b) excessive time consumed in the request to be allocated memory
c) considerable overhead in computation time
d) all of the mentioned

Answer

Answer: c [Reason:] None.

6. A deadlock eventually cripples system throughput and will cause the CPU utilization to ______
a) increase
b) drop
c) stay still
d) none of the mentioned

Answer

Answer: b [Reason:] None.

7. Every time a request for allocation cannot be granted immediately, the detection algorithm is invoked. This will help identify :
a) the set of processes that have been deadlocked
b) the set of processes in the deadlock queue
c) the specific process that caused the deadlock
d) all of the mentioned

Answer

Answer: a [Reason:] None.

8. A computer system has 6 tape drives, with ‘n’ processes competing for them. Each process may need 3 tape drives. The maximum value of ‘n’ for which the system is guaranteed to be deadlock free is :
a) 2
b) 3
c) 4
d) 1

Answer

Answer: a [Reason:] None.

9. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock :
a) can never occur
b) may occur
c) has to occur
d) none of the mentioned

Answer

Answer: a [Reason:] None.

10. ‘m’ processes share ‘n’ resources of the same type. The maximum need of each process doesn’t exceed ‘n’ and the sum of all their maximum needs is always less than m+n. In this setup, deadlock :
a) can never occur
b) may occur
c) has to occur
d) none of the mentioned

Answer

Answer: a [Reason:] None.

Operating System MCQ Set 4

1. The number of resources requested by a process :
a) must always be less than the total number of resources available in the system
b) must always be equal to the total number of resources available in the system
c) must not exceed the total number of resources available in the system
d) must exceed the total number of resources available in the system

Answer

Answer: c [Reason:] None.

2. The request and release of resources are _____
a) command line statements
b) interrupts
c) system calls
d) special programs

Answer

Answer: c [Reason:] None.

3. Multithreaded programs are :
a) lesser prone to deadlocks
b) more prone to deadlocks
c) not at all prone to deadlocks
d) none of the mentioned

Answer

Answer: b [Reason:] Multiple threads can compete for shared resources.

4. For a deadlock to arise, which of the following conditions must hold simultaneously ?
a) Mutual exclusion
b) No preemption
c) Hold and wait
d) All of the mentioned

Answer

Answer: d [Reason:] None.

5. For Mutual exclusion to prevail in the system :
a) at least one resource must be held in a non sharable mode
b) the processor must be a uniprocessor rather than a multiprocessor
c) there must be at least one resource in a sharable mode
d) all of the mentioned

Answer

Answer: a [Reason:] If another process requests that resource (non – shareable resource), the requesting process must be delayed until the resource has been released.

6. For a Hold and wait condition to prevail :
a) A process must be not be holding a resource, but waiting for one to be freed, and then request to acquire it
b) A process must be holding at least one resource and waiting to acquire additional resources that are being held by other processes
c) A process must hold at least one resource and not be waiting to acquire additional resources
d) None of the mentioned

Answer

Answer: b [Reason:] None.

7. Deadlock prevention is a set of methods :
a) to ensure that at least one of the necessary conditions cannot hold
b) to ensure that all of the necessary conditions do not hold
c) to decide if the requested resources for a process have to be given or not
d) to recover from a deadlock

Answer

Answer: a [Reason:] None.

8. For non sharable resources like a printer, mutual exclusion :
a) must exist
b) must not exist
c) may exist
d) none of the mentioned

Answer

Answer: a [Reason:] A printer cannot be simultaneously shared by several processes.

9. For sharable resources, mutual exclusion :
a) is required
b) is not required
c) maybe or maynot be required
c) none of the mentioned

Answer

Answer: b [Reason:] They do not require mutually exclusive access, and hence cannot be involved in a deadlock.

10. To ensure that the hold and wait condition never occurs in the system, it must be ensured that :
a) whenever a resource is requested by a process, it is not holding any other resources
b) each process must request and be allocated all its resources before it begins its execution
c) a process can request resources only when it has none
d) all of the mentioned

Answer

Answer: d [Reason:] c – A process may request some resources and use them. Before it can can request any additional resources, however it must release all the resources that it is currently allocated.

11. The disadvantage of a process being allocated all its resources before beginning its execution is :
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of the mentioned

Answer

Answer: b [Reason:] None.

12. To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it :
a) then the process waits for the resources be allocated to it
b) the process keeps sending requests until the resource is allocated to it
c) the process resumes execution without the resource being allocated to it
d) then all resources currently being held are preempted

Answer

Answer: d [Reason:] None.

13. One way to ensure that the circular wait condition never holds is to :
a) impose a total ordering of all resource types and to determine whether one precedes another in the ordering
b) to never let a process acquire resources that are held by other processes
c) to let a process wait for only one resource at a time
d) all of the mentioned

Answer

Answer: a [Reason:] None.

Operating System MCQ Set 5

1. A deadlock can be broken by :
a) abort one or more processes to break the circular wait
b) abort all the process in the system
c) preempt all resources from all processes
d) none of the mentioned

Answer

Answer: a [Reason:] None.

2. The two ways of aborting processes and eliminating deadlocks are :
a) Abort all deadlocked processes
b) Abort all processes
c) Abort one process at a time until the deadlock cycle is eliminated
d) All of the mentioned

Answer

Answer: c [Reason:] None.

3. Those processes should be aborted on occurrence of a deadlock, the termination of which :
a) is more time consuming
b) incurs minimum cost
c) safety is not hampered
d) all of the mentioned

Answer

Answer: b [Reason:] None.

4. The process to be aborted is chosen on the basis of the following factors :
a) priority of the process
b) process is interactive or batch
c) how long the process has computed
d) all of the mentioned

Answer

Answer: d [Reason:] None.

5. Cost factors of process termination include :
a) Number of resources the deadlock process is not holding
b) CPU utilization at the time of deadlock
c) Amount of time a deadlocked process has thus far consumed during its execution
d) All of the mentioned

Answer

Answer: c [Reason:] None.

6. If we preempt a resource from a process, the process cannot continue with its normal execution and it must be :
a) aborted
b) rolled back
c) terminated
d) queued

Answer

Answer: b [Reason:] None.

7. To _______ to a safe state, the system needs to keep more information about the states of processes.
a) abort the process
b) roll back the process
c) queue the process
d) none of the mentioned

Answer

Answer: b [Reason:] None.

8. If the resources are always preempted from the same process, ____ can occur.
a) deadlock
b) system crash
c) aging
d) starvation

Answer

Answer: d [Reason:] None.

9. The solution to starvation is :
a) the number of rollbacks must be included in the cost factor
b) the number of resources must be included in resource preemption
c) resource preemption be done instead
d) all of the mentioned

Answer

Answer: a [Reason:] None.

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.