Pages

Friday, May 6, 2011

q1

Question paper -1
1.Briefly explain the following :-
a) Zero address machine Instruction : A Computer organized using only stack does not use an address field for the arithmetic instructions. However, the PUSH and POP instructions require one address field to specify the operand that moves from/ to the top of stack. Arithmetic expressions re-evaluated by using the top two operands(that is from TOP Stack and one Location below it) and the result is stored on the top of Stack. This implied that the Stack utilized is reduced by one when ever an arithmetic expression is evaluated. The Zero address instructions are so called because of the use of Zero addresses for arithmetic instructions.
Example : x = (A + B) * (C + D)
PUSH A TOS  A
PUSH B TOS B
AND TOS(A+B)
PUSH C TOSC
PUSH D TOSD
ADD TOS(C+D)
MUL TOS(C+D) * (A+B)
POP X TOSM[X] TOS.
b) Microprogramming : A Sequence of micro instructions constitutes a microprogramming. The control unit initiates a series of sequential steps of micro operations during any given time, certain microoperations are to be initiated, while other remain idle. The control variables at any given time can be represented by a string of 1’s and 0’s called a control word. As such, control words can be programmed to perform various operations on the components of the system. A control unit whose binary control variables are stored in memory is called micro programmed control unit. Each word in control memory contains within it a micro instruction. The micro instruction specifies one or more micro operations for the system. A sequence of micro instructions constitutes a micro programming.
c) Bus arbitration: The device that is allowed to initiate data transfers on the bus at any given time is called the bus master. When the current master relinquishes control of the bus, another device can acquire this status. Bus arbitration is the process by which the next device to become the bus master is selected and bus mastership is transferred to it. The selection of the bus master must take into account the needs of various devices by establishing a priority system for gaining access to the bus.
There are two approaches to bus arbitration: Centralized and distributed. In Centralized arbitration, a single bus arbiter performs the required arbitration. In distributed arbitration, all devices participate in the selection of the next bus master.
d) Compiler : Compiler is a program which takes one language(source program) as input and translates it into an equivalent another language(target program). During this process of translation if some errors are encountered then compiler display them as error messages. The basic model of computer represented as follows
Input (source program)  compiler  output (Target Program)

e) Hit rate and miss penalty: The performance of cache memory is measured in terms of quality called hit ratio. Cache refers to as an intermediate fast memory space within its memory. It acts as buffer between CPU and Memory. Cache memory provides memory space with greater speed than the memories available. Besides this it provides large memory size with less economical semi-conductor memories. When CPU finds the word in Cache memory is said to produce a “hit”. If the word is not found in cache, and if it is in main memory then it counts as “miss”, the ratio of the number of hits divided by the total CPU references to memory (hit plus misses) is called hit ratio. The average memory-access time of a computer system can be increased by use of a Cache memory. If the hit ratio is high then CPU access cache instead of main memory. The average access time is closer to the access time of the fast cache memory.