Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OS Quiz

Total questions: 25

Worksheet time: 17mins

Name
Class
Date
1.

Deadlocks can be described by which graph?

a)

Resource Allocation Graph

b)

Hamilton Graph

c)

Directed Graph

d)

Complete Graph

2.

Which is deadlock avoidance algorithm

a)

fcfs algorithm

b)

bankers algorithm

c)

preemptive algorithm

d)

round robin algorithm

3.

Which is not a necessary condition in Deadlock

a)

mutual exclusion

b)

hold and wait

c)

circular wait

d)

progress

4.

If p1 requesting for r1,r1 allocated to p2,p2 reqesting for r2,r2 is allocated to p1 such condition is called as______ in Deadlock Prevention

a)

mutual exclusion

b)

hold and wait

c)

circular wait

d)

bounding condition

5.

Banker's algorithm for resource allocation deals with?

a)

Deadlock prevention

b)

Deadlock Recovery

c)

Deadlock Avoidance

d)

Circular Wait

6.

If there is a direct arc from Process node to resource node we call that edge in RAG graph to be as

a)

assigned edge

b)

claimed edge

c)

request edge

d)

none of them

7.

If there is a direct arc from resource node to Process node than we call that edge in RAG graph to be as

a)

assigned edge

b)

claimed edge

c)

request edge

d)

none of them

8.

What is the maximum number of processes that may enter simultaneously inside the critical section to avoid race condition?

a)

1

b)

2

c)

3

d)

4

9.

A system is in a ______ state if there exists a set of transactions such that every transaction in the set is waiting for another transaction in the set.

a)

Idle

b)

waiting

c)

deadlock

d)

ready

10.

. What are the ways of dealing with deadlock ?

a)

deadlock prevention

b)

deadlock detection

c)

deadlock recovery

d)

all the above

11.

. A deadlock exists in the system if and only if the wait-for graph contains a ___________.

a)

cycle

b)

direction

c)

by - direction

d)

rotation

12.

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

13.

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

14.

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

a)

Mutual Exclusion

b)

Reentrancy

c)

Hold and wait

d)

No pre-emption

15.

In which of the following four necessary conditions for deadlock processes claim exclusive control of the resources they require?

a)

no preemption

b)

mutual exclusion

c)

circular wait

d)

hold and wait

16.

A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state?

Process Used Max

A 2 7

B 1 6

C 2 5

D 1 4

a)

(P4, P1, P3, P2)

b)

(P4, P2, P1, P3)

c)

(P4, P2, P3, P1)

d)

(P3, P1, P2, P4)

17.

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

18.

Which of the following is NOT a valid deadlock prevention scheme?

a)

Release all resources before requesting a new resource

b)

Number the resources uniquely and never request a lower numbered resource than the last one requested

c)

Never request a resource after releasing any resource

d)

Request and all required resources be allocated before execution.

19.

What is the name of the technique in which the operating system of a computer executes several programs concurrently by switching back and forth between them?

a)

Partitioning

b)

Multi-tasking

c)

Windowing

d)

Paging

20.

On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?

a)

5, 12, 9, 18

b)

5, 9, 12, 18

c)

12, 18, 9, 5

d)

9, 12, 18, 5

21.

Which of the following conditions does not hold good for a solution to a critical section problem ?

a)

No assumptions may be made about speeds or the number of CPUs.

b)

No two processes may be simultaneously inside their critical sections.

c)

Processes running outside its critical section may block other processes.

d)

Processes do not wait forever to enter its critical section.

22.

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

23.

Which of the following is NOT a valid deadlock prevention scheme?

a)

Release all resources before requesting a new resource

b)

Number the resources uniquely and never request a lower numbered resource than the last one requested

c)

Never request a resource after releasing any resource

d)

Request and all required resources be allocated before execution.

24.

For Single Instance of resource type which algorithm will be used for deadlock avoidance.

a)

Resource Allocation Graph

b)

Bankers Algorithm

c)

Petersons Algorithm

d)

None of theses

25.

What is not a Scheme for Deadlock Handling

a)

Deadlock Avoidance

b)

Deadlock Detection

c)

Deadlock Protection

d)

Recovery from Deadlock