
Lab Quiz on Semaphores and Banker's Algorithm

Quiz
•
Other
•
University
•
Medium
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
Similar Resources on Wayground
10 questions
DEADLOCK

Quiz
•
University
10 questions
NEGOTIABLE INSTRUMENT

Quiz
•
University
12 questions
les Techniques d'Allocation de Fichiers

Quiz
•
12th Grade - University
10 questions
Stack Data Structure

Quiz
•
University
10 questions
[Synchronous] Activity 1

Quiz
•
University
10 questions
MINI SEMINAR THE BANKER

Quiz
•
University
9 questions
Repaso de Sockets

Quiz
•
University
10 questions
K-Nearest Neighbors Quiz

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade