1
GATE CSE 2015 Set 1
Numerical
+2
-0
Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given:

45, 20, 90, 10, 50, 60, 80, 25, 70.

Assume that the initial position of the R/W head is on track 50. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts execution) is____________ tracks.
Your input ____
2
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
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 faults than LRU
3
GATE CSE 2015 Set 1
Numerical
+1
-0
The output of the following C program is__________.

void f1(int a, int b) { 
int c; 
c=a; a=b; b=c; 
}

void f2(int *a, int *b) { 
int c; 
c=*a; *a=*b; *b=c; 
}

int main(){ 
int a=4, b=5, c=6; 
f1(a,b); 
f2(&b, &c); 
printf(“%d”,c-a-b); 
}
Your input ____
4
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
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[4][3] = 
          {{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
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12