1
Which of the following addressing modes are suitable for program relocation at run time? Absolute addressing Based addressing Relative addressing Indirect addressing I and IV I and II II and III I, II and IV
2
In the $4B/5B$ encoding scheme, every $4$ bits of data are encoded in a $5$-bit codeword. It is required that the codewords have at most $1$ leading and at most $1$ trailing zero. How many are such codewords possible? $14$ $16$ $18$ $20$
3
Consider a system with a two-level paging scheme in which a regular memory access takes $150$ $nanoseconds$, and servicing a page fault takes $8$ $milliseconds$. An average instruction takes $100$ nanoseconds of CPU time, and two memory accesses. The TLB ... average instruction execution time? $\text{645 nanoseconds}$ $\text{1050 nanoseconds}$ $\text{1215 nanoseconds}$ $\text{1230 nanoseconds}$
1 vote
4
Let the language $D$ be defined in the binary alphabet $\{0,1\}$ as follows: $D:= \{ w \in \{0,1\}^* \mid \text{ substrings 01 and 10 occur an equal number of times in w} \}$ For example , $101 \in D$ while $1010 \notin D$. Which of the following must ... $D$ is regular $D$ is context-free but not regular $D$ is decidable but not context-free $D$ is decidable but not in NP $D$ is undecidable
1 vote
5
A multi-user, multi-processing operating system cannot be implemented on hardware that does not support Address translation DMA for disk transfer At least two modes of CPU execution (privileged and non-privileged) Demand paging
6
Two concurrent processes $P1$ and $P2$ use four shared resources $R1, R2, R3$ and $R4$, as shown below. $\begin{array}{|l|l|}\hline \textbf{P1} & \textbf{P2} \\ \text{Compute: } & \text{Compute;} \\ \text{Use$R1;$} & \text{Use$R1; ... processes. If only binary semaphores are used to enforce the above scheduling constraints, what is the minimum number of binary semaphores needed? $1$ $2$ $3$ $4$
7
Let $L_1=\{0^{n+m}1^n0^m\mid n,m\geq 0 \}$, $L_2=\{0^{n+m}1^{n+m}0^m\mid n,m\geq 0\}$ and $L_3=\{0^{n+m}1^{n+m}0^{n+m}\mid n,m\geq 0\}$. Which of these languages are NOT context free? $L_1$ only $L_3$ only $L_1$ and $L_2$ $L_2$ and $L_3$
8
Let $P(E)$ denote the probability of the event $E$. Given $P(A) = 1$, $P(B) =\dfrac{1}{2}$, the values of $P(A\mid B)$ and $P(B\mid A)$ respectively are $\left(\dfrac{1}{4}\right),\left(\dfrac{1}{2}\right)$ $\left(\dfrac{1}{2}\right),\left(\dfrac{1}{4}\right)$ $\left(\dfrac{1}{2}\right),{1}$ ${1},\left(\dfrac{1}{2}\right)$
A random bit string of length n is constructed by tossing a fair coin n times and setting a bit to 0 or 1 depending on outcomes head and tail, respectively. The probability that two such randomly generated strings are not identical is: $\frac{1}{2^n}$ $1 - \frac{1}{n}$ $\frac{1}{n!}$ $1 - \frac{1}{2^n}$
A lexical analyzer uses the following patterns to recognize three tokens $T_1$, $T_2$, and $T_3$ over the alphabet $\{a, b, c\}$. $T_1$: $a?(b \mid c)^*a$ $T_2$: $b?(a \mid c)^*b$ $T_3$: $c?(b \mid a)^*c$ Note that x?' ... prefix. If the string $bbaacabc$ is processed by the analyzer, which one of the following is the sequence of tokens it outputs? $T_1T_2T_3$ $T_1T_1T_3$ $T_2T_1T_3$ $T_3T_3$
Let $L=\{ w \in \:(0+1)^* \mid w\text{ has even number of }1s \}$. i.e., $L$ is the set of all the bit strings with even numbers of $1$s. Which one of the regular expressions below represents $L$? $(0^*10^*1)^*$ $0^*(10^*10^*)^*$ $0^*(10^*1)^*0^*$ $0^*1(10^*1)^*10^*$