Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

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 locksThe question was asked during an online interview.The origin of the question is Atomic Transactions in chapter Process Synchronization of Operating System

Answer»

Right OPTION is (c) A TRANSACTION may release locks, but does not OBTAIN any new locks

The BEST explanation: None.

2.

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 locksI have been asked this question during an online interview.Origin of the question is Atomic Transactions topic in division Process Synchronization of Operating System

Answer»

Correct answer is (a) A transaction MAY OBTAIN locks, but does not RELEASE any

The explanation: NONE.

3.

The two phase locking protocol consists of ____________(a) growing & shrinking phase(b) shrinking & creation phase(c) creation & growing phase(d) destruction & creation phaseThe question was posed to me during an interview for a job.Asked question is from Atomic Transactions topic in portion Process Synchronization of Operating System

Answer»

Correct CHOICE is (a) GROWING & shrinking phase

The explanation: NONE.

4.

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 mentionedI have been asked this question in semester exam.Question is taken from Atomic Transactions topic in portion Process Synchronization of Operating System

Answer» RIGHT option is (c) GOVERNS how LOCKS are ACQUIRED and released

To explain: None.
5.

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 mentionedThe question was posed to me in class test.The query is from Atomic Transactions topic in section Process Synchronization of Operating System

Answer» RIGHT OPTION is (a) CONCURRENT execution of TRANSACTIONS is equivalent to the transactions executed serially

For explanation: None.
6.

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 mentionedI had been asked this question during a job interview.This question is from Atomic Transactions topic in division Process Synchronization of Operating System

Answer»

Right option is (c) There is no need to perform an undo and REDO operation on T1

To EXPLAIN: NONE.

7.

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 recordonto stable storage(d) all of the mentionedI have been asked this question in a national level competition.I need to ask this question from Atomic Transactions in section Process Synchronization of Operating System

Answer»

The CORRECT ANSWER is (d) all of the mentioned

To EXPLAIN: NONE.

8.

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 mentionedThe question was asked in an interview.This interesting question is from Atomic Transactions topic in chapter Process Synchronization of Operating System

Answer»

The CORRECT option is (a) IDEMPOTENT

To explain: Idempotent – Multiple executions of an OPERATION have the same result as does one EXECUTION.

9.

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 mentionedThe question was asked during a job interview.Asked question is from Atomic Transactions topic in division Process Synchronization of Operating System

Answer»

Correct choice is (a) before the CORRESPONDING log RECORD is written out to STABLE storage

The EXPLANATION: None.

10.

In the write ahead logging a _____________ is maintained.(a) a memory(b) a system(c) a disk(d) a log recordThe question was asked at a job interview.Asked question is from Atomic Transactions topic in division Process Synchronization of Operating System

Answer»

The CORRECT OPTION is (d) a LOG record

Explanation: NONE.

11.

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 mentionedThis question was posed to me in quiz.I would like to ask this question from Atomic Transactions topic in section Process Synchronization of Operating System

Answer»

The CORRECT OPTION is (d) all of the mentioned

The BEST EXPLANATION: NONE.

12.

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 – backThe question was asked in an online quiz.My question is from Atomic Transactions in chapter Process Synchronization of Operating System

Answer» CORRECT ANSWER is (C) ROLL – back

Explanation: NONE.
13.

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 mentionedI got this question during an interview.The origin of the question is Atomic Transactions in division Process Synchronization of Operating System

Answer» CORRECT ANSWER is (c) committed, aborted

To explain: NONE.
14.

A collection of instructions that performs a single logical function is called ____________(a) transaction(b) operation(c) function(d) all of the mentionedThe question was posed to me during an online interview.I need to ask this question from Atomic Transactions in division Process Synchronization of Operating System

Answer» CORRECT ANSWER is (a) transaction

Explanation: NONE.
15.

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 unpredictableI had been asked this question by my college professor while I was bunking the class.I want to ask this question from Monitors topic in chapter Process Synchronization of Operating System

Answer»

The correct OPTION is (C) NOTHING happens

Best explanation: None.

16.

