1
GATE CSE 2018
Numerical
+2
-0
Consider a storage disk with $$4$$ platters (numbered as $$0, 1, 2$$ and $$3$$), $$200$$ cylinders (numbered as $$0, 1,$$ … , $$199$$), and $$256$$ sectors per track (numbered as $$0, 1, … , 255$$). The following $$6$$ disk requests of the form [sector number, cylinder number, platter number] are received by the disk controller at the same time: $$[120, 72, 2] , [180, 134, 1] , [60, 20, 0] , [212, 86, 3] , [56, 116, 2] , [118, 16, 1]$$

Currently the head is positioned at sector number $$100$$ of cylinder $$80,$$ and is moving towards higher cylinder numbers. The average power dissipation in moving the head over $$100$$ cylinders is $$20$$ milliwatts and for reversing the direction of the head movement once is $$15$$ milliwatts. Power dissipation associated with rotational latency and switching of head between different platters is negligible.

The total power consumption in milliwatts to satisfy all of the above disk requests using the Shortest Seek Time First disk scheduling algorithm is _______.

Your input ____
2
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is $$M$$ units if the corresponding memory page is available in memory, and $$D$$ units if the memory access causes a page fault. It has been experimentally measured that the average time taken for a memory access in the process is $$X$$ units.

Which one of the following is the correct expression for the page fault rate experienced by the process?

A
$$\left( {D - M} \right)/\left( {X - M} \right)$$
B
$$\left( {X - M} \right)/\left( {D - M} \right)$$
C
$$\left( {D - X} \right)/\left( {D - M} \right)$$
D
$$\left( {X - M} \right)/\left( {D - X} \right)$$
3
GATE CSE 2018
MCQ (Single Correct Answer)
+1
-0.3
Consider the following C program.
#include< stdio.h >
struct Ournode{
 char x,y,z;
};
int main(){
 struct Ournode p = {'1', '0', 'a'+2};
 struct Ournode *q = &p;
 printf ("%c, %c", *((char*)q+1), *((char*)q+2));
 return 0;
}
The output of this program is:
A
0, c
B
0, a+2
C
'0', 'a+2'
D
'0', 'c'
4
GATE CSE 2018
Numerical
+1
-0
Consider the following C program:
#include < stdio.h >
  int counter = 0;
  int calc (int a, int b) {
  int c;
  counter++;
  if (b==3) return (a*a*a);
  else {
    c = calc(a, b/3);
    return (c*c*c);
 }
}
int main (){
  calc(4, 81);
  printf ("%d", counter);
}
The output of this program is _____.
Your input ____
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12