Welcome to the Process Synchronization MCQs Page
Dive deep into the fascinating world of Process Synchronization with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Process Synchronization, a crucial aspect of Operating System. In this section, you will encounter a diverse range of MCQs that cover various aspects of Process Synchronization, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Operating System.
Check out the MCQs below to embark on an enriching journey through Process Synchronization. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Operating System.
Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Process Synchronization. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!
Process Synchronization MCQs | Page 11 of 15
Explore more Topics under Operating System
Process P0
while(true)
{
wait(S0);
print '0';
release(S1);
release(S2);
}
Process P1
wait(S1);
release(S0);
Process P2
wait(S2);
release(S0);
How many times will P0 print โ0โ ?
repeat
P(mutex)
{Critical Section}
V(mutex)
forever
The code for P10 is identical except that it uses V(mutex) instead of P(mutex). What is the largest number of processes that can be inside the critical section at any moment (the mutex being initialized to 1)?
Process P1 :
while(true)
{
w1 = true;
while(w2 == true);
Critical section
w1 = false;
}
Remainder Section
Process P2 :
while(true)
{
w2 = true;
while(w1 == true);
Critical section
w2 = false;
}
Here, w1 and w2 are shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?
Process A
int Y;
A1: Y = X*2;
A2: X = Y;
Process B
int Z;
B1: Z = X+1;
B2: X = Z;
X is set to 5 before either process begins execution. As usual, statements within a process are executed sequentially, but statements in process A may execute in any order with respect to statements in process B.
How many different values of X are possible after both processes finish executing ?
Process A
int Y;
A1: Y = X*2;
A2: X = Y;
signal(T);
Process B
int Z;
B1: wait(T);
B2: Z = X+1;
X = Z;
T is set to 0 before either process begins execution and, as before, X is set to 5.
Now, how many different values of X are possible after both processes finish executing ?
Suppose a process executes in the following manner :
signal(mutex);
.....
critical section
.....
wait(mutex);
In this situation :
Suppose a process executes in the following manner :
wait(mutex);
.....
critical section
.....
wait(mutex);
In this situation :
Suggested Topics
Are you eager to expand your knowledge beyond Operating System? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!