GATE 2009
66 questions
MCQ 661-mark 24 · 2-mark 42
Questions 61–65 of 66
While opening a TCP connection, the initial sequence number is to be derived using a time-of-day (ToD) clock that keeps running even when the host is down. The low order 32 bits of the counter of the ToD clock is to be used for the initial sequence numbers. The clock counter increments once per millisecond. The maximum packet lifetime is given to be 64s.
Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase?
Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase?
Answer: (A)
The initial sequence number (ISN) of a new connection comes from the clock. A connection can be closed and opened again at once between the same hosts and ports, and packets of the old connection can stay in the network for up to the maximum packet lifetime, .
To avoid confusing old and new packets, the sequence numbers of a new connection must be used only after all old packets are dead, that is, after . So the ISN may move to a new value only once in every .
Rate
Answer: (A)
To avoid confusing old and new packets, the sequence numbers of a new connection must be used only after all old packets are dead, that is, after . So the ISN may move to a new value only once in every .
Rate
Answer: (A)
In the RSA public key cryptosystem, the private and public keys are (e,n) and
(d,n) respectively, where n=p*q and p and q are large primes. Besides, n is
public and p and q are private. Let M be an integer such that and
. Now consider the following equations.
I.
II. ed=1 mod n
III. ed=1 mod
IV.
Which of the above equations correctly represent RSA cryptosystem?
I.
II. ed=1 mod n
III. ed=1 mod
IV.
Which of the above equations correctly represent RSA cryptosystem?
Answer: (B)
In RSA, the sender encrypts with one key and the receiver decrypts with the other key. All the exponent work is done modulo , and and are chosen so that .
I is correct: and is the encryption and decryption.
II is wrong: is not the condition.
III is correct: for some integer . By Euler's theorem, , so decryption returns .
IV is wrong: the exponentiation is done modulo , not modulo . The number must stay secret, since it would let anyone find the private key.
So I and III are the correct equations.
Answer: (B)
I is correct: and is the encryption and decryption.
II is wrong: is not the condition.
III is correct: for some integer . By Euler's theorem, , so decryption returns .
IV is wrong: the exponentiation is done modulo , not modulo . The number must stay secret, since it would let anyone find the private key.
So I and III are the correct equations.
Answer: (B)
Consider the following statements about the cyclomatic complexity of the control flow graph of a program module. Which of these are TRUE?
I. The cyclomatic complexity of a module is equal to the maximum number of linearly independent circuits in the graph.
II. The cyclomatic complexity of a module is the number of decisions in the module plus one, where a decision is effectively any conditional statement in the module.
III. The cyclomatic complexity can also be used as a number of linearly independent paths that should be tested during path coverage testing.
I. The cyclomatic complexity of a module is equal to the maximum number of linearly independent circuits in the graph.
II. The cyclomatic complexity of a module is the number of decisions in the module plus one, where a decision is effectively any conditional statement in the module.
III. The cyclomatic complexity can also be used as a number of linearly independent paths that should be tested during path coverage testing.
Answer: (B)
For a control flow graph with E edges, N nodes and one connected component, McCabe's cyclomatic complexity is .
I is false. For the flow graph as it is, the number of linearly independent circuits is , not . equals the number of independent circuits only after an extra edge from the exit node back to the entry node is added to the graph, and that edge is not part of the flow graph itself.
II is true. For structured code, equals the number of decisions (conditional statements) plus one.
III is true. is the number of linearly independent paths through the module, so it is the number of test paths needed in basis path testing.
So II and III are true.
Answer: (B)
I is false. For the flow graph as it is, the number of linearly independent circuits is , not . equals the number of independent circuits only after an extra edge from the exit node back to the entry node is added to the graph, and that edge is not part of the flow graph itself.
II is true. For structured code, equals the number of decisions (conditional statements) plus one.
III is true. is the number of linearly independent paths through the module, so it is the number of test paths needed in basis path testing.
So II and III are true.
Answer: (B)
Which of the following statements are TRUE?
I. The context diagram should depict the system as a single bubble.
II. External entities should be identified clearly at all levels of DFDs.
III. Control information should not be represented in a DFD.
IV. A data store can be connected either to another data store or to an external entity.
I. The context diagram should depict the system as a single bubble.
II. External entities should be identified clearly at all levels of DFDs.
III. Control information should not be represented in a DFD.
IV. A data store can be connected either to another data store or to an external entity.
Answer: (C)
Check each statement:
I is true. The context diagram (level 0) shows the whole system as one bubble.
II is false. External entities are shown only in the context diagram; the lower-level DFDs do not repeat them.
III is true. A DFD shows only data flow. It does not show control information such as the order of steps or decisions.
IV is false. A data store is connected only to processes. Data does not move straight between two data stores or between a data store and an external entity.
Only I and III are true.
Answer: (C)
I is true. The context diagram (level 0) shows the whole system as one bubble.
II is false. External entities are shown only in the context diagram; the lower-level DFDs do not repeat them.
III is true. A DFD shows only data flow. It does not show control information such as the order of steps or decisions.
IV is false. A data store is connected only to processes. Data does not move straight between two data stores or between a data store and an external entity.
Only I and III are true.
Answer: (C)
The coupling between different modules of a software is categorized as follows:
I. Content coupling
II. Common coupling
III. Control coupling
IV Stamp coupling
V. Data coupling
Coupling between modules can be ranked in the order of strongest (least desirable) to weakest (most desirable) as follows:
I. Content coupling
II. Common coupling
III. Control coupling
IV Stamp coupling
V. Data coupling
Coupling between modules can be ranked in the order of strongest (least desirable) to weakest (most desirable) as follows:
Answer: (A)
Coupling is stronger when one module depends more on the inside of another. From strongest to weakest:
I. Content coupling: one module uses or changes the internal data or code of another.
II. Common coupling: modules share the same global data.
III. Control coupling: one module passes a flag that decides the logic of another.
IV. Stamp coupling: modules pass a whole data structure, though the receiver may use only part of it.
V. Data coupling: modules pass only the simple data items that are needed.
(External coupling, where modules share an external device or format, sits between common and control; it is not one of the five listed here.) So the order is I-II-III-IV-V. Option (B) is the reverse order, and (C) and (D) put the types in the wrong places.
Answer: (A)
I. Content coupling: one module uses or changes the internal data or code of another.
II. Common coupling: modules share the same global data.
III. Control coupling: one module passes a flag that decides the logic of another.
IV. Stamp coupling: modules pass a whole data structure, though the receiver may use only part of it.
V. Data coupling: modules pass only the simple data items that are needed.
(External coupling, where modules share an external device or format, sits between common and control; it is not one of the five listed here.) So the order is I-II-III-IV-V. Option (B) is the reverse order, and (C) and (D) put the types in the wrong places.
Answer: (A)