Javatpoint Logo
Javatpoint Logo

GATE 2018 CS Set 3

49) Consider the minterm list form of a Boolean function F given below.

F(P, Q, R, S) = ∑ m(0, 2, 5, 7, 9, 11) + d(3, 8, 10, 12, 14)

Here, m denotes a minterm and d denotes a don't care term. The number of essential prime implicants of the function F is ______.

  1. 4
  2. 1
  3. 2
  4. 3

Answer: D

Explanation:

Essential Prime Implicant: A prime implicant is that which cannot be replaced by any other implicant for getting the output. So, the essential prime implicants getting the output that no other combination of other prime implicants can.

GATE CS Set 3

Here, we have three prime implicants A'BD, AB' and B'D' and all of them are essential.

         

A'BD + AB' + B'D'

Therefore, the number of essential prime implicants of fthe unction F is 3.


50) The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Writeback (WB). The IF, ID, OF and WB stages take 1 clock cycle each for every instruction. Consider a sequence of 100 instructions. In the PO stage, 40 instructions take 3 clock cycles each, 35 instructions take 2 clock cycles each, and the remaining 25 instructions take 1 clock cycle each. Assume that there are no data hazards and no control hazards.

The number of clock cycles required for completion of execution of the sequence of instructions is ______.

  1. 219
  2. 220
  3. 229
  4. 224

Answer: A

Explanation:

Given,

Total Instruction = 100
Number of stages = 5

Since, if n instructions take c cycle, so (c-1) stalls will occur for these instructions.
In general case ,Total number of cycles required = 100 + 5 - 1 = 104 cycles

ATQ, In PO stage:
40 instruction takes 3 cycles i.e. these instructions suffering from 2 stall cycle,
35 instruction takes 2 cycles i.e. these instructions suffering from 1 stall cycle,
25 instruction takes 1 cycles i.e. these instructions suffering from 0 stall cycle,

Therefore, the number of clock cycles required
= Total number of cycles required in general case + Extra cycles required (here, in PO stage)
= 104 + 40 * (3-1) + 35 * (2-1) + 20 * (1-1)
= 104 + 40 * 2 + 35 * 1 + 20 * 0
= 104 + 115
= 219 cycles

So, option (A) is the correct answer.


51) A processor has 16 integer registers (R0, R1, .. , R15) and 64 floating point registers (F0, F1,... , F63). It uses a 2-byte instruction format. There are four categories of instructions: Type-1, Type-2, Type-3, and Type-4. Type-1 category consists of four instructions, each with 3 integer register operands (3Rs). Type-2 category consists of eight instructions, each with 2 floating point register operands (2Fs). Type-3 category consists of fourteen instructions, each with one integer register operand and one floating point register operand (1R+1F). Type-4 category consists of N instructions, each with a floating point register operand (1F).

The maximum value of N is __________.

  1. 32
  2. 34
  3. 30
  4. 36

Answer: A

Explanation:

Given,

2-byte instruction format. Therefore, total number of instruction encodings =216

No. of bits in integer operand (16 integer registers) = log216 =4.

No. of bits in floating point operand (64 floating point registers) = log264 = 6.

No. of encodings consumed by.
    Type 1 instructions = 4×23×4 = 214.
    Type 2 instructions = 8×22×6 = 215.
    Type 3 instructions = 14×2(4+6) = 14336.

No. of encodings left for Type 4 instructions = 216 -(214 + 215 + 14336) = 2048.

Therefore, total no. of different instructions of Type 4 = 2048 / 64 = 32.

Hence, option (A) is the correct answer.


52) Given a language L, define Li as follows:

        L0 = {ε}
     Li = Li-1 * L for all i > 0

The order of a language L is defined as the smallest k such that Lk = Lk+1 .

Consider the language L1 (over alphabet 0) accepted by the following automaton.

GATE CS Set 3

The order of L1 is _____.

  1. -2
  2. 1
  3. 2
  4. None

Answer: C

Explanation:

L1 = {ϵ + 0(00)*}

Given,

language L, now we have to find the order of it.
L0 = {ϵ}
L1 = L0 .L = {ϵ}.{ϵ + 0(00)*} = {ϵ + 0(00)*}

L2 = L1 .L = {ϵ + 0(00)*}.{ϵ + 0(00)*}
     = {ϵ + 0(00)* + 0(00) 0(00)*}
     = {0*}

