Operating System MCQs
1K+ questions with answers
The program follows to use a shared binary semaphore T. Process A int Y; A1: Y = X*2; A2: X = Y; signal(T); Process B int Z; B1: wait(T); B2: Z = X+1; X = Z;
Semaphores are mostly used to implement ____________
Spinlocks are intended to provide __________ only.
The bounded buffer problem is also known as ____________
In the bounded buffer problem, there are the empty and full semaphores that ____________
In the bounded buffer problem ____________
To ensure difficulties do not arise in the readers – writers problem _______ are given exclusive access to the shared object.
The dining – philosophers problem will occur in case of ____________
A deadlock free solution to the dining philosophers problem ____________
Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned. (GATE 2010) Method used by P1 : while(S1==S2); Critical section S1 = S2; Method used by P2 : while(S1!=S2); Critical section S2 = not(S1);
A monitor is a type of ____________
A monitor is characterized by ____________
A procedure defined within a ________ can access only those variables declared locally within the _______ and its formal parameters.
The monitor construct ensures that ____________
What are the operations that can be invoked on a condition variable?
Which is the process of invoking the wait operation?
A collection of instructions that performs a single logical function is called ____________
A terminated transaction that has completed its execution successfully is ____________ otherwise it is __________
The state of the data accessed by an aborted transaction must be restored to what it was just before the transaction started executing. This restoration is known as ________ of transaction.
Write ahead logging is a way ____________
In the write ahead logging a _____________ is maintained.
An actual update is not allowed to a data item ____________
The system periodically performs checkpoints that consists of the following operation(s) ____________
Consider a transaction T1 that committed prior to checkpoint. The <T1 commits> record appears in the log before the <checkpoint> record. Any modifications made by T1 must have been written to the stable storage either with the checkpoint or prior to it. Thus at recovery time ____________
Serializable schedules are ones where ____________
A locking protocol is one that ____________
The two phase locking protocol consists of ____________
The shrinking phase is a phase in which?
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock? I) 2-phase locking II) Timestamp ordering
What is a reusable resource?
Which of the following condition is required for a deadlock to be possible?
A system is in the safe state if ____________
The circular wait condition can be prevented by ____________
Which one of the following is the deadlock avoidance algorithm?
What is the drawback of banker’s algorithm?
A problem encountered in multitasking when a process is perpetually denied necessary resources is called ____________
Which one of the following is a visual ( mathematical ) way to determine the deadlock occurrence?
To avoid deadlock ____________
The number of resources requested by a process ____________
The request and release of resources are ___________
What are Multithreaded programs?
For a deadlock to arise, which of the following conditions must hold simultaneously?
For Mutual exclusion to prevail in the system ____________
For a Hold and wait condition to prevail ____________
For non sharable resources like a printer, mutual exclusion ____________
For sharable resources, mutual exclusion ____________
To ensure that the hold and wait condition never occurs in the system, it must be ensured that ____________
The disadvantage of a process being allocated all its resources before beginning its execution is ____________
To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it ____________
One way to ensure that the circular wait condition never holds is to ____________