Q9
MCQ1 mark, −0.33Operating systemsConsider the following threads, and executing on a single processor, synchronized using three binary semaphore variables, and operated upon using standard and The threads can be context switched in any order and at any time.
// T1
while(true) {
wait(S3);
print("C");
signal(S2); }
// T2
while(true) {
wait(S1);
print("B");
signal(S3); }
// T3
while(true) {
wait(S2);
print("A");
signal(S1); }
Which initialization of the semaphores would print the sequence
Sign in to save attempts.
Keys: A–D or 1–4 choose, Enter checks, ← → move between questions.
Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.