Consider a binary tree T that has 200 leaf nodes. Then, the number of nodes in T that have exactly
two children are ________.
Data Structures
GATE 2015 SET3
Binary-Trees
Given a hash table T with 25 slots that stores 2000 elements, the load factor α for T is
____________.
Data Structures
GATE 2015 SET3
Hashing
Consider the following relation
Cinema(theater, address, capacity)
Which of the following options will be needed at the end of the SQL query
SELECT P1.address
FROM Cinema P1
such that it always finds the addresses of theaters with maximum capacity?
WHERE P1.capacity >= All (select P2.capacity from Cinema P2)
WHERE P1.capacity >= Any (select P2.capacity from Cinema P2)
WHERE P1.capacity > All (select max(P2.capacity) from Cinema P2)
WHERE P1.capacity > Any (select max(P2.capacity) from Cinema P2)
GATE 2015 SET3
The proposed solution prevents deadlock but fails to guarantee mutual exclusion
The proposed solution guarantees mutual exclusion but fails to prevent deadlock
The proposed solution guarantees mutual exclusion and prevents deadlock
The proposed solution fails to prevent deadlock and fails to guarantee mutual exclusion
operating systems
GATE 2015 SET3
Computer Networks
GATE 2015 SET3
Consider the following policies for preventing deadlock in a system with mutually exclusive
resources.
I. Processes should acquire all their resources at the beginning of execution. If any resource is
not available, all resources acquired so far are released
II. The resources are numbered uniquely, and processes are allowed to request for resources
only in increasing resource numbers
III. The resources are numbered uniquely, and processes are allowed to request for resources
only in decreasing resource numbers
IV. The resources are numbered uniquely. A process is allowed to request only for a resource
with resource number larger than its currently held resources
Which of the above policies can be used for preventing deadlock?
Any one of I and III but not II or IV
Any one of I, III, and IV but not II
Any one of II and III but not I or IV
Any one of I, II, III, and IV
operating systems
GATE 2015 SET3
In the network 200.10.11.144/27, the fourth octet (in decimal) of the last IP address of the network
which can be assigned to a host is ____________.
Computer Networks
GATE 2015 SET3
Computer Networks
GATE 2015 SET3
computer organization
GATE 2015 SET3
Non-preemptive Shortest Job First
Round Robin with Quantum value two
operating systems
GATE 2015 SET3
Consider the statement
“Not all that glitters is gold”
Predicate glitters(x) is true if x glitters and predicate gold(x) is true if x is gold. Which one of the following logical formulae represents the above statement?
GATE 2014 SET 1
Let G=(V,E) be a directed graph where V is the set of vertices and E the set of edges. Then which one of the following graphs has the same strongly connected components as G ?
GATE 2014 SET 1
Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time on Depth First Search of G? Assume that the graph is represented using adjacency matrix.
Data Structures
GATE 2014 SET 1
Graphs
Consider a rooted Binary tree represented using pointers. The best upper bound on the time required to determine the number of subtrees having having exactly 4 nodes O(na Logn b). Then the value of a + 10b is ________
Data Structures
GATE 2014 SET 1
Time-Complexity
Consider the directed graph given below.
Which one of the following is TRUE?
The graph does not have any topological ordering
Both PQRS and SRQP are topological orderings
Both PSRQ and SPRQ are topological orderings.
PSRQ is the only topological ordering.
Data Structures
GATE 2014 SET 1
Graphs
Let P be a QuickSort Program to sort numbers in ascending order using the first element as pivot. Let t1 and t2 be the number of comparisons made by P for the inputs {1, 2, 3, 4, 5} and {4, 1, 5, 3, 2} respectively. Which one of the following holds?
Data Structures
GATE 2014 SET 1
Quick-Sort
A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of
which is 32 bits long. It needs to support 45 instructions, which have an immediate operand
in addition to two register operands. Assuming that the immediate operand is an unsigned
integer, the maximum value of the immediate operand is ____________.
computer organization
GATE 2014 SET 1
Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________ number of requests.
operating systems
GATE 2014 SET 1
Which one of the following is FALSE?
User level threads are not scheduled by the kernel.
When a user level thread is blocked, all other threads of its process are blocked.
Context switching between user level threads is faster than context switching between kernel level threads.
Kernel level threads cannot share the code segment
operating systems
GATE 2014 SET 1
Given the following statements:
S1: A foreign key declaration can always
be replaced by an equivalent check
assertion in SQL.
S2: Given the table R(a,b,c) where a and
b together form the primary key, the
following is a valid table definition.
CREATE TABLE S (
a INTEGER,
d INTEGER,
e INTEGER,
PRIMARY KEY (d),
FOREIGN KEY (a) references R)
Which one of the following statements is CORRECT?
S1 is TRUE and S2 is FALSE.
S1 is FALSE and S2 is TRUE.
Both S1 and S2 are FALSE.
GATE 2014 SET 1