Computer Sciences > Gate 2015 Set-1 > Process
The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.
P1()
{
C = B β 1;
B = 2*C;
}
P2()
{
D = 2 * B;
B = D - 1;
}
The number of distinct values that B can possibly take after the execution is{
C = B β 1;
B = 2*C;
}
P2()
{
D = 2 * B;
B = D - 1;
}
Correct : a
Similar Questions
The maximum number of processes that can be in Ready state for a computer system with n CPUs is
Consider the following snapshot of a system running n concurrent processes. Process i is holding Xi instances of a resource R, 1 β€ i β€ n. Assume that all instan...
A palindrome is a word that reads the same forwards and backwards. In a game
of words, a player has the following two plates painted with letters.
From...
Total Unique Visitors
Loading......