Mock Quiz Hub

Mock Quiz Hub

Recent Updates
Added: OS Mid 1 Quiz
Added: OS Mid 2 Quiz
Added: OS Lab 1 Quiz
Time: 00:00

Quiz

Navigate through questions using the controls below

0%
Question 1 of 60 Quiz ID: q1
What is the primary purpose of a railway semaphore in the context of concurrent programming?
Question 2 of 60 Quiz ID: q2
Who first described the semaphore concept in concurrent programming?
Question 3 of 60 Quiz ID: q3
What type of variable is a semaphore?
Question 4 of 60 Quiz ID: q4
How many operations are exactly defined on a semaphore?
Question 5 of 60 Quiz ID: q5
In the down(S) operation, what happens if S > 0?
Question 6 of 60 Quiz ID: q6
What happens in the up(S) operation when there are processes suspended on S?
Question 7 of 60 Quiz ID: q7
What is a critical property of down(S) and up(S) operations?
Question 8 of 60 Quiz ID: q8
What is the requirement for a semaphore's initial value?
Question 9 of 60 Quiz ID: q9
What is a general semaphore?
Question 10 of 60 Quiz ID: q10
What values can a binary semaphore take?
Question 11 of 60 Quiz ID: q11
Which invariant must a semaphore S always satisfy?
Question 12 of 60 Quiz ID: q12
What does the invariant S = S₀ + #Up(S) - #Down(S) represent?
Question 13 of 60 Quiz ID: q13
In the mutual exclusion solution using semaphores, what should be the initial value of semaphore S?
Question 14 of 60 Quiz ID: q14
How does the semaphore solution differ from busy-wait approaches?
Question 15 of 60 Quiz ID: q15
In the mutual exclusion proof, what does #CS represent?
Question 16 of 60 Quiz ID: q16
What invariant proves mutual exclusion in the semaphore solution?
Question 17 of 60 Quiz ID: q17
Why cannot the semaphore mutual exclusion solution deadlock with two processes?
Question 18 of 60 Quiz ID: q18
What ensures no individual starvation in the two-process semaphore solution?
Question 19 of 60 Quiz ID: q19
What is a blocked-set semaphore?
Question 20 of 60 Quiz ID: q20
How does a blocked-queue semaphore differ from a blocked-set semaphore?
Question 21 of 60 Quiz ID: q21
In a busy-wait semaphore, what happens in the down(S) operation?
Question 22 of 60 Quiz ID: q22
Which type of semaphore can lead to starvation?
Question 23 of 60 Quiz ID: q23
Why is starvation impossible with blocked-queue semaphores?
Question 24 of 60 Quiz ID: q24
In the Bill and Ben cafe problem, what is the synchronization requirement?
Question 25 of 60 Quiz ID: q25
In the first solution to the Bill and Ben problem, what are the initial values of the semaphores?
Question 26 of 60 Quiz ID: q26
In the Bill and Ben problem, what does Bill do in SYNCH 1 in the first solution?
Question 27 of 60 Quiz ID: q27
What does Ben do in SYNCH 2 in the first solution to the Bill and Ben problem?
Question 28 of 60 Quiz ID: q28
What is the main characteristic of the Producer-Consumer problem?
Question 29 of 60 Quiz ID: q29
What is synchronous communication in the context of the Producer-Consumer problem?
Question 30 of 60 Quiz ID: q30
What is the purpose of a buffer in asynchronous communication?
Question 31 of 60 Quiz ID: q31
In the infinite buffer Producer-Consumer solution, why is mutual exclusion not an issue initially?
Question 32 of 60 Quiz ID: q32
What does the invariant #E = 0 + tail - head represent in the buffer?
Question 33 of 60 Quiz ID: q33
What is the initial value of the 'elements' semaphore in the infinite buffer solution?
Question 34 of 60 Quiz ID: q34
What does the consumer do before accessing the buffer in the infinite buffer solution?
Question 35 of 60 Quiz ID: q35
In the circular buffer solution, how many semaphores are used?
Question 36 of 60 Quiz ID: q36
What is the initial value of the 'spaces' semaphore in the circular buffer solution?
Question 37 of 60 Quiz ID: q37
What does the producer do before adding an element to the circular buffer?
Question 38 of 60 Quiz ID: q38
In the Dining Philosophers problem, how many philosophers are there?
Question 39 of 60 Quiz ID: q39
How many forks does a philosopher need to eat?
Question 40 of 60 Quiz ID: q40
What are the synchronization requirements for the Dining Philosophers problem?
Question 41 of 60 Quiz ID: q41
Why is philosopher[4] implemented differently from the others in the dining philosophers solution?
Question 42 of 60 Quiz ID: q42
In the Readers and Writers problem, what is the main constraint?
Question 43 of 60 Quiz ID: q43
What is wrong with the first Readers and Writers solution that uses only semaphore rw?
Question 44 of 60 Quiz ID: q44
What does the variable 'nr' represent in the improved Readers and Writers solution?
Question 45 of 60 Quiz ID: q45
When does the first reader execute down(rw) in the Readers and Writers solution?
Question 46 of 60 Quiz ID: q46
When does the last reader execute up(rw) in the Readers and Writers solution?
Question 47 of 60 Quiz ID: q47
Under what circumstances is the Readers and Writers solution unfair?
Question 48 of 60 Quiz ID: q48
In the Sleeping Barber problem, what happens when a customer arrives and the waiting room is full?
Question 49 of 60 Quiz ID: q49
What does the barber do when the waiting room is empty?
Question 50 of 60 Quiz ID: q50
What does the 'customers' semaphore represent in the Sleeping Barber solution?
Question 51 of 60 Quiz ID: q51
What is the purpose of the 'cutting' semaphore in the Sleeping Barber problem?
Question 52 of 60 Quiz ID: q52
What does the 'barber' semaphore signify in the Sleeping Barber solution?
Question 53 of 60 Quiz ID: q53
What type of relationship does the Sleeping Barber problem illustrate?
Question 54 of 60 Quiz ID: q54
What is a rendezvous in the context of the Sleeping Barber problem?
Question 55 of 60 Quiz ID: q55
What is the main difference between blocked-set and blocked-queue semaphores in terms of fairness?
Question 56 of 60 Quiz ID: q56
In semaphore implementations, what does 'atomic' mean for the down(S) and up(S) operations?
Question 57 of 60 Quiz ID: q57
What is the key advantage of using semaphores over busy-waiting solutions?
Question 58 of 60 Quiz ID: q58
In the Producer-Consumer problem with circular buffer, what prevents the producer from overwriting unread data?
Question 59 of 60 Quiz ID: q59
What is the main purpose of the 'mutex' semaphore in concurrent programming?
Question 60 of 60 Quiz ID: q60
Which semaphore definition provides the strongest guarantee against starvation?

Quiz Summary

Review your answers before submitting

60
Total Questions
0
Answered
60
Remaining
00:00
Time Spent