Question 21
Question 22
MBR ← PC MAR ← X PC ← Y Memory ← MBRWhich one of the following is a possible operation performed by this sequence?
Question 23
Question 24
Question 25
Consider the following function:
int unknown(int n) {
int i, j, k = 0;
for (i = n/2; i <= n; i++)
for (j = 2; j <= n; j = j * 2)
k = k + n/2;
return k;
}
(A)
[Tex]\\Theta(n^2) [/Tex]
(B)
[Tex]\\Theta(n^2Logn) [/Tex]
(C)
[Tex]\\Theta(n^3) [/Tex]
(D)
[Tex]\\Theta(n^3Logn) [/Tex]
Question 26
Consider the following languages.
[caption width="800"] [/caption]Which one of the following statements is FALSE?
Question 27
Consider the DFA given.
[caption width="800"] [/caption]Which of the following are FALSE?
Question 28
A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W and X reads x from memory, increments by one, stores it to memory, and then terminates. Each of the processes Y and Z reads x from memory, decrements by two, stores it to memory, and then terminates. Each process before reading x invokes the P operation (i.e., wait) on a counting semaphore S and invokes the V operation (i.e., signal) on the semaphore S after storing x to memory. Semaphore S is initialized to two. What is the maximum possible value of x after all processes complete execution?
Question 29
Question 30
There are 58 questions to complete.