L3 = L2 .L = {0*}.{ϵ + 0(00)*}
   = {0* + 0* 0(00)*}
     = {0*}

Hence, the order of L is 2 such that L2 = L2 +1


53) 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 _______.

  1. 80
  2. 85
  3. 87
  4. 88

Answer: B

Explanation:

According to question disk requests are in the form of [sector no, cylinder no, platter no].
Cylinder Queue: 72,134,20,86,116,16
Head starts at: 80

GATE CS Set 3

Shortest Seek Time First (SSTF) Disk Scheduling algorithm --> It selects the disk request which has minimum seek time first from the current head position.

Therefore,
         Total Head movements in SSTF = (86-80) + (86-72) + (134-72) + (134-16) = 200

We know that,
         Power dissipated in moving 100 cylinder = 20mW
         So, Power dissipated in 200 movements --> P1 = 0.2 * 200 = 40 mW
         Power dissipated in reversing head direction once = 15 mW
         Number of time Head changes its direction = 3

         

Power dissipated in reversing head direction: P2 = 3 * 15 = 45 mW

Hence,
         Total power consumption (in mW) is P1 + P2 = 40 mW + 45 mW = 85 mW

So, Option (B) is the correct answer.


54) Consider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header and a 40-byte TCP header. The packet is forwarded to an IPv4 router that supports a Maximum Transmission Unit (MTU) of 600 bytes. Assume that the length of the IP header in all the outgoing fragments of this packet is 20 bytes. Assume that the fragmentation offset value stored in the first fragment is 0.

The fragmentation offset value stored in the third fragment is _______.

  1. 72
  2. 142
  3. 144
  4. None

Answer: C

Explanation:

Given,
Maximum Transmission Unit(MTU) = 600 Bytes
IP Header = 20 Bytes
Maximum Transmission Unit(MTU) Payload = 600 Bytes ? 20 Bytes = 580 Bytes
As we know that fragment size should be multiple of 8 so nearest number to 580 is 576
Therefore, MTU payload or fragment size = 576 Bytes

We know,
Kth fragmentation offset value = Fragment Size * (Kth fragment - 1) / Scaling Factor
Offset value of 3rd fragment = 576 * (3 - 1) / 8 = 144


55) Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following carrier-sense based medium access protocol. A node that receives a packet to transmit will carrier-sense the medium for 5 units of time. If the node does not detect any other transmission in this duration, it starts transmitting its packet in the next time unit. If the node detects another transmission, it waits until this other transmission finishes, and then begins to carrier-sense for 5 time units again. Once they start to transmit, nodes do not perform any collision detection and continue transmission even if a collision occurs. All transmissions last for 20 units of time. Assume that the transmission signal travels at the speed of 10 meters per unit time in the medium.

Assume that the system has two nodes P and Q, located at a distance d meters from each other. P starts transmitting a packet at time t=0 after successfully completing its carrier-sense phase. Node Q has a packet to transmit at time t=0 and begins to carrier-sense the medium.

The maximum distance d (in meters, rounded to the closest integer) that allows Q to successfully avoid a collision between its proposed transmission and P's ongoing transmission is _____.

  1. 52
  2. 60
  3. 55
  4. 50

Answer:D

Explanation:

Given, Signal speed --> 10 meter/time.

Now,
   A node which receives the packet to transmit will carrier-sense the medium for five units of time.

Any packet that arrives in 5 units of time will be sensed and always keep the channel busy.

Therefore,
   the packet can travel in maximum = 5 * 10 = 50 meters, Which allow Q to avoid the collision successfully.

So, option (D) is the correct answer.


56) "From where are they bringing their books? _________ bringing _________ books from _________." The words that best fill the blanks in the above sentence are

  1. Their, they're, there
  2. They're, their, there
  3. There, their, they're
  4. They're, there,there

Answer: B

Explanation:

From where are they bringing their books? Who bringing Whose books from Where.

Who = They are
Whose = their
Where = there


GATE 2018 CS Set 3-1
GATE 2018 CS Set 3-2
GATE 2018 CS Set 3-3
GATE 2018 CS Set 3-4
GATE 2018 CS Set 3-5
GATE 2018 CS Set 3-6
GATE 2018 CS Set 3-8
GATE Introduction





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA