Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged gatecse-2002
7
votes
3
answers
1
GATE CSE 2002 | Question: 18-b
The functionality of atomic TEST-AND-SET assembly language instruction is given by the following C function int TEST-AND-SET (int *x) { int y; A1: y=*x; A2: *x=1; A3: return y; } Complete the following C functions for implementing code ... -free? For the above solution, show by an example that mutual exclusion is not ensured if TEST-AND-SET instruction is not atomic?
The functionality of atomic TEST-AND-SET assembly language instruction is given by the following C functionint TEST-AND-SET (int *x) { int y; A1: y=*x; A2: *x=1; A3: retu...
go_editor
3.3k
views
go_editor
asked
Feb 28, 2018
Operating System
gatecse-2002
operating-system
process-synchronization
normal
descriptive
+
–
18
votes
2
answers
2
GATE CSE 2002 | Question: 5b
Determine whether each of the following is a tautology, a contradiction, or neither ("$\lor$" is disjunction, "$\land$" is conjunction, "$\rightarrow$" is implication, "$\neg$" is negation, and "$\leftrightarrow$" is biconditional ( ... $(A \lor B) \rightarrow B$ $A \land (\neg (A \lor B))$
Determine whether each of the following is a tautology, a contradiction, or neither ("$\lor$" is disjunction, "$\land$" is conjunction, "$\rightarrow$" is implication, "$...
Arjun
3.3k
views
Arjun
asked
Nov 7, 2014
Mathematical Logic
gatecse-2002
mathematical-logic
easy
descriptive
propositional-logic
+
–
27
votes
1
answer
3
GATE CSE 2002 | Question: 22
Construct all the parse trees corresponding to $i + j * k$ for the grammar $E \rightarrow E+E$ $E \rightarrow E*E$ $E \rightarrow id$ In this grammar, what is the precedence of the two operators $*$ and $+$? If only one parse tree is desired for any string in the same language, what changes are to be made so that the resulting LALR(1) grammar is unambiguous?
Construct all the parse trees corresponding to $i + j * k$ for the grammar $E \rightarrow E+E$ $E \rightarrow E*E$ $E \rightarrow id$In this grammar, what is the pr...
Kathleen
3.8k
views
Kathleen
asked
Sep 15, 2014
Compiler Design
gatecse-2002
compiler-design
parsing
normal
descriptive
+
–
25
votes
1
answer
4
GATE CSE 2002 | Question: 21
We require a four state automaton to recognize the regular expression $(a\mid b)^*abb$ Give an NFA for this purpose Give a DFA for this purpose
We require a four state automaton to recognize the regular expression $(a\mid b)^*abb$Give an NFA for this purposeGive a DFA for this purpose
Kathleen
4.2k
views
Kathleen
asked
Sep 15, 2014
Theory of Computation
gatecse-2002
theory-of-computation
finite-automata
normal
descriptive
+
–
20
votes
3
answers
5
GATE CSE 2002 | Question: 20
The following solution to the single producer single consumer problem uses semaphores for synchronization. #define BUFFSIZE 100 buffer buf[BUFFSIZE]; int first = last = 0; semaphore b_full = 0; semaphore b_empty = BUFFSIZE void producer() { ... immediately after $c1$ and immediately before $c2$ so that the program works correctly for multiple producers and consumers.
The following solution to the single producer single consumer problem uses semaphores for synchronization.#define BUFFSIZE 100 buffer buf[BUFFSIZE]; int first = last = 0;...
Kathleen
6.1k
views
Kathleen
asked
Sep 15, 2014
Operating System
gatecse-2002
operating-system
process-synchronization
normal
descriptive
+
–
37
votes
3
answers
6
GATE CSE 2002 | Question: 19
A computer uses $32-bit$ virtual address, and $32-bit$ physical address. The physical memory is byte addressable, and the page size is $4$ $\text{Kbytes}.$ It is decided to use two level page tables to translate from virtual address ... that can be contained in each page? How many bits are available for storing protection and other information in each page table entry?
A computer uses $32-bit$ virtual address, and $32-bit$ physical address. The physical memory is byte addressable, and the page size is $4$ $\text{Kbytes}.$ It is decided...
Kathleen
14.1k
views
Kathleen
asked
Sep 15, 2014
Operating System
gatecse-2002
operating-system
virtual-memory
normal
descriptive
+
–
16
votes
2
answers
7
GATE CSE 2002 | Question: 18-a
Draw the process state transition diagram of an OS in which (i) each process is in one of the five states: created, ready, running, blocked (i.e., sleep or wait), or terminated, and (ii) only non-preemptive scheduling is used by the OS. Label the transitions appropriately.
Draw the process state transition diagram of an OS in which (i) each process is in one of the five states: created, ready, running, blocked (i.e., sleep or wait), or term...
Kathleen
6.2k
views
Kathleen
asked
Sep 15, 2014
Operating System
gatecse-2002
operating-system
process-synchronization
normal
descriptive
+
–
33
votes
2
answers
8
GATE CSE 2002 | Question: 17
The following table refers to search items for a key in $B$-trees and $B^+$ ... $(2,11)$ and $(11,6)$ are now inserted into $R.$ What are the additional tuples that are inserted in $V$?
The following table refers to search items for a key in $B$-trees and $B^+$ trees.$$\begin{array}{|ll|ll|} \hline & \textbf {B-tree} & & \textbf {B}^+\text{-tree} \\\hl...
Kathleen
5.6k
views
Kathleen
asked
Sep 15, 2014
Databases
gatecse-2002
databases
b-tree
normal
descriptive
+
–
51
votes
5
answers
9
GATE CSE 2002 | Question: 16
For relation R=(L, M, N, O, P), the following dependencies hold: $ M \rightarrow O,$ $NO \rightarrow P,$ $P \rightarrow L$ and $L \rightarrow MN$ R is decomposed into R1 = (L, M, N, P) and R2 = (M, ... above decomposition dependency-preserving? If not, list all the dependencies that are not preserved. What is the highest normal form satisfied by the above decomposition?
For relation R=(L, M, N, O, P), the following dependencies hold:$ M \rightarrow O,$ $NO \rightarrow P,$ $P \rightarrow L$ and $L \rightarrow MN$R is decomposed into R1 = ...
Kathleen
16.4k
views
Kathleen
asked
Sep 15, 2014
Databases
gatecse-2002
databases
database-normalization
normal
descriptive
+
–
32
votes
5
answers
10
GATE CSE 2002 | Question: 15
A university placement center maintains a relational database of companies that interview students on campus and make job offers to those successful in the interview. The schema of the database is given below: ... students were offered jobs, the name of the degree and the average offered salary of students in this degree program.
A university placement center maintains a relational database of companies that interview students on campus and make job offers to those successful in the interview. The...
Kathleen
5.4k
views
Kathleen
asked
Sep 15, 2014
Databases
gatecse-2002
databases
normal
descriptive
relational-algebra
sql
+
–
24
votes
1
answer
11
GATE CSE 2002 | Question: 14
The aim of the following question is to prove that the language $\{M \mid M$ $\text {is the code of the Turing Machine which, irrespective of the input, halts and outputs a}$ $1\}$ ... step $M$ must make? What key property relates the behaviour of $M$ on $w$ to the behaviour of $M'$ on $x$?
The aim of the following question is to prove that the language $\{M \mid M$ $\text {is the code of the Turing Machine which, irrespective of the input, halts and outputs...
Kathleen
3.1k
views
Kathleen
asked
Sep 15, 2014
Theory of Computation
gatecse-2002
theory-of-computation
decidability
normal
turing-machine
descriptive
difficult
+
–
34
votes
8
answers
12
GATE CSE 2002 | Question: 13
In how many ways can a given positive integer $n \geq 2$ be expressed as the sum of $2$ positive integers (which are not necessarily distinct). For example, for $n=3$, the number of ways is $2$, i.e., $1+2, 2+1$. Give only ... $n \geq k$ be expressed as the sum of $k$ positive integers (which are not necessarily distinct). Give only the answer without explanation.
In how many ways can a given positive integer $n \geq 2$ be expressed as the sum of $2$ positive integers (which are not necessarily distinct). For example, for $n=3$, th...
Kathleen
7.2k
views
Kathleen
asked
Sep 15, 2014
Combinatory
gatecse-2002
combinatory
normal
descriptive
balls-in-bins
+
–
25
votes
3
answers
13
GATE CSE 2002 | Question: 12
Fill in the blanks in the following template of an algorithm to compute all pairs shortest path lengths in a directed graph $G$ with $n*n$ adjacency matrix $A$. $A[i,j]$ equals $1$ if there is an edge in $G$ from $i$ to $j$ ... containing the blanks in the Algorithm step and fill in the blanks. Fill in the blank: The running time of the Algorithm is $O$(___).
Fill in the blanks in the following template of an algorithm to compute all pairs shortest path lengths in a directed graph $G$ with $n*n$ adjacency matrix $A$. $A[i,j]$ ...
Kathleen
6.4k
views
Kathleen
asked
Sep 15, 2014
Algorithms
gatecse-2002
algorithms
graph-algorithms
time-complexity
normal
descriptive
+
–
24
votes
2
answers
14
GATE CSE 2002 | Question: 11
The following recursive function in C is a solution to the Towers of Hanoi problem. void move(int n, char A, char B, char C) { if (......................) { move (.............................); printf("Move disk %d from pole %c to pole %c\n", n, A, C); move (.....................); } } Fill in the dotted parts of the solution.
The following recursive function in C is a solution to the Towers of Hanoi problem.void move(int n, char A, char B, char C) { if (......................) { move (...........
Kathleen
3.2k
views
Kathleen
asked
Sep 15, 2014
Programming in C
gatecse-2002
programming
recursion
descriptive
+
–
34
votes
1
answer
15
GATE CSE 2002 | Question: 10
In a C program, an array is declared as $\text{float} \ A[2048]$. Each array element is $4 \ \text{Bytes}$ in size, and the starting address of the array is $0x00000000$. This program is run on a computer that has a direct ... ? Justify your answer briefly. Assume that the data cache is initially empty and that no other data or instruction accesses are to be considered.
In a C program, an array is declared as $\text{float} \ A[2048]$. Each array element is $4 \ \text{Bytes}$ in size, and the starting address of the array is $0x00000000$....
Kathleen
6.1k
views
Kathleen
asked
Sep 15, 2014
CO and Architecture
gatecse-2002
co-and-architecture
cache-memory
normal
descriptive
+
–
38
votes
4
answers
16
GATE CSE 2002 | Question: 9
Consider the following $32\text{-bit}$ floating-point representation scheme as shown in the format below. A value is specified by $3$ fields, a one bit sign field (with $0$ for positive and $1$ ... the hexadecimal. What is the largest value that can be represented using this format? Express your answer as the nearest power of $10$.
Consider the following $32\text{-bit}$ floating-point representation scheme as shown in the format below. A value is specified by $3$ fields, a one bit sign field (with $...
Kathleen
11.3k
views
Kathleen
asked
Sep 15, 2014
Digital Logic
gatecse-2002
digital-logic
number-representation
normal
descriptive
+
–
12
votes
1
answer
17
GATE CSE 2002 | Question: 8
Consider the following circuit. $A = a_2a_1a_0$ and $B=b_2b_1b_0$ are three bit binary numbers input to the circuit. The output is $Z=z_3z_2z_1z_0$. R0, R1 and R2 are registers with loading clock shown. The registers are loaded with their input data with the falling ... b. What does the circuit implement?
Consider the following circuit. $A = a_2a_1a_0$ and $B=b_2b_1b_0$ are three bit binary numbers input to the circuit. The output is $Z=z_3z_2z_1z_0$. R0, R1 and R2 are reg...
Kathleen
3.0k
views
Kathleen
asked
Sep 15, 2014
Digital Logic
gatecse-2002
digital-logic
normal
descriptive
digital-counter
+
–
28
votes
5
answers
18
GATE CSE 2002 | Question: 7
Express the function $f(x,y,z) = xy' + yz'$ with only one complement operation and one or more AND/OR operations. Draw the logic circuit implementing the expression obtained, using a single NOT gate and one or more AND/OR gates ... (without expressing its switching function) into an equivalent logic circuit that employs only $6$ NAND gates each with $2$-inputs.
Express the function $f(x,y,z) = xy' + yz'$ with only one complement operation and one or more AND/OR operations. Draw the logic circuit implementing the expression obtai...
Kathleen
7.7k
views
Kathleen
asked
Sep 15, 2014
Digital Logic
gatecse-2002
digital-logic
normal
descriptive
digital-circuits
+
–
20
votes
1
answer
19
GATE CSE 2002 | Question: 6
Draw all binary trees having exactly three nodes labeled $A, B$ and $C$ on which preorder traversal gives the sequence $C, B, A$.
Draw all binary trees having exactly three nodes labeled $A, B$ and $C$ on which preorder traversal gives the sequence $C, B, A$.
Kathleen
2.5k
views
Kathleen
asked
Sep 15, 2014
DS
gatecse-2002
data-structures
binary-tree
easy
descriptive
+
–
28
votes
5
answers
20
GATE CSE 2002 | Question: 5a
Obtain the eigen values of the matrix$A=\begin {bmatrix} 1 & 2 & 34 & 49 \\ 0 & 2 & 43 & 94 \\ 0 & 0 & -2 & 104 \\ 0 & 0 & 0 & -1 \end{bmatrix}$
Obtain the eigen values of the matrix$$A=\begin {bmatrix} 1 & 2 & 34 & 49 \\ 0 & 2 & 43 & 94 \\ 0 & 0 & -2 & 104 \\ 0 & 0 & 0 & -1 \end{bmatrix}$$
Kathleen
4.5k
views
Kathleen
asked
Sep 15, 2014
Linear Algebra
gatecse-2002
linear-algebra
eigen-value
normal
descriptive
+
–
17
votes
2
answers
21
GATE CSE 2002 | Question: 4
$S=\{(1,2), (2,1)\}$ is binary relation on set $A = \{1,2,3\}$. Is it irreflexive? Add the minimum number of ordered pairs to S to make it an equivalence relation. Give the modified $S$. Let $S=\{a,b\}$ ... binary relation '$\subseteq$ (set inclusion)' on $\square(S)$. Draw the Hasse diagram corresponding to the lattice ($\square(S), \subseteq$)
$S=\{(1,2), (2,1)\}$ is binary relation on set $A = \{1,2,3\}$. Is it irreflexive? Add the minimum number of ordered pairs to S to make it an equivalence relation. Give t...
Kathleen
3.0k
views
Kathleen
asked
Sep 15, 2014
Set Theory & Algebra
gatecse-2002
set-theory&algebra
normal
lattice
descriptive
+
–
18
votes
5
answers
22
GATE CSE 2002 | Question: 3
Let $A$ be a set of $n(>0)$ elements. Let $N_r$ be the number of binary relations on $A$ and let $N_f$ be the number of functions from $A$ to $A$ Give the expression for $N_r,$ in terms of $n.$ Give the expression for $N_f,$ terms of $n.$ Which is larger for all possible $n,N_r$ or $N_f$
Let $A$ be a set of $n(>0)$ elements. Let $N_r$ be the number of binary relations on $A$ and let $N_f$ be the number of functions from $A$ to $A$Give the expression for $...
Kathleen
4.0k
views
Kathleen
asked
Sep 15, 2014
Set Theory & Algebra
gatecse-2002
set-theory&algebra
normal
descriptive
relations
+
–
54
votes
6
answers
23
GATE CSE 2002 | Question: 2.25
From the following instance of a relation schema $R(A,B,C)$ ... functionally determine $C$ $B$ does not functionally determine $C$ $A$ does not functionally determine $B$ and $B$ does not functionally determine $C$
From the following instance of a relation schema $R(A,B,C)$, we can conclude that:$$\begin{array}{|l|l|}\hline \textbf{A} & \textbf{B} & \textbf{C} \\\hline \text{1} & \...
Kathleen
16.6k
views
Kathleen
asked
Sep 15, 2014
Databases
gatecse-2002
databases
database-normalization
+
–
49
votes
5
answers
24
GATE CSE 2002 | Question: 2.24
Relation $R$ is decomposed using a set of functional dependencies, $F$, and relation $S$ is decomposed using another set of functional dependencies, $G$. One decomposition is definitely $\text{BCNF}$, the other is definitely $3NF$, but it is ... the closures of $F$ and $G$ are available). Dependency-preservation Lossless-join $\text{BCNF}$ definition $3NF$ definition
Relation $R$ is decomposed using a set of functional dependencies, $F$, and relation $S$ is decomposed using another set of functional dependencies, $G$. One decompositio...
Kathleen
10.5k
views
Kathleen
asked
Sep 15, 2014
Databases
gatecse-2002
databases
database-normalization
easy
+
–
42
votes
6
answers
25
GATE CSE 2002 | Question: 2.23, UGCNET-June2012-II: 26
A $B^+$ - tree index is to be built on the Name attribute of the relation STUDENT. Assume that all the student names are of length $8$ bytes, disk blocks are of size $512$ bytes, and index pointers are of size $4$ bytes. Given the scenario, what ... of the degree (i.e. number of pointers per node) of the $B^+$ - tree? $16$ $42$ $43$ $44$
A $B^+$ - tree index is to be built on the Name attribute of the relation STUDENT. Assume that all the student names are of length $8$ bytes, disk blocks are of size $512...
Kathleen
14.0k
views
Kathleen
asked
Sep 15, 2014
Databases
gatecse-2002
databases
b-tree
normal
ugcnetcse-june2012-paper2
+
–
31
votes
5
answers
26
GATE CSE 2002 | Question: 2.22
In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on the size of the blocks, and the size of the address of the blocks. the number of blocks used for the index, and the size of the blocks. the size of the blocks, the number of blocks used for the index, and the size of the address of the blocks. None of the above
In the index allocation scheme of blocks to a file, the maximum possible size of the file depends onthe size of the blocks, and the size of the address of the blocks.the ...
Kathleen
14.3k
views
Kathleen
asked
Sep 15, 2014
Operating System
gatecse-2002
operating-system
normal
file-system
+
–
44
votes
5
answers
27
GATE CSE 2002 | Question: 2.21
Which combination of the following features will suffice to characterize an OS as a multi-programmed OS? More than one program may be loaded into main memory at the same time for execution If a program waits for certain events such as I/O, another program is immediately scheduled ... is immediately scheduled for execution. (a) (a) and (b) (a) and (c) (a), (b) and (c)
Which combination of the following features will suffice to characterize an OS as a multi-programmed OS?More than one program may be loaded into main memory at the same t...
Kathleen
12.6k
views
Kathleen
asked
Sep 15, 2014
Operating System
gatecse-2002
operating-system
normal
process
+
–
28
votes
4
answers
28
GATE CSE 2002 | Question: 2.20
Dynamic linking can cause security concerns because Security is dynamic The path for searching dynamic libraries is not known till runtime Linking is insecure Cryptographic procedures are not available for dynamic linking
Dynamic linking can cause security concerns becauseSecurity is dynamicThe path for searching dynamic libraries is not known till runtimeLinking is insecureCryptographic p...
Kathleen
6.8k
views
Kathleen
asked
Sep 15, 2014
Operating System
gatecse-2002
operating-system
runtime-environment
easy
+
–
28
votes
6
answers
29
GATE CSE 2002 | Question: 2.19
To evaluate an expression without any embedded function calls One stack is enough Two stacks are needed As many stacks as the height of the expression tree are needed A Turing machine is needed in the general case
To evaluate an expression without any embedded function callsOne stack is enoughTwo stacks are neededAs many stacks as the height of the expression tree are neededA Turin...
Kathleen
9.8k
views
Kathleen
asked
Sep 15, 2014
Compiler Design
gatecse-2002
compiler-design
expression-evaluation
easy
+
–
35
votes
3
answers
30
GATE CSE 2002 | Question: 2.18
The C language is: A context free language A context sensitive language A regular language Parsable fully only by a Turing machine
The C language is:A context free languageA context sensitive languageA regular languageParsable fully only by a Turing machine
Kathleen
10.1k
views
Kathleen
asked
Sep 15, 2014
Programming in C
gatecse-2002
programming
programming-in-c
normal
+
–
Page:
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register