Question: P1) Answer the following questions ( 30 points) (a) Explain about the role of bus in Von Neumann architecture. Why a slow bus-speed can cause

 P1) Answer the following questions ( 30 points) (a) Explain about
the role of "bus" in Von Neumann architecture. Why a slow bus-speed
can cause a performance-bottleneck in Von Neumann architecture? (b) To overcome the
performance-bottleneck in Von Neumann, a Cache memory was introduced. Explain how the
Cache memory can improve the performance. (c) A variable can have multiple
attributes such as name, type, value, address, scope and lifetime. Explain about
"scope" and "lifetime" with example. P2) Given a Context Free Gramma in
BNF, (30 points) stmtisstmt =expr> (+11+1) var>(abcd) (a) show a derivation for
the given sentence c=d/a;a=bc (b) show a parsing tree for a=bc;c=d/a (c)

P1) Answer the following questions ( 30 points) (a) Explain about the role of "bus" in Von Neumann architecture. Why a slow bus-speed can cause a performance-bottleneck in Von Neumann architecture? (b) To overcome the performance-bottleneck in Von Neumann, a Cache memory was introduced. Explain how the Cache memory can improve the performance. (c) A variable can have multiple attributes such as name, type, value, address, scope and lifetime. Explain about "scope" and "lifetime" with example. P2) Given a Context Free Gramma in BNF, (30 points) stmtisstmt =expr> (+11+1) var>(abcd) (a) show a derivation for the given sentence c=d/a;a=bc (b) show a parsing tree for a=bc;c=d/a (c) Do you think this BNF is ambiguous? Why or Why not? P3) Answer the following questions ( 30 points) (a) What is an alias? What is a possible hazard of using alias in your Java program? (b) What is a memory leak? Explain with an example in C language. (c) Demonstrate an example of alias with the given Java code. public class AliasDemo f private int value; public AliasDemo (int inVal) { value = inVal; } public int getValue () \{ return value; } public void setValue (int inVal) \{ value = inVal; \} public static void main (String[] args) \{ // write your example of creating alias here 3// end of main H/l end of class P4) Given C++ code, answer the following scope related questions: (20 points) (a) What are the values of x and y at point A ? (b) What are the values of x and y at point B ? (c) Do you think, Java allows this nested block statement? Support your idea

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!