Suppose an unbiased coin is tossed 6 times. Each coin toss is independent of all previous coin tosses. Let $E_1$ be the event that among the second, fourth, and sixth coin tosses, there are at least two heads. Let $E_2$ be the event that among the first, second, third, and fifth coin tosses, there are equal number of heads and tails.
The conditional probability $P\left(E_1 \mid E_2\right)$ is equal to $\_\_\_\_$ . (rounded off to one decimal place)
Consider a function $f:(0,1) \rightarrow\{0,1\}$ defined as follows.
For a real number $r \in(0,1), f(r)=1$ if the second digit after the decimal point in $r$ is one of the four digits $2,3,6$ and 7 . Otherwise, $f(r)$ is equal to 0 .
The number of points in $(0,1)$ at which $f$ is discontinuous is $\_\_\_\_$ . (answer in integer)
Which one of the following CPU scheduling algorithms cannot be preemptive?
Consider three processes P1, P2, and P3 running identical code, as shown in the pseudocode below. A and B are two binary semaphores initialized to 1 and 0 , respectively. $X$ is a shared variable initialized to 0 . Each line in the pseudocode is executed atomically. Pseudocode of P1, P2, and P3
Wait(A);
Print(*);
X = X+1;
If (X == 2)
{
Print($);
Signal(B);
}
Signal(A);
Wait(B);
Print(#);
Signal(B);
Assume that any of the three processes can start to execute first and context switching can happen between these processes at any arbitrary time and in any arbitrary order. Which of the following patterns is/are possible to be generated as an outcome of the execution of these three processes?
GATE CSE Papers
All year-wise previous year question papers