Quiz Electronics Engineering 7 July 2020

Quiz Electronics Engineering
Exam: NIC
Topic: Miscellaneous
Date: 07/07/2020

Each Question carries 1 Mark
Negative Marking: 1/4
Time: 10 Minutes

Q1. Which of the following is machine independent optimization?
(a) Loop optimization
(b) Redundancy Elimination
(c) Folding
(d) All of these

Q2. A stack organized computer has which of the following instructions?
(a) zero-address
(b) one-address
(c) two-address
(d) three-address

Q3. A regular expression is ( a + b *c) is equivalent to :
(a) set of strings with either a or one or more occurrence of b followed by c
(b) (b*c + a)
(c) set of strings with either a or zero or more occurrence of b followed by c.
(d) both (b) and (c)

Q4. We have 10-stage pipeline, where the branch target conditions are resolved at stage 5. How many stalls are there for an incorrectly predicted branch?
(a) 5
(b) 6
(c) 7
(d) 4

Q5. Consider the following statements S1 and S2 :
S1: At the resonant frequency the impedance of a series RLC circuit is zero.
S2 : In a parallel GLC circuit, increasing the conductance G results in increase in its Q factor.
Which one of the following is correct?
(a) S1 is FALSE and S2 is TRUE
(b) Both S1 and S2 is TRUE.
(c) Both S1 and S2 is FALSE.
(d) S1 is TRUE and S2 is FALSE.

Q6. A logic circuit that identifies each combination of signal present at its input is
(a) Encoder
(b) Buffer
(c) Decoder
(d) None of the above

Q7. Which of the following is added to the page table in order to track whether a page of cache has been modified since it was read from the memory?
(a) reference bit
(b) dirty bit
(c) Tag bit
(d) Valid bit

Q8. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock.
(a) can never occur
(b) has to occur
(c) may occur
(d) none of the above

Q9. In conservative two phase locking protocol, a transaction :
(a) should release all the locks only at beginning of transaction
(b) should release exclusive locks only after the commit operation
(c) should acquire all the exclusive locks at beginning of transaction
(d) should acquire all the locks at beginning of transaction

Q10. Which of the following is not a deliverable of the structured system analysis?
(a) Data flow diagram
(b) Prototype model
(c) Entity Relationship diagram
(d) Data dictionary

SOLUTIONS

S1. Ans.(d)
Sol. Machine Independent optimization are –
Loop optimization
Redundancy elimination
folding
Strength reduction
Deadlock elimination.

Machine Dependent optimization are –
Register allocation
Use of addressing modes
Peephole optimization.

S2. Ans.(a)
Sol. A stack organized computer has no address field in the instruction. It means that absolute address of the operand is held in a special register that is automatically incremented (or decremented) to point to the location of the top of the stack.

S3. Ans.(d)

S4. Ans.(d)
Sol. If branch instruction is at nth stage then the number of stalls would be (n – 1).
Hence, 4 stalls are there for an incorrectly predicted branch.

S5. Ans.(c)
Sol. At resonant frequency, the impedance of a series RLC circuit is Z = R.
In Parallel GLC circuit,
Q = β_L/G = β_C/G
If G increases, then Quality factor decreases.

S6. Ans(c)
Sol. A Decoder is a combinational circuit that converts binary information from n input lines to a maximum of 2^n unique output lines.

S7. Ans.(b)
Sol. A dirty bit also called as modified bit is associated with a block of computer memory and indicates whether or not the corresponding block of memory has been modified. The dirty bit is set when the processor writes to or modifies this memory.

S8. Ans.(a)
Sol. Given:
No. of processes(P) = 3
Max requirement of each process(n) = 2
Total number of shared resources(R) = 4

Condition for deadlock to never occur –
P(n-1) + 1 ≤ R
Since,
LHS = 3(2 – 1) + 1 = 4 = RHS
Hence, deadlock can never occur.

S9. Ans.(d)
Sol. With the help of Two-Phase Locking Protocol (2PL), serializability can be attended.
2PL has four cases. Those are –
(i) Simple or Basic
(ii) Conservative
(iii) Strict
(iv) Rigorous
In Conservative 2-PL, all the data items which the transaction requires before the transaction starts are locked. Due to conservative nature, this protocol is deadlock free but starvation can occur.

S10. Ans.(b)
Sol. The prototype model requires building of a working prototype before carrying out the development of actual software for any system.

Leave a comment

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