1
GATE CSE 2015 Set 2
Numerical
+2
-0
A computer system implements $$8$$ kilobyte pages and a $$32$$-bit physical address space. Each page table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the maximum size of the page table of a process is $$24$$ megabytes, the length of the virtual address supported by the system is _______________ bits.
Your input ____
2
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+2
-0.6
Consider six memory partitions of sizes $$200$$ $$KB,$$ $$400$$ $$KB,$$ $$600$$ $$KB,$$ $$500$$ $$KB,$$ $$300$$ $$KB$$ and $$250$$ $$KB,$$ where $$KB$$ refers to kilobyte. These partitions need to be allotted to four processes of sizes $$357$$ $$KB,$$ $$210$$ $$KB,$$ $$468$$ $$KB$$ and $$491$$ $$KB$$ in that order. If the best fit algorithm is used, which partitions are NOT allotted to any process?
A
$$200$$ $$KB$$ and $$300$$ $$KB$$
B
$$200$$ $$KB$$ and $$250$$ $$KB$$
C
$$250$$ $$KB$$ and $$300$$ $$KB$$
D
$$300$$ $$KB$$ and $$400$$ $$KB$$
3
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+1
-0.3
A system has 6 identical resources and N processes competing for them. Each process can request atmost 2 resources. Which one of the following values of N could lead to a deadlock?
A
1
B
2
C
3
D
6
4
GATE CSE 2015 Set 2
Numerical
+2
-0
Consider the C program below.
#include < stdio.h >
int *A, stkTop;
int stkFunc(int opcode, int val)
{
     static int size=0, stkTop=0;
     switch (opcode) {
         case -1: size = val; break;
         case 0: if (stkTop < size) A[stkTop++] = val; break;
         default: if (stkTop) return A[--stkTop];
     }
     return -1;
}
int main()
{
     int B[20]; A = B; stkTop = -1;
     stkFunc (-1, 10);
     stkFunc ( 0, 5);
     stkFunc ( 0, 10);
     printf ("%d\n", stkFunc(1, 0) + stkFunc(1, 0));
}
The value printed by the above program is __________.
Your input ____