

MCQOPTIONS
Saved Bookmarks
This section includes 1690 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
1501. |
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock ? I) 2-phase locking II) Timestamp ordering |
A. | I only |
B. | II only |
C. | Both I and II |
D. | Neither I nor II |
Answer» C. Both I and II | |
1502. |
The shrinking phase is a phase in which : |
A. | A transaction may obtain locks, but does not release any |
B. | A transaction may obtain locks, and releases a few or all of them |
C. | A transaction may release locks, but does not obtain any new locks |
D. | A transaction may release locks, and does obtain new locks |
Answer» D. A transaction may release locks, and does obtain new locks | |
1503. |
The growing phase is a phase in which : |
A. | A transaction may obtain locks, but does not release any |
B. | A transaction may obtain locks, and releases a few or all of them |
C. | A transaction may release locks, but does not obtain any new locks |
D. | A transaction may release locks, and does obtain new locks |
Answer» B. A transaction may obtain locks, and releases a few or all of them | |
1504. |
The two phase locking protocol consists of : |
A. | growing & shrinking phase |
B. | shrinking & creation phase |
C. | creation & growing phase |
D. | destruction & creation phase |
Answer» B. shrinking & creation phase | |
1505. |
A locking protocol is one that : |
A. | governs how locks are acquired |
B. | governs how locks are released |
C. | governs how locks are acquired and released |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
1506. |
Serializable schedules are ones where : |
A. | concurrent execution of transactions is equivalent to the transactions executed serially |
B. | the transactions can be carried out one after the other |
C. | a valid result occurs after execution transactions |
D. | none of the mentioned |
Answer» B. the transactions can be carried out one after the other | |
1507. |
Consider a transaction T1 that committed prior to checkpoint. The record appears in the log before the 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: |
A. | There is a need to perform an undo operation on T1 |
B. | There is a need to perform a redo operation on T1 |
C. | There is no need to perform an undo and redo operation on T1 |
D. | All of the mentioned |
Answer» D. All of the mentioned | |
1508. |
The system periodically performs checkpoints that consists of the following operation(s) : |
A. | Putting all the log records currently in main memory onto stable storage |
B. | putting all modified data residing in main memory onto stable storage |
C. | putting a log record onto stable storage |
D. | all of the mentioned |
Answer» E. | |
1509. |
The undo and redo operations must be _________ to guarantee correct behaviour, even if a failure occurs during recovery process. |
A. | idempotent |
B. | easy |
C. | protected |
D. | all of the mentioned |
Answer» B. easy | |
1510. |
An actual update is not allowed to a data item : |
A. | before the corresponding log record is written out to stable storage |
B. | after the corresponding log record is written out to stable storage |
C. | until the whole log record has been checked for inconsistencies |
D. | all of the mentioned |
Answer» B. after the corresponding log record is written out to stable storage | |
1511. |
In the write ahead logging a _____ is maintained. |
A. | a memory |
B. | a system |
C. | a disk |
D. | a log record |
Answer» E. | |
1512. |
Write ahead logging is a way : |
A. | to ensure atomicity |
B. | to keep data consistent |
C. | that records data on stable storage |
D. | all of the mentioned |
Answer» E. | |
1513. |
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. |
A. | safety |
B. | protection |
C. | roll – back |
D. | revert – back |
Answer» D. revert – back | |
1514. |
A terminated transaction that has completed its execution successfully is ____________ otherwise it is __________ |
A. | committed, destroyed |
B. | aborted, destroyed |
C. | committed, aborted |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
1515. |
A collection of instructions that performs a single logical function is called : |
A. | transaction |
B. | operation |
C. | function |
D. | all of the mentioned |
Answer» B. operation | |
1516. |
If no process is suspended, the signal operation : |
A. | puts the system into a deadlock state |
B. | suspends some default process’ execution |
C. | nothing happens |
D. | the output is unpredictable |
Answer» D. the output is unpredictable | |
1517. |
The process invoking the wait operation is : |
A. | suspended until another process invokes the signal operation |
B. | waiting for another process to complete before it can itself call the signal operation |
C. | stopped until the next process in the queue finishes execution |
D. | none of the mentioned |
Answer» B. waiting for another process to complete before it can itself call the signal operation | |
1518. |
The operations that can be invoked on a condition variable are : |
A. | wait & signal |
B. | hold & wait |
C. | signal & hold |
D. | continue & signal |
Answer» B. hold & wait | |
1519. |
The monitor construct ensures that : |
A. | only one process can be active at a time within the monitor |
B. | n number of processes can be active at a time within the monitor (n being greater than 1) |
C. | the queue has only one process in it at a time |
D. | all of the mentioned |
Answer» B. n number of processes can be active at a time within the monitor (n being greater than 1) | |
1520. |
A procedure defined within a ________ can access only those variables declared locally within the _______ and its formal parameters. |
A. | process, semaphore |
B. | process, monitor |
C. | semaphore, semaphore |
D. | monitor, monitor |
Answer» E. | |
1521. |
A monitor is characterized by : |
A. | a set of programmer defined operators |
B. | an identifier |
C. | the number of variables in it |
D. | all of the mentioned |
Answer» B. an identifier | |
1522. |
A monitor is a type of : |
A. | semaphore |
B. | low level synchronization construct |
C. | high level synchronization construct |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
1523. |
A deadlock free solution to the dining philosophers problem : |
A. | necessarily eliminates the possibility of starvation |
B. | does not necessarily eliminate the possibility of starvation |
C. | eliminates any possibility of any kind of problem further |
D. | None of the mentioned |
Answer» C. eliminates any possibility of any kind of problem further | |
1524. |
The dining – philosophers problem will occur in case of : |
A. | 5 philosophers and 5 chopsticks |
B. | 4 philosophers and 5 chopsticks |
C. | 3 philosophers and 5 chopsticks |
D. | 6 philosophers and 5 chopsticks |
Answer» B. 4 philosophers and 5 chopsticks | |
1525. |
To ensure difficulties do not arise in the readers – writers problem, _______ are given exclusive access to the shared object. |
A. | readers |
B. | writers |
C. | readers and writers |
D. | none of the mentioned |
Answer» C. readers and writers | |
1526. |
In the bounded buffer problem : |
A. | there is only one buffer |
B. | there are n buffers ( n being greater than one but finite) |
C. | there are infinite buffers |
D. | there are infinite buffers |
Answer» C. there are infinite buffers | |
1527. |
In the bounded buffer problem, there are the empty and full semaphores that : |
A. | count the number of empty and full buffers |
B. | count the number of empty and full memory spaces |
C. | count the number of empty and full queues |
D. | none of the mentioned |
Answer» B. count the number of empty and full memory spaces | |
1528. |
The bounded buffer problem is also known as : |
A. | Readers – Writers problem |
B. | Dining – Philosophers problem |
C. | Producer – Consumer problem |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
1529. |
Spinlocks are intended to provide __________ only. |
A. | Mutual Exclusion |
B. | Bounded Waiting |
C. | Aging |
D. | Progress |
Answer» C. Aging | |
1530. |
Semaphores are mostly used to implement : |
A. | System calls |
B. | IPC mechanisms |
C. | System protection |
D. | None of the mentioned |
Answer» C. System protection | |
1531. |
A binary semaphore is a semaphore with integer values : |
A. | 1 |
B. | -1 |
C. | 0 |
D. | 8 |
Answer» B. -1 | |
1532. |
At a particular time of computation the value of a counting semaphore is 7.Then 20 P operations and 15 V operations were completed on this semaphore.The resulting value of the semaphore is : (GATE 1987) |
A. | 42 |
B. | 2 |
C. | 7 |
D. | 12 |
Answer» C. 7 | |
1533. |
A mutex : |
A. | is a binary mutex |
B. | must be accessed from only one process |
C. | can be accessed from multiple processes |
D. | None of the mentioned |
Answer» C. can be accessed from multiple processes | |
1534. |
The two kinds of semaphores are : |
A. | mutex & counting |
B. | binary & counting |
C. | counting & decimal |
D. | decimal & binary |
Answer» C. counting & decimal | |
1535. |
A semaphore : |
A. | is a binary mutex |
B. | must be accessed from only one process |
C. | can be accessed from multiple processes |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
1536. |
What will happen if a non-recursive mutex is locked more than once ? |
A. | Starvation |
B. | Deadlock |
C. | Aging |
D. | Signaling |
Answer» C. Aging | |
1537. |
The code that changes the value of the semaphore is : |
A. | remainder section code |
B. | non – critical section code |
C. | critical section code |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
1538. |
If the semaphore value is negative : |
A. | its magnitude is the number of processes waiting on that semaphore |
B. | it is invalid |
C. | no operation can be further performed on it until the signal operation is performed on it |
D. | none of the mentioned |
Answer» B. it is invalid | |
1539. |
The signal operation of the semaphore basically works on the basic _______ system call. |
A. | continue() |
B. | wakeup() |
C. | getup() |
D. | start() |
Answer» C. getup() | |
1540. |
The main disadvantage of spinlocks is that : |
A. | they are not sufficient for many process |
B. | they require busy waiting |
C. | they are unreliable sometimes |
D. | they are too complex for programmers |
Answer» C. they are unreliable sometimes | |
1541. |
Spinlocks are : |
A. | CPU cycles wasting locks over critical sections of programs |
B. | Locks that avoid time wastage in context switches |
C. | Locks that work better on multiprocessor systems |
D. | All of the mentioned |
Answer» E. | |
1542. |
The two atomic operations permissible on semaphores are : |
A. | wait |
B. | stop |
C. | hold |
D. | none of the mentioned |
Answer» B. stop | |
1543. |
Semaphore is a/an _______ to solve the critical section problem. |
A. | hardware for a system |
B. | special program for a system |
C. | integer variable |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
1544. |
The TestAndSet instruction is executed : |
A. | after a particular process |
B. | periodically |
C. | atomically |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
1545. |
An un-interruptible unit is known as : |
A. | single |
B. | atomic |
C. | static |
D. | none of the mentioned |
Answer» C. static | |
1546. |
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» C. each process gets a unique number and the one with the highest number is served next | |
1547. |
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» C. Three | |
1548. |
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» B. when another process is in its critical section | |
1549. |
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» B. if a process is executing in its critical section, then other processes must be executing in their critical sections | |
1550. |
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» E. | |