Lab Quiz on Semaphores and Banker's Algorithm

Lab Quiz on Semaphores and Banker's Algorithm

University

8 Qs

quiz-placeholder

Similar activities

SCHEDULING ALGORITHMS

SCHEDULING ALGORITHMS

University

10 Qs

les Techniques d'Allocation de Fichiers

les Techniques d'Allocation de Fichiers

12th Grade - University

12 Qs

Stack Data Structure

Stack Data Structure

University

10 Qs

[Synchronous] Activity 1

[Synchronous] Activity 1

University

10 Qs

LSM

LSM

University

12 Qs

DEADLOCK

DEADLOCK

University

10 Qs

Active Learning - Operating Systems

Active Learning - Operating Systems

University

10 Qs

Solid Waste Landfill Pre-design

Solid Waste Landfill Pre-design

University

10 Qs

Lab Quiz on Semaphores and Banker's Algorithm

Lab Quiz on Semaphores and Banker's Algorithm

Assessment

Quiz

Other

University

Medium

Created by

Dr. Chaudhuri

Used 2+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of using semaphores in the Producer-Consumer problem?

To improve program speed

To print buffer contents

To synchronize access to shared resources

To increase buffer size

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of semaphore ensures only one thread accesses the critical section at a time?

Counting Semaphore

Binary Semaphore / Mutex

Shared Semaphore

Deadlock Semaphore

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the given C program, which condition checks if the buffer is full?

in == out

(in+1)%bufsize == out

buffer[in] == buffer[out]

in > out

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the wait(empty); operation represent in the Producer-Consumer problem?

Waiting for buffer to become full

Waiting for buffer to become empty

Waiting for an empty slot to produce

Waiting for a signal to exit

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of the Banker's Algorithm?

CPU scheduling

Memory allocation

Deadlock avoidance

Disk scheduling

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not required for Banker's Algorithm?

Maximum demand of each process

Resources allocated to each process

Priority of each process

Total number of available resources

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Banker's Algorithm, a system is said to be in a safe state if:

All processes can finish in some order

No deadlock occurs

There are enough resources for all processes

Processes are blocked

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the 'need' matrix in Banker's Algorithm?

Max - Allocation

Max + Allocation

Allocation - Max

Allocation + Available