search
Log In

Answers by Dharmendra Verma

1 vote
1
Consider the following synchronization construct used by the processes P1, P2 and P3. The S1, S2 and S3 are counting semaphore variables: S1 = 3, S2 = 2, S3 = 1; P (S1); P (S2); P (S3); Critical section V (S3); V (S2); V (S1) ... but not mutual exclusion. C It satisfies mutual exclusion and bounded waiting but not progress. D It satisfies all the mutual exclusion, progress and bounded waiting.
answered Dec 19, 2018 in Operating System 374 views
0 votes
2
Please draw the GANTT CHART
answered Dec 19, 2018 in Operating System 55 views
0 votes
3
what is meant by reusing machine independent code optimizer in other compilers ???? generally the machine independent code is the intermediate code which can be used to build a back end for any platform ..please clarify
answered Nov 5, 2018 in Compiler Design 105 views
1 vote
4
The minimum number of temporary variables created in 3 address code of the following expression are _____ a+b*c+d-e-a+b*c Assume order of precedence from highest to lowest as: *,+ and - .Consider associativity for + and * are not important but - is left associative.
answered Nov 5, 2018 in Compiler Design 550 views
1 vote
5
If grammar is LL(1) then which of the following is always true? A. It is LALR B. It is LR (1) C. Both A and B Please give answer with necessary explanations as there are different answers in different sites.
answered Nov 4, 2018 in Compiler Design 298 views
0 votes
6
1. For a $N$ state DFA its equivalent NFA would contain how many numbers of states:- a) In worst case? b) In best case? 2. For a $N$ state NFA its equivalent DFA would contain how many numbers of states:- a) In worst case? b) In best case?
answered Nov 4, 2018 in Theory of Computation 120 views
0 votes
7
{a^n b^kn | k>=1,n>=0} which language (a) DCFL (b)CFL (c)DCFL hence CFL (d)CSL (e)out of CSL
answered Nov 4, 2018 in Theory of Computation 64 views
0 votes
11
0 votes
12
0 votes
13
0 votes
14
0 votes
15
answered Nov 4, 2018 in Compiler Design 36 views
0 votes
16
Consider the following statements $S_{1}:$ The set of string described by a rule is called pattern associated with the token. $S_{2}:$ A lexeme is a sequence of character in the source program that is matched by Pattern for a token. Which of the following statement is/are true? Both $S_{1}$ ... $S_{2}$ is false $S_{2}$ is true $S_{1}$ is false Both $S_{1}$ and $S_{2}$ are false
answered Nov 4, 2018 in Compiler Design 232 views
0 votes
17
Which of the following statements is correct? (A) For any context free grammar there is a parser that takes at most O(n2) to parse a string for n terminals. (B) Recursive descent method can't be used to both parse and implement syntax-directed translation. (C) Software tools for generating parsers directly from grammars often use top-down methods. (D) None of the above.
answered Nov 3, 2018 in Compiler Design 213 views
0 votes
18
Consider the grammar given S->AA A->aA / b How many entries will be blank in the GOTO table for SR(0) items? What is the meaning of SR(0) items?
answered Nov 3, 2018 in Compiler Design 199 views
0 votes
19
The power of parsers is as follows: CLR(1) > LALR(1) > SLR(1) > LR(0) > LL(1) Can we say that if a language is not parsed by powerful parser then less powerful parsers can't parse that language? Likewise, if a language can be parsed by less powerful ... it be parsed by all powerful parsers than that? Is there a formal proof for the above two questions? How to compare SLR and LALR parser formally?
answered Nov 3, 2018 in Compiler Design 999 views
0 votes
20
Which of the Following is True ? A. Symbol table Construction is during the analysis part of the Compiler. B. Type checking is Done during Syntax Analysis phase C. SDD with only synthesized attribute have an order of evaluation D. Both A and C Please Explain the C part only rest are easy :)
answered Nov 3, 2018 in Compiler Design 245 views
0 votes
21
a) A.val = A.val * B.val B.val = C.val * D.val E.val = E.val + F.val b) A.val = A.val * B.val B.val = C.val - D.val E.val = E.val + F.val c) A.val = A.val / B.val B.val = C.val * D.val E.val = E.val + F.val d) A.val = A.val / B.val B.val = B.val / D.val E.val = E.val * F.val What is the fastest way to solve this question?
answered Nov 3, 2018 in Compiler Design 139 views
0 votes
22
0 votes
23
S→(X S→E] S→E) X→E) X→E] E→ϵ Is this grammar CLR(1)? The answer says it is but I find a shift reduce conflict for E-> epsilon with lookup symbols ),]
answered Nov 2, 2018 in Compiler Design 383 views
0 votes
24
0 votes
25
Among Deterministic pushdown automata and Non deterministic pushdown automata, which is more powerful and why ?
answered Oct 26, 2018 in Theory of Computation 181 views
0 votes
26
Time taken by one tape TM to simulate n moves of k-tape TM is 1) O(n) 2) O(n^k) 3) O(n^2) 4) None of the above
answered Oct 25, 2018 in Theory of Computation 55 views
0 votes
27
Consider the following fragment of code for(i=0; i<=100; i++) { A[i]= B[i]+C; } Assume A and B are arrays of 64-bit integers and c and i are 64-bit integers. Assume that all data values and their addresses are kept in memory ( at addresses 0,5000, ... iterations of the loop. Also assume instructions are 4 byte in size. How many instructions are required dynamically? a. 1618 b. 400 c. 512 d. 1024
answered Oct 21, 2018 in CO and Architecture 303 views
0 votes
28
F(A,B,C,D)=$\Sigma$(0,2,3,5,8,10,11,12,15) Realize it using 8:1 MUX . what is the logic behind?
answered Oct 18, 2018 in Digital Logic 134 views
0 votes
29
Choose the correct formula for Effective Address calculation Base + (Size*Scale) +Displacement) (Base + Size)*Scale +Displacement Base + Size*(Scale +Displacement) (Base + Size)*(Scale +Displacement)
answered Oct 18, 2018 in CO and Architecture 185 views
0 votes
30
Consider a device that is to transfer data at a rate of 1 Mbytes/sec in 16bytes chunks. The overhead of polling is 400 cycles on 500 Mhz processor. Calculate the overhead of polling assuming I/O uses polling mechanism to transfer data? A. 5% B. 8% C. 6% D.4%
answered Oct 18, 2018 in CO and Architecture 31 views
...