1
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
In a system, there are three types of resources: $$E, F$$ and $$G.$$ Four processes $${P_0},$$ $${P_1},$$ $${P_2}$$ and $${P_3}$$ execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max$$\left[ {{P_{2,}}F} \right]$$ is the maximum number of instances of $$F$$ that $${{P_{2,}}}$$ would require. The number of instances of the resources allocated to the various processes at any given state is given by a matrix named Allocation.

Consider a state of the system with the Allocation matrix as shown below, and in which $$3$$ instances of $$E$$ and $$3$$ instances of $$F$$ are the only resources available.

Allocation
E F G
P0 1 0 1
P1 1 1 2
P2 1 0 3
P3 2 0 0

Max
E F G
P0 4 3 1
P1 2 1 4
P2 1 3 3
P3 5 4 1

From the perspective of deadlock avoidance, which one of the following is true?

A
The system is in $$safe$$ state.
B
The system is not in $$safe$$ state, but would be $$safe$$ if one more instance of $$E$$ were available
C
The system is not in $$safe$$ state, but would be $$safe$$ if one more instance of $$F$$ were available
D
The system is not in $$safe$$ state, but would be $$safe$$ if one more instance of $$G$$ were available
2
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 ____
3
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)$$
4
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'
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