PREVIOUS YEAR SOLVED PAPERS - GATE 2017 Shift 1

61. Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks.
(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129) is repeated 10 times. The number of conflict misses experienced by the cache is __________.

  • Option : B
  • Explanation :
    A miss is not considered a conflict miss if the block is accessed for the first time.
    1st round: (2+2) misses
    2nd round: (4+4) misses
    ∴Total = 4 + (8 × 9) = 76 conflict misses
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


62. Consider the expression (a-1) * ((( b + c ) / 3 ) + d) Let X be the minimum number of registers required by an optimal code generation (without any register spill) algorithm for a load/store architecture in which
(i) only loads and store instructions can have memory operands and
(ii) arithmetic instructions can have only register or immediate operands.
The value of X is _____.

  • Option : A
  • Explanation :

    The given expression is (a-1) * ((( b + c ) / 3 ) + d)
    The optimal generated code is:
    Load R1, b       R1 ⟵ b
    Load R2, c       R2 ⟵ c
    ADD R1, R2      R1 ⟵ R1 + R2
    Div R1, 3       R1 ⟵ R1/3
    Load R2, d       R2 ⟵ d
    Add R1, R2       R1 ⟵ R1 + R2
    Load R2, a       R2 ⟵ a
    Sub R2, 1       R2 ⟵ R2 - 1
    Mul R2, R1       R2 ⟵ R2 * R1
    Hence minimum 2 registers required.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


63. The values of parameters for the Stop-and – Wait ARQ protocol are as given below:
Bit rate of the transmission channel = 1 Mbps
Propagation delay from sender to receiver = 0.75 ms
Time to process a frame = 0.25 ms
Number of bytes in the information frame = 1980
Number of bytes in the acknowledge frame = 20
Number of overhead bytes in the information frame = 20
Assume that there are no transmission errors. Then the transmission efficiency (expressed in percentage) of the Stop-and – Wait ARQ protocol for the above parameters is _____.

  • Option : A
  • Explanation :
    Given Data:
    B = 1Mbps
    Tproc = 0.25ms
    Tp = 0.75ms
    L = 1980 Bytes
    LOH = 20 Bytes
    LA = 20 Bytes
    Efficiency (η) = ?
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


64. A cache memory unit with capacity of N words and block size of B words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is ______ bits.

  • Option : A
  • Explanation :

    where T is the required length of TAG field
    ∴ T = 14
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


65. Consider a database that has the relation schema CR (StudentName, CourseName). An instance of the schema CR is as given below.

CR
Student NameCourse Name
SACA
SACB
SACC
SBCB
SBCC
SCCA
SCCB
SCCC
SDCA
SDCB
SDCC
SDCD
SECD
SECA
SECB
SFCA
SFCB
SFCC
The following query is made on the database.
T1 ← πCourseNameStudentName=’SA’(CR))
T2 ← CR ÷ T1
The number of rows in T2 is ________.

Note – Numerical Type question

  • Option : C
  • Explanation :
    Explanation: Result of T1:
    CA
    CB
    CC

    Result of T2 = CR/T1
    SA
    SC
    SD
    SF
    Total = 4
    Therefore, option C is correct

    Alternate Solution :
    The output of query T1 will be the courses enrolled by student SA i.e CA, CB, CC
    The output of query T2 will be the names of the students who enroll all the courses that are the output of query T1 (division operator) i.e CA, CB, CC
    From the table we can see that SA, SC, SD, SF have enrolled all the courses so the output of T2 will have 4 row
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
GATE 2017 Shift 1