Which is the process of invoking the wait operation?(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 mentionedI had been asked this question in homework.My doubt stems from Monitors topic in chapter Process Synchronization of Operating System

Answer»

Right answer is (a) suspended until another PROCESS INVOKES the SIGNAL operation

The best explanation: NONE.

17.

What are the operations that can be invoked on a condition variable?(a) wait & signal(b) hold & wait(c) signal & hold(d) continue & signalThe question was asked in an interview.My question is taken from Monitors topic in portion Process Synchronization of Operating System

Answer» RIGHT ANSWER is (a) WAIT & signal

Explanation: NONE.
18.

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 mentionedThe question was posed to me in a job interview.This interesting question is from Monitors in section Process Synchronization of Operating System

Answer»

The CORRECT CHOICE is (a) only one process can be active at a time WITHIN the monitor

The best I can EXPLAIN: None.

19.

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, monitorI had been asked this question at a job interview.My question is from Monitors topic in chapter Process Synchronization of Operating System

Answer» CORRECT OPTION is (d) MONITOR, monitor

Best EXPLANATION: NONE.
20.

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 mentionedThe question was asked during an interview.Enquiry is from Monitors in portion Process Synchronization of Operating System

Answer»

The CORRECT answer is (a) a SET of PROGRAMMER DEFINED operators

The EXPLANATION is: None.

21.

A monitor is a type of ____________(a) semaphore(b) low level synchronization construct(c) high level synchronization construct(d) none of the mentionedThis question was posed to me during a job interview.My query is from Monitors in division Process Synchronization of Operating System

Answer»

Right OPTION is (C) high level synchronization construct

For EXPLANATION: NONE.

22.

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 mentionedThe question was asked in quiz.The above asked question is from Classic Synchronization Problems in portion Process Synchronization of Operating System

Answer» RIGHT choice is (B) does not NECESSARILY ELIMINATE the possibility of starvation

Best EXPLANATION: None.
23.

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 chopsticksThe question was posed to me by my college director while I was bunking the class.My enquiry is from Classic Synchronization Problems topic in portion Process Synchronization of Operating System

Answer»

The CORRECT choice is (a) 5 PHILOSOPHERS and 5 chopsticks

Easy explanation - NONE.

24.

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 mentionedThis question was posed to me in class test.I want to ask this question from Classic Synchronization Problems topic in chapter Process Synchronization of Operating System

Answer»

The CORRECT OPTION is (b) writers

The BEST explanation: None.

25.

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) the buffer size is boundedThe question was asked during an online interview.This interesting question is from Classic Synchronization Problems in division Process Synchronization of Operating System

Answer»

Right CHOICE is (B) there are n buffers ( n being greater than ONE but finite)

For explanation: NONE.

26.

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 mentionedI have been asked this question in my homework.This interesting question is from Classic Synchronization Problems in chapter Process Synchronization of Operating System

Answer»

Right option is (a) count the NUMBER of EMPTY and full buffers

Easy EXPLANATION - None.

27.

The bounded buffer problem is also known as ____________(a) Readers – Writers problem(b) Dining – Philosophers problem(c) Producer – Consumer problem(d) None of the mentionedI have been asked this question in semester exam.This intriguing question comes from Classic Synchronization Problems in portion Process Synchronization of Operating System

Answer» RIGHT ANSWER is (c) Producer – CONSUMER problem

The explanation is: NONE.
28.

Spinlocks are intended to provide __________ only.(a) Mutual Exclusion(b) Bounded Waiting(c) Aging(d) ProgressI have been asked this question during an interview for a job.I'm obligated to ask this question of Semaphores topic in chapter Process Synchronization of Operating System

Answer»

The CORRECT option is (b) BOUNDED Waiting

The explanation: None.

29.

Semaphores are mostly used to implement ____________(a) System calls(b) IPC mechanisms(c) System protection(d) None of the mentionedI have been asked this question during an internship interview.I want to ask this question from Semaphores topic in section Process Synchronization of Operating System

Answer» RIGHT option is (b) IPC mechanisms

The EXPLANATION: NONE.
30.

A binary semaphore is a semaphore with integer values ____________(a) 1(b) -1(c) 0.8(d) 0.5This question was posed to me during a job interview.My question is taken from Semaphores in section Process Synchronization of Operating System

Answer» RIGHT OPTION is (a) 1

Explanation: NONE.
31.

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) 12The question was posed to me at a job interview.The above asked question is from Semaphores topic in division Process Synchronization of Operating System

Answer» RIGHT option is (b) 2

To explain: P represents Wait and V represents Signal. P operation will decrease the VALUE by 1 every TIME and V operation will increase the value by 1 every time.
32.

What is 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 mentionedI had been asked this question in unit test.My question is from Semaphores topic in section Process Synchronization of Operating System

Answer» RIGHT choice is (B) MUST be accessed from only one process

The EXPLANATION is: None.
33.

What are the two kinds of semaphores?(a) mutex & counting(b) binary & counting(c) counting & decimal(d) decimal & binaryI had been asked this question in an interview for job.Enquiry is from Semaphores in section Process Synchronization of Operating System

Answer»

The CORRECT CHOICE is (B) BINARY & counting

Best EXPLANATION: None.

34.

What is 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 mentionedI have been asked this question in a national level competition.My enquiry is from Semaphores topic in division Process Synchronization of Operating System

Answer»

Right OPTION is (c) can be ACCESSED from MULTIPLE processes

The best EXPLANATION: None.

35.

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 mentionedI got this question by my school teacher while I was bunking the class.I need to ask this question from Semaphores topic in chapter Process Synchronization of Operating System

Answer»

Right OPTION is (C) critical section code

The explanation is: NONE.

36.

What will happen if a non-recursive mutex is locked more than once?(a) Starvation(b) Deadlock(c) Aging(d) SignalingI have been asked this question during an internship interview.I'd like to ask this question from Semaphores in portion Process Synchronization of Operating System

Answer»

The CORRECT choice is (b) Deadlock

The EXPLANATION: If a thread which had already LOCKED a mutex, tries to lock the mutex again, it will ENTER into the waiting list of that mutex, which results in a deadlock. It is because no other thread can unlock the mutex.

37.

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 mentionedI got this question by my college professor while I was bunking the class.The above asked question is from Semaphores in portion Process Synchronization of Operating System

Answer» RIGHT choice is (a) its MAGNITUDE is the NUMBER of PROCESSES WAITING on that semaphore

To explain: None.
38.

The signal operation of the semaphore basically works on the basic _______ system call.(a) continue()(b) wakeup()(c) getup()(d) start()The question was asked in exam.I need to ask this question from Semaphores in section Process Synchronization of Operating System

Answer»

The CORRECT CHOICE is (B) wakeup()

The BEST I can EXPLAIN: None.

39.

The wait operation of the semaphore basically works on the basic _______ system call.(a) stop()(b) block()(c) hold()(d) wait()This question was posed to me during an online interview.Origin of the question is Semaphores topic in chapter Process Synchronization of Operating System

Answer» RIGHT option is (B) BLOCK()

To explain I would say: NONE.
40.

What is the main disadvantage of spinlocks?(a) they are not sufficient for many process(b) they require busy waiting(c) they are unreliable sometimes(d) they are too complex for programmersThe question was posed to me during an online exam.I would like to ask this question from Semaphores topic in chapter Process Synchronization of Operating System

Answer» RIGHT OPTION is (b) they REQUIRE busy waiting

The EXPLANATION: NONE.
41.

What are the two atomic operations permissible on semaphores?(a) wait(b) stop(c) hold(d) none of the mentionedI had been asked this question at a job interview.I would like to ask this question from Semaphores topic in division Process Synchronization of Operating System

Answer» CORRECT CHOICE is (a) wait

The EXPLANATION: NONE.
42.

What are Spinlocks?(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 mentionedI had been asked this question in an internship interview.My question is from Semaphores in division Process Synchronization of Operating System

Answer» CORRECT ANSWER is (d) All of the mentioned

The EXPLANATION: NONE.
43.

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 mentionedThis question was posed to me in a national level competition.This key question is from Semaphores in section Process Synchronization of Operating System

Answer»

The correct option is (C) INTEGER variable

Easy EXPLANATION - NONE.

44.

TestAndSet instruction is executed ____________(a) after a particular process(b) periodically(c) atomically(d) none of the mentionedThe question was asked by my school teacher while I was bunking the class.The query is from Semaphores topic in section Process Synchronization of Operating System

Answer» CORRECT CHOICE is (C) atomically

For EXPLANATION: NONE.
45.

An un-interruptible unit is known as ____________(a) single(b) atomic(c) static(d) none of the mentionedThis question was posed to me by my college professor while I was bunking the class.I'm obligated to ask this question of Semaphores topic in division Process Synchronization of Operating System

Answer»

The CORRECT OPTION is (B) atomic

Best EXPLANATION: NONE.

46.

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 nextI got this question in an online interview.My question comes from The Critical Section (CS) Problem and Solutions topic in portion Process Synchronization of Operating System

Answer»

The correct option is (B) each PROCESS receives a NUMBER (may or may not be unique) and the one with the lowest number is SERVED next

Explanation: None.

47.

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) fourI have been asked this question in examination.This interesting question is from The Critical Section (CS) Problem and Solutions topic in portion Process Synchronization of Operating System

Answer»

The CORRECT ANSWER is (B) two

To EXPLAIN: NONE.

48.

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 mentionedThe question was asked in final exam.I'm obligated to ask this question of The Critical Section (CS) Problem and Solutions in section Process Synchronization of Operating System

Answer»

Correct ANSWER is (a) if a PROCESS is executing in its critical SECTION, then no other process MUST be executing in their critical sections

Easy explanation - None.

49.

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 mentionedI have been asked this question in homework.Enquiry is from The Critical Section (CS) Problem and Solutions in chapter Process Synchronization of Operating System

Answer»

The correct OPTION is (a) after a PROCESS has made a request to ENTER its critical section and before the request is granted

For explanation: None.

50.

Which of the following conditions must be satisfied to solve the critical section problem?(a) Mutual Exclusion(b) Progress(c) Bounded Waiting(d) All of the mentionedThe question was asked during an interview.This key question is from The Critical Section (CS) Problem and Solutions topic in section Process Synchronization of Operating System

Answer»

The CORRECT CHOICE is (d) All of the mentioned

Explanation: NONE.