Question 1
A thread is usually defined as a "light weight process" because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the following is TRUE?
On per-thread basis, the OS maintains only CPU register state
The OS does not maintain a separate stack for each thread
On per-thread basis, the OS does not maintain virtual memory state
On per-thread basis, the OS maintains only scheduling and accounting information
Question 2
The time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?
t1 > t2
t1 = t2
t1 < t2
nothing can be said about the relation between t1 and t2
Question 3
Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 10^6 memory accesses, what is the effective access time for the memory?
21ns
30ns
23ns
35ns
Question 4
An application loads 100 libraries at start-up. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm. If all 100 libraries are loaded from random locations on the disk, how long does it take to load all libraries? (The time to transfer data from the disk block once the head has been positioned at the start of the block may be neglected)
0.50 s
1.50 s
1.25 s
1.00 s
Question 5
A computer handles several interrupt sources of which the following are relevant for this question.
. Interrupt from CPU temperature sensor (raises interrupt if
CPU temperature is too high)
. Interrupt from Mouse(raises interrupt if the mouse is moved
or a button is pressed)
. Interrupt from Keyboard(raises interrupt when a key is
pressed or released)
. Interrupt from Hard Disk(raises interrupt when a disk
read is completed)
Which one of these will be handled at the HIGHEST priority?
Interrupt from Hard Disk
Interrupt from Mouse
Interrupt from Keyboard
Interrupt from CPU temperature sensor
Question 6
Consider the same recursive C++ function that takes two arguments
unsigned int foo(unsigned int n, unsigned int r)
{
if (n > 0)
return (n % r + foo(n / r, r));
else
return 0;
}
unsigned int foo(unsigned int n, unsigned int r) {
if (n > 0)
return (n % r + foo(n / r, r));
else
return 0;
}
public class Main {
public static int foo(int n, int r) {
if (n > 0)
return (n % r + foo(n / r, r));
else
return 0;
}
}
def foo(n, r):
if n > 0:
return (n % r + foo(n // r, r))
else:
return 0
function foo(n, r) {
if (n > 0)
return (n % r + foo(Math.floor(n / r), r));
else
return 0;
}
What is the return value of the function foo when it is called as foo(513, 2)?
9
8
5
2
Question 7
Consider the following recursive C++ function that takes two arguments
unsigned int foo(unsigned int n, unsigned int r) {
if (n > 0) return (n%r + foo (n/r, r ));
else return 0;
}
unsigned int foo(unsigned int n, unsigned int r) {
if (n > 0) return (n % r + foo(n / r, r));
else return 0;
}
public class Main {
public static int foo(int n, int r) {
if (n > 0) return (n % r + foo(n / r, r));
else return 0;
}
}
def foo(n, r):
if n > 0:
return (n % r + foo(n // r, r))
else:
return 0
function foo(n, r) {
if (n > 0) return (n % r + foo(Math.floor(n / r), r));
else return 0;
}
What is the return value of the function foo when it is called foo(345, 10)?
345
12
5
3
Question 8
The following is the comment written for a C function.
/* This function computes the roots of a quadratic equation
a.x^2 + b.x + c = . The function stores two real roots
in *root1 and *root2 and returns the status of validity
of roots. It handles four different kinds of cases.
(i) When coefficient a is zero irrespective of discriminant
(ii) When discriminant is positive
(iii) When discriminant is zero
(iv) When discriminant is negative.
Only in case (ii) and (iii) the stored roots are valid.
Otherwise 0 is stored in roots. The function returns
0 when the roots are valid and -1 otherwise.
The function also ensures root1 >= root2
int get_QuadRoots( float a, float b, float c,
float *root1, float *root2);
*/
A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.

Which one of the following option provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?
T1,T2,T3,T6
T1,T3,T4,T5
T2,T4,T5,T6
T2,T3,T4,T5
Question 9
An undirected graph G(V, E) contains n ( n > 2 ) nodes named v1 , v2 ,….vn. Two nodes vi , vj are connected if and only if 0 < |i – j| <= 2. Each edge (vi, vj ) is assigned a weight i + j. A sample graph with n = 4 is shown below.
What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?
1/12(11n^2 – 5n)
n^2 – n + 1
6n – 11
2n + 1
Question 10
Consider the same data as given in previous question. After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, infinite. After the NEXT ROUND of update, what will be cost to N1 in the distance vector of N3?
3
9
10
Infinite
There are 65 questions to complete.