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.

If the resources are always preempted from the same process __________ can occur.(a) deadlock(b) system crash(c) aging(d) starvationThe question was posed to me in an online interview.Query is from Deadlock Recovery in chapter Deadlocks of Operating System

Answer» CORRECT CHOICE is (d) starvation

The BEST I can EXPLAIN: NONE.
2.

What is the solution to starvation?(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 mentionedI got this question in a job interview.Question is taken from Deadlock Recovery in portion Deadlocks of Operating System

Answer»

Right CHOICE is (a) the number of rollbacks MUST be INCLUDED in the COST factor

For explanation: None.

3.

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) queuedThis question was posed to me in an online interview.The doubt is from Deadlock Recovery in chapter Deadlocks of Operating System

Answer»

The CORRECT CHOICE is (B) ROLLED back

Explanation: NONE.

4.

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 mentionedThe question was posed to me in examination.This question is from Deadlock Recovery topic in chapter Deadlocks of Operating System

Answer» RIGHT answer is (b) roll BACK the process

Easiest explanation - NONE.
5.

Cost factors for 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 mentionedThe question was asked in exam.The question is from Deadlock Recovery in portion Deadlocks of Operating System

Answer»

Correct CHOICE is (C) Amount of time a deadlocked process has THUS far consumed during its execution

The BEST explanation: None.

6.

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 mentionedThis question was addressed to me in an interview.My query is from Deadlock Recovery topic in section Deadlocks of Operating System

Answer»

The CORRECT OPTION is (b) INCURS MINIMUM cost

The explanation: None.

7.

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 mentionedI had been asked this question by my college director while I was bunking the class.Question is from Deadlock Recovery topic in division Deadlocks of Operating System

Answer» CORRECT OPTION is (d) all of the mentioned

The BEST EXPLANATION: NONE.
8.

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 mentionedI have been asked this question in an internship interview.Asked question is from Deadlock Recovery in portion Deadlocks of Operating System

Answer»

The CORRECT choice is (c) Abort ONE PROCESS at a time until the DEADLOCK cycle is eliminated

Best explanation: NONE.

9.

‘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 mentionedThis question was posed to me in semester exam.My question is from Deadlock Detection in portion Deadlocks of Operating System

Answer» CORRECT OPTION is (a) can NEVER occur

Easy EXPLANATION - NONE.
10.

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 mentionedI got this question in unit test.This intriguing question comes from Deadlock Recovery in portion Deadlocks of Operating System

Answer» RIGHT choice is (a) ABORT one or more PROCESSES to break the circular wait

Best EXPLANATION: NONE.
11.

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 mentionedI have been asked this question in my homework.This key question is from Deadlock Detection topic in chapter Deadlocks of Operating System

Answer»

The CORRECT CHOICE is (a) can NEVER occur

Best EXPLANATION: NONE.

12.

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) 1The question was asked in examination.My doubt stems from Deadlock Detection in chapter Deadlocks of Operating System

Answer»

Right answer is (a) 2

To EXPLAIN I WOULD SAY: NONE.

13.

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 mentionedI got this question during an online interview.Question is from Deadlock Detection in section Deadlocks of Operating System

Answer»

Correct OPTION is (a) the SET of PROCESSES that have been deadlocked

To EXPLAIN: NONE.

14.

A deadlock eventually cripples system throughput and will cause the CPU utilization to ______(a) increase(b) drop(c) stay still(d) none of the mentionedI have been asked this question in unit test.This key question is from Deadlock Detection topic in section Deadlocks of Operating System

Answer»

The CORRECT CHOICE is (B) drop

To EXPLAIN: NONE.

15.

If deadlocks occur frequently, the detection algorithm must be invoked ________(a) rarely(b) frequently(c) rarely & frequently(d) none of the mentionedI have been asked this question by my college professor while I was bunking the class.Asked question is from Deadlock Detection topic in portion Deadlocks of Operating System

Answer» RIGHT OPTION is (B) frequently

To EXPLAIN: NONE.
16.

What is the disadvantage of invoking the detection algorithm for every request?(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 mentionedI got this question in an interview for job.My question is from Deadlock Detection topic in section Deadlocks of Operating System

Answer»

The CORRECT choice is (c) CONSIDERABLE OVERHEAD in computation time

Easy explanation - NONE.

17.

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 systemI had been asked this question in an interview.Enquiry is from Deadlock Detection in division Deadlocks of Operating System

Answer»

Right choice is (a) PI is WAITING for PJ to release a RESOURCE that Pi needs

The best explanation: NONE.

18.

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 stateThe question was asked by my school teacher while I was bunking the class.Question is taken from Deadlock Detection topic in portion Deadlocks of Operating System

Answer»

The CORRECT answer is (B) then a deadlock exists

The BEST I can explain: None.

19.

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 instances(d) all of the mentionedI have been asked this question in an online interview.Origin of the question is Deadlock Detection topic in chapter Deadlocks of Operating System

Answer» CORRECT CHOICE is (a) all resources have a SINGLE instance

Easy explanation - NONE.
20.

The content of the matrix Need is ____________(a) Allocation – Available(b) Max – Available(c) Max – Allocation(d) Allocation – MaxI had been asked this question in a job interview.I need to ask this question from Deadlock Avoidance in chapter Deadlocks of Operating System

Answer» RIGHT ANSWER is (c) Max – Allocation

Best EXPLANATION: None.
21.

The Banker’s algorithm is _____________ than the resource allocation graph algorithm.(a) less efficient(b) more efficient(c) equal(d) none of the mentionedThe question was asked during an interview.This intriguing question originated from Deadlock Avoidance topic in chapter Deadlocks of Operating System

Answer»

The CORRECT ANSWER is (a) LESS efficient

Easy EXPLANATION - NONE.

22.

The data structures available in the Banker’s algorithm are ____________(a) Available(b) Need(c) Allocation(d) All of the mentionedThis question was addressed to me during an interview.I'm obligated to ask this question of Deadlock Avoidance in portion Deadlocks of Operating System

Answer» RIGHT OPTION is (d) All of the mentioned

To EXPLAIN I would say: NONE.
23.

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 mentionedThe question was asked in class test.My enquiry is from Deadlock Avoidance in division Deadlocks of Operating System

Answer» CORRECT choice is (B) then the system will be in a safe state

To explain I WOULD say: NONE.
24.

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 instances of each resource type(d) none of the mentionedThe question was posed to me during a job interview.The question is from Deadlock Avoidance topic in portion Deadlocks of Operating System

Answer»

Correct CHOICE is (a) with multiple INSTANCES of each RESOURCE type

The EXPLANATION: None.

25.

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) resourcesThis question was addressed to me by my school teacher while I was bunking the class.My query is from Deadlock Avoidance in chapter Deadlocks of Operating System

Answer»

Right answer is (a) resource allocation state

For EXPLANATION: Resource allocation STATES are used to MAINTAIN the availability of the already and CURRENT available resources.

26.

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 mentionedThe question was posed to me in my homework.Query is from Deadlock Avoidance topic in section Deadlocks of Operating System

Answer» CORRECT OPTION is (c) safe sequence

The BEST I can explain: None.
27.

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 mentionedI had been asked this question in an interview for job.This intriguing question comes from Deadlock Avoidance topic in portion Deadlocks of Operating System

Answer»

The CORRECT option is (B) the SYSTEM can ALLOCATE resources to each process in some order and still AVOID a deadlock

To explain: None.

28.

All unsafe states are ____________(a) deadlocks(b) not deadlocks(c) fatal(d) none of the mentionedThis question was posed to me in an interview for internship.I'd like to ask this question from Deadlock Avoidance in portion Deadlocks of Operating System

Answer»

The CORRECT OPTION is (B) not deadlocks

The EXPLANATION is: NONE.

29.

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) approximateThis question was posed to me by my college professor while I was bunking the class.My enquiry is from Deadlock Avoidance in chapter Deadlocks of Operating System

Answer» RIGHT ANSWER is (C) maximum

To EXPLAIN: NONE.
30.

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 processThis question was addressed to me in final exam.I'm obligated to ask this question of Deadlock Avoidance in division Deadlocks of Operating System

Answer»

The correct choice is (a) RESOURCES currently available

The EXPLANATION is: NONE.

31.

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 mentionedI had been asked this question in an international level competition.My question is from Deadlock Prevention in portion Deadlocks of Operating System

Answer» RIGHT ANSWER is (B) Low RESOURCE utilization

The explanation: None.
32.

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 preemptedThis question was posed to me in an online interview.My doubt is from Deadlock Prevention topic in division Deadlocks of Operating System

Answer»

Correct OPTION is (d) then all RESOURCES currently being HELD are preempted

The BEST I can explain: NONE.

33.

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 mentionedThe question was posed to me in an interview.The doubt is from Deadlock Prevention in section Deadlocks of Operating System

Answer»

Correct option is (d) all of the mentioned

The explanation is: 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.

34.

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 mentionedI have been asked this question in examination.Asked question is from Deadlock Prevention in division Deadlocks of Operating System

Answer»

The CORRECT choice is (a) IMPOSE a total ordering of all resource types and to determine WHETHER one precedes another in the ordering

Explanation: NONE.

35.

For sharable resources, mutual exclusion ____________(a) is required(b) is not required(c) may be or may not be required(d) none of the mentionedThis question was posed to me in an international level competition.Question is from Deadlock Prevention topic in chapter Deadlocks of Operating System

Answer»

Correct choice is (b) is not required

Easy EXPLANATION - They do not REQUIRE mutually exclusive access, and HENCE cannot be involved in a DEADLOCK.

36.

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 mentionedThe question was asked during an interview.I would like to ask this question from Deadlock Prevention in portion Deadlocks of Operating System

Answer»

Correct option is (a) at least ONE resource must be held in a non SHARABLE mode

The explanation is: If another process requests that resource (non – shareable resource), the REQUESTING process must be DELAYED until the resource has been RELEASED.

37.

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 deadlockI had been asked this question in my homework.The query is from Deadlock Prevention topic in chapter Deadlocks of Operating System

Answer»

The correct CHOICE is (a) to ENSURE that at least one of the NECESSARY conditions cannot hold

The EXPLANATION: None.

38.

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 mentionedI had been asked this question in quiz.The origin of the question is Deadlock Prevention in section Deadlocks of Operating System

Answer»

Right option is (B) A PROCESS must be holding at least one resource and WAITING to acquire additional resources that are being held by other processes

The BEST explanation: None.

39.

For non sharable resources like a printer, mutual exclusion ____________(a) must exist(b) must not exist(c) may exist(d) none of the mentionedThe question was posed to me in examination.My query is from Deadlock Prevention topic in section Deadlocks of Operating System

Answer»

Correct CHOICE is (a) must exist

The EXPLANATION: A printer cannot be simultaneously SHARED by SEVERAL processes.

40.

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 mentionedI got this question during an interview.My enquiry is from Deadlock Prevention topic in section Deadlocks of Operating System

Answer»

The CORRECT ANSWER is (d) All of the mentioned

Explanation: NONE.

41.

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 systemI had been asked this question in an internship interview.Query is from Deadlock Prevention in portion Deadlocks of Operating System

Answer»

The CORRECT option is (c) must not exceed the TOTAL number of resources available in the system

The BEST explanation: NONE.

42.

The request and release of resources are ___________(a) command line statements(b) interrupts(c) system calls(d) special programsI got this question by my college professor while I was bunking the class.The query is from Deadlock Prevention topic in portion Deadlocks of Operating System

Answer» CORRECT choice is (C) system calls

To EXPLAIN: None.
43.

What are Multithreaded programs?(a) lesser prone to deadlocks(b) more prone to deadlocks(c) not at all prone to deadlocks(d) none of the mentionedThis question was posed to me in final exam.I want to ask this question from Deadlock Prevention in portion Deadlocks of Operating System

Answer»

Right answer is (B) more PRONE to deadlocks

For explanation: Multiple threads can COMPETE for SHARED resources.

44.

To avoid deadlock ____________(a) there must be a fixed number of resources to allocate(b) resource allocation must be done only once(c) all deadlocked processes must be aborted(d) inversion technique can be usedI got this question in examination.This interesting question is from Deadlock topic in division Deadlocks of Operating System

Answer»

The CORRECT choice is (a) there MUST be a FIXED number of resources to allocate

The best I can EXPLAIN: None.

45.

A problem encountered in multitasking when a process is perpetually denied necessary resources is called ____________(a) deadlock(b) starvation(c) inversion(d) agingI got this question by my school principal while I was bunking the class.I need to ask this question from Deadlock in division Deadlocks of Operating System

Answer» RIGHT CHOICE is (B) starvation

Explanation: NONE.
46.

What is the drawback of banker’s algorithm?(a) in advance processes rarely know how much resource they will need(b) the number of processes changes as time progresses(c) resource once available can disappear(d) all of the mentionedI got this question during an interview.The above asked question is from Deadlock topic in chapter Deadlocks of Operating System

Answer»

The CORRECT CHOICE is (d) all of the mentioned

Best EXPLANATION: NONE.

47.

For an effective operating system, when to check for deadlock?(a) every time a resource request is made(b) at fixed time intervals(c) every time a resource request is made at fixed time intervals(d) none of the mentionedThe question was posed to me in a national level competition.I'd like to ask this question from Deadlock in section Deadlocks of Operating System

Answer»

The correct choice is (c) EVERY time a resource REQUEST is made at fixed time intervals

The BEST I can explain: NONE.

48.

Which one of the following is a visual ( mathematical ) way to determine the deadlock occurrence?(a) resource allocation graph(b) starvation graph(c) inversion graph(d) none of the mentionedI had been asked this question in an online interview.This intriguing question originated from Deadlock in division Deadlocks of Operating System

Answer»

The correct OPTION is (a) RESOURCE ALLOCATION graph

Best explanation: NONE.

49.

Which one of the following is the deadlock avoidance algorithm?(a) banker’s algorithm(b) round-robin algorithm(c) elevator algorithm(d) karn’s algorithmThis question was addressed to me in quiz.Origin of the question is Deadlock in portion Deadlocks of Operating System

Answer»

The CORRECT ANSWER is (a) BANKER’s algorithm

Explanation: NONE.

50.

The circular wait condition can be prevented by ____________(a) defining a linear ordering of resource types(b) using thread(c) using pipes(d) all of the mentionedI got this question in an international level competition.My doubt is from Deadlock in chapter Deadlocks of Operating System

Answer» RIGHT CHOICE is (a) DEFINING a linear ordering of resource types

Easy explanation - None.