GATE Computer Engineering online test 2
by Esha Upadhyay · Published · Updated
Quizsummary
of 17 questions completed
Questions:
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
Information
Click on Start Quiz button to take the Online test. Below are some articles to help you prepare for GATE exams.
Mobile App
You can install GATE Mobile App for unlimited online tests with answers.
Exam Details
Read my article on GATE exams for details of exam (eligibility criteria, format etc) and also post your questions or doubts.
Online tests and Books
My article on GATE Computer Science and Information Technology provides details to crack the exam with ease ( free Online tests, recommended books, detailed syllabus).
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
of 17 questions answered correctly
Your time:
Time has elapsed
You have reached of points, ()
Average score 

Your score 

Categories
 Not categorized 0%
Pos.  Name  Entered on  Points  Result 

Table is loading  
No data available  
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 Answered
 Review

Question 1 of 17
1. Question
Consider the following transactions with data items P and Q initialized to zero:
T1 :read (P);
read (Q);
if P = 0 then Q := Q + 1 ;
write (Q).
T2 : read (Q);
read (P);
if Q = 0 then P := P + 1 ;
write (P).
Any nonserial interleaving of T1 and T2 for concurrent execution leads toCorrect
Incorrect

Question 2 of 17
2. Question
Consider the 3 processes, P1, P2 and P3 shown in the table.Process Arrival time Time Units Required
P1 0 5
P2 1 7
P3 3 4
The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) areCorrect
Incorrect

Question 3 of 17
3. Question
Fetch_And_Add(X,i) is an atomic ReadModifyWrite instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busywait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any nonzero value corresponds to the lock being not available.
AcquireLock(L){
while (Fetch_And_Add(L,1))
L = 1;
}
ReleaseLock(L){
L = 0;
}
This implementationCorrect
Incorrect

Question 4 of 17
4. Question
Suppose a fair sixsided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a second time. What is the probability that the sum total of values that turn up is at least 6?
Correct
Incorrect

Question 5 of 17
5. Question
An Internet Service Provider (ISP) has the following chunk of CIDRbased IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
Correct
Incorrect

Question 6 of 17
6. Question
Suppose a circular queue of capacity (n ā1) elements is implemented with an array of n elements.Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
Correct
Incorrect

Question 7 of 17
7. Question
How many onto (or surjective) functions are there from an nelement (n >= 2) set to a 2element set?
Correct
Incorrect

Question 8 of 17
8. Question
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
Correct
Incorrect

Question 9 of 17
9. Question
Consider the virtual page reference string
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. ThenCorrect
Incorrect

Question 10 of 17
10. Question
Suppose you break a stick of unit length at a point chosen uniformly at random.Then the expected length of shorter stick is
Correct
Incorrect

Question 11 of 17
11. Question
Consider the following system of equations:
3x + 2y = 1
4x + 7z = 1
x + y + z = 3
x ā 2y + 7z = 0
The number of solutions for this system isCorrect
Incorrect

Question 12 of 17
12. Question
The value of the dot product of the eigen vectors corresponding to any pair of different eigenvalues of a 4by4 symmetric positive definite matrix is
Correct
Incorrect

Question 13 of 17
13. Question
The base (or radix) of the number system such that the following equation holds is
312 / 20 = 13.1
Correct
Incorrect

Question 14 of 17
14. Question
A machine has a 32bit architecture, with 1word 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
Correct
Incorrect

Question 15 of 17
15. Question
Consider the following program in C language:
#include
main()
{
int i;
int *pi = &i;
scanf(ā%dā,pi);
printf(ā%d\nā, i+5);
}
Which one of the following statements is TRUE?Correct
Incorrect

Question 16 of 17
16. Question
Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time of Depth first search on G when G is represented as an adjacency matrix?
Correct
Incorrect

Question 17 of 17
17. Question
Let P be a quick sort program to sort numbers in ascending order using the first element as the pivot.Let t1 and t2 be the comparisons made by P for the inputs [1 2 3 4 5] and [4 1 5 3 2] respectively.Which of the following holds?
Correct
Incorrect
Leave a Reply