
Lab Quiz on Semaphores and Banker's Algorithm

Quiz
•
Professional Development
•
University
•
Medium
Priyanka S Shivaramaiah
Used 1+ 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
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Professional Development
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University