GATE CS 2011
Question 1 |
In a compiler, keywords of a language are recognized during
parsing of the program | |
the code generation | |
the lexical analysis of the program | |
dataflow analysis |
Discuss it
Question 1 Explanation:
Lexical analysis is the process of converting a sequence of characters into a sequence of tokens. A token can be a keyword.
Question 2 |
A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT
block entire HTTP traffic during 9:00PM and 5 :0OAM | |
block all ICMP traffic | |
stop incoming traffic from a specific IP address but allow outgoing traffic to the same IP address | |
block TCP traffic from a specific user on a multi-user system during 9:00PM and 5:00AM |
Discuss it
Question 2 Explanation:
A.Can Block entire HTTP traffic by blocking TCP port 80 and it is possible because it is L4 firewall.
D) As it is L4 firewall can not block packets based on user identity because it is the responsibility of Application layer
Question 3 |
If two fair coins are flipped and at least one of the outcomes is known to be a head, what is the probability that both outcomes are heads?
1/3 | |
1/4 | |
1/2 | |
2/3 |
Discuss it
Question 3 Explanation:
Since we know one outcome is head, there are only three possibilities {h, t}, {h, h}, {t, h}
The probability of both heads = 1/3
Question 4 |
Consider different activities related to email:
m1: Send an email from a mail client to a mail server m2: Download an email from mailbox server to a mail client m3: Checking email in a web browserWhich is the application level protocol used in each activity?
m1: HTTP m2: SMTP m3: POP | |
m1: SMTP m2: FTP m3: HTTP | |
m1: SMTP m2: POP m3: HTTP | |
m1: POP m2: SMTP m3: IMAP |
Discuss it
Question 4 Explanation:
Simple Mail Transfer Protocol (SMTP) is typically used by user clients for sending mails.
Post Office Protocol (POP) is used by clients for receiving mails.
Checking mails in web browser is a simple HTTP process.
Option (C) is correct.
Question 5 |
A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with Ll. The product will have to be maintained for five years. Various parameters for the company are given in the table below.
Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2?
Parameter | Language L1 | Language L2 |
Man years needed for development | LOC/10000 | LOC/10000 |
Development cost per man year | Rs. 10,00,000 | Rs. 7,50,000 |
Maintenance time | 5 years | 5 years |
Cost of maintenance per year | Rs. 1,00,000 | Rs. 50,000 |
4000 | |
5000 | |
4333 | |
4667 |
Discuss it
Question 5 Explanation:
Let LOC of L1=x, so LOC of L2=2x
Now,
(x/10000)*1000000 + 5*100000 = (2x/10000)*750000 + 5*50000
Solving for x, we get x =5000
Source: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html
Question 6 |
The time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2.
Which of the following is TRUE?
t1 > t2 | |
t1 = t2 | |
t1 < t2 | |
nothing can be said about the relation between t1 and t2 |
Discuss it
Question 6 Explanation:
Process switches or Context switches can occur in only kernel mode . So for process switches first we have to move from user to kernel mode . Then we have to save the PCB of the process from which we are taking off CPU and then we have to load PCB of the required process . At switching from kernel to user mode is done. But switching from user to kernel mode is a very fast operation(OS has to just change single bit at hardware level)
Thus T1< T2
This explanation has been contributed by Abhishek Kumar.
Question 7 |
A company needs to develop digital signal processing software for one of its newest inventions. The software is expected to have 40000 lines of code. The company needs to determine the effort in person-months needed to develop this software using the basic COCOMO model. The multiplicative factor for this model is given as 2.8 for the software development on embedded systems, while the exponentiation factor is given as 1.20. What is the estimated effort in person-months?
234.25 | |
932.50 | |
287.80 | |
122.40 |
Discuss it
Question 7 Explanation:
In the Constructive Cost Model (COCOMO), following is formula for effort applied
Effort Applied (E) = ab(KLOC)bb [ person-months ] = 2.8 x(40)1.20 = 2.8 x 83.65 = 234.25
Question 8 |
Which one of the following is NOT desired in a good Software Requirement Specifications (SRS) document?
Functional Requirements | |
Non-Functional Requirements | |
Goals of Implementation | |
Algorithms for Software Implementation |
Discuss it
Question 8 Explanation:
The software requirements specification document is a requirements specification for a software system, is a complete description of the behavior of a system to be developed and may include a set of use cases that describe interactions the users will have with the software. In addition it also contains non-functional requirements. Non-functional requirements impose constraints on the design or implementation (such as performance engineering requirements, quality standards, or design constraints) (Source: Wiki)
An SRS document should clearly document the following aspects of a system: Functional Requirements, Non-Functional Requirements and Goals of implementation (Source: Fundamentals of Software Engineering by Rajib Mall)
Question 9 |
Which of the following pairs have DIFFERENT expressive power?
Deterministic finite automata(DFA) and Non-deterministic finite automata(NFA) | |
Deterministic push down automata(DPDA)and Non-deterministic push down automata(NPDA) | |
Deterministic single-tape Turing machine and Non-deterministic single-tape Turing machine | |
Single-tape Turing machine and multi-tape Turing machine |
Discuss it
Question 9 Explanation:
NDPDA can handle languages or grammars with ambiguity, but DPDA cannot handle languages with ambiguity and any context-free grammar.
Question 10 |
HTML(Hypertext Markup Language) has language elements which permit certain actions other than describing the structure of the web document. Which one of the following actions is NOT supported by pure HTML (without any server or client side scripting)pages?
Embed web objects from different sites into the same page | |
Refresh the page automatically after a specified interval | |
Automatically redirect to another page upon download | |
Display the client time as part of the page |
Discuss it
Question 10 Explanation:
There are 65 questions to complete.