wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Problema del deadlock

Total questions: 25

Worksheet time: 25mins

Name
Class
Date
1.

What is the graph used for deadlock identification

a)

resource allocation graph

b)

process allocation graph

c)

thread allocation graph

d)

instance allocation graph

2.

Which of the following condition is required for deadlock to be possible?

a)

mutual exclusion

b)

a process may hold allocated resources while awaiting assignment of other resources

c)

no resource can be forcibly removed from a process holding it

d)

all of the mentioned

3.

Which of the following is not a necessary condition for deadlock?

a)

Mutual Exclusion

b)

Reentrancy

c)

Hold and wait

d)

No pre-emption

4.

If any of the process is waiting for a long time then it is called as

a)

Deadlock

b)

semaphore

c)

starvation

d)

None

5.

Only one thread at a time can use a resource

a)

mutual exclusion

b)

hold and wait

c)

no preemption

d)

CIRCULAR WAIT

6.

A set of process or thread waits for a resource which is held by another waiting process is called

a)

Deadlock

b)

starvation

c)

synchronization

d)

concurrency

7.

Resources are released only voluntarily by the thread holding the resource, after thread is finished with it

a)

mutual exclusion

b)

hold and wait

c)

no preemption

d)

circular wait

8.

Thread holding at least one resource is waiting to acquire additional resources held by other threads are called as

a)

hold and wait

b)

no preemption

c)

circular wait

d)

mutual exclusion

9.

A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is

a)

6

b)

7

c)

8

d)

9

10.

Consider a system having m resources of the same type. These resources are shared by 3 processes A, B, C which have peak time demands of 3, 4, 6 respectively. The minimum value of m that ensures deadlock will never occur is

a)

11

b)

12

c)

13

d)

14

11.

Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is _______ .

a)

1

b)

2

c)

3

d)

4

12.

A system is in the safe state if ____________

a)

the system can allocate resources to each process in some order and still avoid a deadlock

b)

there exist a safe sequence

c)

all of the mentioned

d)

none of the mentioned

13.

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 mentioned

14.

Which one of the following is the deadlock avoidance algorithm?

a)

banker’s algorithm

b)

round-robin algorithm

c)

elevator algorithm

d)

karn’s algorithm

15.

A problem encountered in multitasking when a process is perpetually denied necessary resources is called ____________

a)

deadlock

b)

starvation

c)

inversion

d)

aging

16.

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 mentioned

17.

Multithreaded programs are :

a)

lesser prone to deadlocks

b)

more prone to deadlocks

c)

not at all prone to deadlocks

d)

None of these

18.

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

19.

For non sharable resources like a printer, mutual exclusion

a)

must exist

b)

must not exist

c)

may exist

d)

None of these

20.

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 these

21.

The disadvantage of a process being allocated all its resources before beginning its execution is :

A. B. C. D.

a)

Low CPU utilization

b)

Low resource utilization

c)

Very high resource utilization

d)

None of these

22.

With deadlock detection, requested resources are granted to

a)

Resources

b)

Programs

c)

Processes

d)

Users

23.

A set of resources' allocations such that the system can allocate resources to each process in some order, and still avoid a deadlock is called ________.

a)

Unsafe state

b)

Safe state

c)

Starvation

d)

Greedy Allocation

24.

A process is starved

a)

if it is permanently waiting for a resource

b)

if semaphores are not used

c)

if a queue is not used for scheduling

d)

if demand paging is not properly implemented

25.

The Banker's algorithm is used

a)

to prevent deadlock in operating systems

b)

to detect deadlock in operating systems

c)

to rectify a deadlocked state

d)

none of the above