GATE 2015 (Session 3) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2015 (Session 3)

65 questions

MCQ 45 · NAT 201-mark 30 · 2-mark 35

Questions 31–35 of 65

Q31Process Synchronization1 markMCQ−0.33 if wrong
Two processes X and Y need to access a critical section. Consider the following synchronization construct used by both the processes
Process X                         Process Y

/* other code for process X */    /* other code for process Y */
while(true)                       while(true)
{                                 {
   varP = true;                      varQ = true;
   while(varQ == true)               while(varP == true)
        {                                 {
       /* Critical  Section  */          /* Critical  Section  */
              varP =  false;                    varQ =  false;
         }                                 }
}                                 }
/* other code for process X */    /* other code for process Y */

Here, varP and varQ are shared variables and both are initialized to false. Which one of the following statements is true?

Q32Finite Automata1 markMCQ−0.33 if wrong
Let L be the language represented by the regular expression Σ∗0011Σ∗\Sigma ^{*}0011\Sigma ^{*} where Σ\Sigma={0,1}. What is the minimum number of states in a DFA that recognizes Lˉ\bar{L} (complement of L)?

Q33Software Engineering1 markNAT
Consider a software program that is artificially seeded with 100 faults. While testing this program, 159 faults are detected, out of which 75 faults are from those artificially seeded faults. Assuming that both real and seeded faults are of same nature and have same distribution, the estimated number of undetected real faults is ________.

Q34Cache Memory1 markMCQ−0.33 if wrong
Consider a machine with a byte addressable main memory of 2202^{20} bytes, block size of 16 bytes and a direct mapped cache having 2122^{12} cache lines. Let the addresses of two consecutive bytes in main memory be (E201F)16(E201F)_{16} and (E2020)16(E2020)_{16}. What are the tag and cache line address (in hex) for main memory address (E201F)16(E201F)_{16}?