# Answers by Sankha Narayan Bose

1
The rank of the matrix $\begin{bmatrix} 0 &1 &t \\ 2& t & -1\\ 2& 2 & 0 \end{bmatrix}$ equals $3$ for any real number $t$ $2$ for any real number $t$ $2$ or $3$ depending on the value of $t$ $1,2$ or $3$ depending on the value of $t$
2
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock? 2-phase locking Time-stamp ordering I only II only Both I and II Neither I nor II
–1 vote
3
Consider the first order predicate formula $\varphi$: $\forall x [ ( \forall z \: z \mid x \Rightarrow (( z=x) \vee (z=1))) \rightarrow \exists w ( w > x) \wedge (\forall z \: z \mid w \Rightarrow ((w=z) \vee (z=1)))]$ Here $a \mid b$ ... $S3:$ Set of all integers Which of the above sets satisfy $\varphi$? S1 and S2 S1 and S3 S2 and S3 S1, S2 and S3
1 vote
4
Suppose three coins are lying on a table, two of them with heads facing up and one with tails facing up. One coin is chosen at random and flipped. What is the probability that after the flip the majority of the coins(i.e., at least two of them) will have heads facing up? ... $\left(\frac{1}{4}\right)$ $\left(\frac{1}{4}+\frac{1}{8}\right)$ $\left(\frac{2}{3}\right)$
5
Let $X$ and $Y$ be finite sets and $f:X \to Y$ be a function. Which one of the following statements is TRUE? For any subsets $A$ and $B$ of $X, |fA \cup B| = |f(A)| + |f(B)|$ For any subsets $A$ and $B$ of $X, f(A \cap B) = f(A) \cap f(B)$ For any subsets $A$ and $B$ of $X, |f(A \cap B)| = \min \{|f(A)|, |f(B)|\}$ For any subsets $S$ and $T$ of $Y, f^{-1}(S \cap T) = f^{-1}(S) \cap f^{-1}(T)$
6
Show that the conclusion $(r \to q)$ follows from the premises: $p, (p \to q) \vee (p \wedge (r \to q))$
7
Consider the following data path of a CPU. The ALU, the bus and all the registers in the data path are of identical size. All operations including incrementation of the PC and the GPRs are to be carried out in the ALU. Two clock cycles are needed for memory read operation - the ... <= R0 + R1. The minimum number of clock cycles needed for execution cycle of this instruction is: $2$ $3$ $4$ $5$
1 vote
8
Consider the following program segment. Here $\text{R1, R2}$ and $\text{R3}$ ... Assume that the memory is word addressable. After the execution of this program, the content of memory location $2010$ is: $100$ $101$ $102$ $110$
9
Consider the following program segment. Here $\text{R1, R2}$ and $\text{R3}$ ... that the memory is word addressable. The number of memory references for accessing the data in executing the program completely is $10$ $11$ $20$ $21$
1 vote
10
A processor takes $12$ cycles to complete an instruction I. The corresponding pipelined processor uses $6$ stages with the execution times of $3, 2, 5, 4, 6$ and $2$ cycles respectively. What is the asymptotic speedup assuming that a very large number of instructions are to be executed? $1.83$ $2$ $3$ $6$
11
A pipelined processor uses a 4-stage instruction pipeline with the following stages: Instruction fetch (IF), Instruction decode (ID), Execute (EX) and Writeback (WB). The arithmetic operations as well as the load and store operations are carried out in the EX stage. The ... ID stage is used. The number of clock cycles required to complete the sequence of instructions is $10$ $12$ $14$ $16$
1 vote
12
Consider a typical disk that rotates at $15000$ rotations per minute (RPM) and has a transfer rate of $50 \times 10^6$ bytes/sec. If the average seek time of the disk is twice the average rotational delay and the controller's transfer time is $10$ times the disk transfer time, the average time (in milliseconds) to read or write a $512$-byte sector of the disk is _____
13
Consider a disk pack with a seek time of $4$ milliseconds and rotational speed of $10000$ rotations per minute (RPM). It has $600$ sectors per track and each sector can store $512$ bytes of data. Consider a file stored in the disk. The file ... accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is__________________
1 vote
14
Consider a hard disk with $16$ recording surfaces $(0-15)$ having 16384 cylinders $(0-16383)$ and each cylinder contains $64$ sectors $(0-63)$. Data storage capacity in each sector is $512$ bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., ... is the cylinder number of the last sector of the file, if it is stored in a contiguous manner? $1281$ $1282$ $1283$ $1284$
15
The size of the data count register of a $\text{DMA}$ controller is $16 \text{bits}$. The processor needs to transfer a file of $29,154$ kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the $\text{DMA}$ controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is _________-.
1 vote
16
A hard disk with a transfer rate of $10$ Mbytes/second is constantly transferring data to memory using DMA. The processor runs at $600$ MHz, and takes $300$ and $900$ clock cycles to initiate and complete DMA transfer respectively. If the size of the transfer is $20$ Kbytes, what is the percentage of processor time consumed for the transfer operation? $5.0 \%$ $1.0\%$ $0.5\%$ $0.1\%$
17
The ALU, the bus and all the registers in the data path are of identical size. All operations including incrementation of the PC and the GPRs are to be carried out in the ALU. Two clock cycles are needed for memory read operation - the first one for loading address in the MAR ... $2$ $3$ $4$ $5$
18
A computer on a $10$ $Mbps$ network is regulated by a token bucket. The token bucket is filled at a rate of $2$ $Mbps$. It is initially filled to capacity with $16$ $Megabits$. What is the maximum duration for which the computer can transmit at the full $10$ $Mbps$? $1.6$ seconds $2$ seconds $5$ seconds $8$ seconds
19
Consider a simple graph with unit edge costs. Each node in the graph represents a router. Each node maintains a routing table indicating the next hop router to be used to relay a packet to its destination and the cost of the path to the destination through that router. Initially, the routing table is empty. ... to node $A$ at time $(t + 100)$ is : $>100$ but finite $\infty$ $3$ $>3$ and $\leq 100$
1 vote
20
In an $SR$ latch made by cross-coupling two NAND gates, if both $S$ and $R$ inputs are set to $0$, then it will result in $Q = 0, Q' = 1$ $Q = 1, Q' = 0$ $Q = 1, Q' = 1$ Indeterminate states
21
A positive edge-triggered $D$ flip-flop is connected to a positive edge-triggered $JK$ flip-flop as follows. The $Q$ output of the $D$ flip-flop is connected to both the $J$ and $K$ inputs of the $JK$ flip-flop, while the $Q$ output of the $JK$ ... mode of the $JK$ flip-flops. Both the flip-flops have non-zero propagation delays. $0110110\ldots$ $0100100\ldots$ $011101110\ldots$ $011001100\ldots$
1 vote
22
Consider the C function given below. int f(int j) { static int i = 50; int k; if (i == j) { printf("something"); k = f(i); return 0; } else return 0; } Which one of the following is TRUE? The function returns $0$ for all values of $j$. The function prints ... of $j$. The function returns $0$ when $j = 50$. The function will exhaust the runtime stack or run into an infinite loop when $j = 50$.
23
Consider the following pseudo code. What is the total number of multiplications to be performed? D = 2 for i = 1 to n do for j = i to n do for k = j + 1 to n do D = D * 3 Half of the product of the $3$ consecutive integers. One-third of the product of the $3$ consecutive integers. One-sixth of the product of the $3$ consecutive integers. None of the above.
1 vote
24
What is printed by the following C program? int f(int x, int *py, int **ppz) { int y, z; **ppz += 1; z = **ppz; // corrected z = *ppz; to z = **ppz; *py += 2; y = *py; x += 3; return x+y+z; } void main() { int c, *b, **a; c = 4; b = &c; a = &b; printf("%d", f(c, b, a)); } $18$ $19$ $21$ $22$
25
Consider the C program given below : #include <stdio.h> int main () { int sum = 0, maxsum = 0, i, n = 6; int a [] = {2, -2, -1, 3, 4, 2}; for (i = 0; i < n; i++) { if (i == 0 || a [i] < 0 || a [i] < a [i - 1]) { if (sum > maxsum) maxsum = sum ... sum += a [i]; } if (sum > maxsum) maxsum = sum ; printf ("%d\n", maxsum); } What is the value printed out when this program is executed? $9$ $8$ $7$ $6$
26
Consider the pseudocode given below. The function $DoSomething()$ takes as argument a pointer to the root of an arbitrary tree represented by the $leftMostChild-rightSibling$ representation. Each node of the tree is of type $treeNode$. typedef struct treeNode* treeptr; struct ... tree. height of the tree. number of nodes without a right sibling in the tree. number of leaf nodes in the tree