CS and IT GATE 2015 Set-1 Questions with Answer

Ques 53 Operating System


The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.

P1()
{
    C = B – 1;
    B = 2*C;
}

P2()
{
    D = 2 * B;
    B = D - 1;
}

The number of distinct values that B can possibly take after the execution is


a is the correct answer.


Ques 54 Operating Systems


Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of T1, T2 and T3 requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1st millisecond and task preemptions are allowed, the first instance of T3 completes its execution at the end of _______ milliseconds.



Ques 55 Operating Systems


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 contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is _______.



Ques 56 Operating Systems


Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?

A

Both incur the same number of page faults.

B

FIFO incurs 2 more page faults than LRU.

C

LRU incurs 2 more page faults than FIFO.

D

FIFO incurs 1 more page fault than LRU.



Ques 57 Programming and Data Structures


What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory.
int main() {
unsigned int x = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}};
printf("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3);
}

A

2036, 2036, 2036

B

2012, 4, 2204

C

2036, 10, 10

D

2012, 4, 6



Ques 58 Programming and Data Structures


Consider the following pseudo code, where x and y are positive integers.

The post condition that needs to be satisfied after the program terminates is

A

{r = qx + y ∧ r < y}

B

{x = qy + r ∧ r < y}

C

{y = qx + r ∧ 0 < r < y}

D

{q + 1 < r - y ∧ y > 0}



Ques 59 Reasoning


Based on the given statements, select the most appropriate option to solve the given question.
If two floors in a certain building are 9 feet apart, how many steps are there in a set of stairs that extends from the first floor to the second floor of the building?
Statements:
(I) Each step is 3/4 foot high.
(II) Each step is 1 foot wide.

A

Statement I alone is sufficient, but statement II alone is not sufficient.

B

Statement II alone is sufficient, but statement I alone is not sufficient.

C

Both statements together are sufficient, but neither statement alone is sufficient.

D

Statement I and II together are not sufficient.



Ques 60 Reasoning


The given statement is followed by some courses of action. Assuming the statement to be true, decide the correct option.
Statement: There has been a significant drop in the water level in the lakes supplying water to the city.
Course of action:
(I) The water supply authority should impose a partial cut in supply to tackle the situation.
(II) The government should appeal to all the residents through mass media for minimal use of water.
(III) The government should ban the water supply in lower areas.

A

Statements I and II follow.

B

Statements I and III follow.

C

Statements II and III follow.

D

All statements follow.



Ques 61 Reasoning


The pie chart below has the breakup of the number of students from different departments in an engineering college for the year 2012. The proportion of male to female students in each department is 5:4. There are 40 males in Electrical Engineering. What is the difference between the numbers of female students in the Civil department and the female students in the Mechanical department?



Ques 62 Software Engineering


Match the following:

A

P-ii, Q-iii, R-i, S-iv

B

P-iii, Q-iv, R-ii, S-i

C

P-iii, Q-i, R-iv, S-ii

D

P-iii, Q-i, R-ii, S-iv



Ques 63 Software Engineering


Consider the following C program segment.

The cyclomatic complexity of the program segment is _______.



Ques 64 Theory of Computation


Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M) ∩ L(N) is _______.



Ques 65 Theory of Computation


Consider the NPDA < Q = {q0, q1, q2}, Σ = {0, 1}, Γ = {0, 1, ⊥}, δ, q0, ⊥, F = {q2} >, where (as per usual convention) Q is the set of states, Σ is the input alphabet, Γ is the stack alphabet, δ is the state transition function, q0 is the initial state, ⊥ is the initial stack symbol, and F is the set of accepting states. The state transition is as follows:

Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?

A

10110

B

10010

C

01010

D

01001



Unique Visitor Count

Total Unique Visitors

Loading......