Question Bank For Computer Architecture
Question Bank For Computer Architecture
/ Branch: CSE
Semester: III / Year: II
CS6303 / COMPUTER ARCHITECTURE
UNIT : I
OVERVIEW & INSTRUCTIONS
Part A ( 2 marks for each question)
1. What are the eight great ideas in computer architecture?
The eight great ideas in computer architecture are:
1.Design for Moores Law
2.Use Abstraction to Simplify Design
3.Make the Common Case Fast
4.Performance via Parallelism
5.Performance via Pipelining
6.Performance via Prediction
7.Hierarchy of Memories
8.Dependability via Redundancy
2. What are the five classic components of a computer?
The five classic components of a computer are input, output, memory, datapath,
and control, with the last two sometimes combined and called the processor.
3. Define ISA
The instruction set architecture, or simply architecture of a computer is the
interface between the hardware and the lowest-level software. It includes anything
programmers need to know to make a binary machine language program work correctly,
including instructions, I/O devices, and so on.
4. Define ABI
Typically, the operating system will encapsulate the details of doing I/O,
allocating memory, and other low-level system functions so that application programmers
do not need to worry about such details. The combination of the basic instruction set and
the operating system interface provided for application programmers is called the
application binary interface (ABI).
5. What are the advantages of network computers?
Networked computers have several major advantages:
Communication: Information is exchanged between computers at high speeds.
Resource sharing: Rather than each computer having its own I/O devices,
computers on the network can share I/O devices.
11. Write the formula for CPU execution time for a program.
12. Write the formula for CPU clock cycles required for a program.
rs
5bits
rt
5 bits
rd
5 bits
shamt
5 bits
funct
6 bits
Where,
op: Basic operation of the instruction, traditionally called the opcode.
rs: The first register source operand.
rt: The second register source operand.
rd: The register destination operand. It gets the result of the operation.
shamt: Shift amount.
funct: Function.
15. Write an example for immediate operand.
The quick add instruction with one constant operand is called add immediate or addi.
To add 4 to register $s3, we just write
addi
$s3,$s3,4
# $s3 = $s3 + 4
STAFF IN-CHARGE
HOD
Subtraction directly,
0
<0
<0
0
<0
0
<0
0
data . The rising popularity of multimedia applications led to arithmetic instructions that
support narrower operations that can easily operate in parallel.
For example, ARM added more than 100 instructions in the NEON multimedia
instruction extension to support sub-word parallelism, which can be used either with
ARMv7 or ARMv8.
10. Multiply 100010 * 100110.
STAFF IN-CHARGE
HOD
COIMBATORE-59.
Degree: B.E. / Branch: CSE
Semester: III / Year: II
CS6303 / COMPUTER ARCHITECTURE
UNIT : III
PROCESSOR AND CONTROL UNIT
Two state elements are needed to store and access instructions, and an adder is needed to
compute the next instruction address. The state elements are the instruction memory and
the program counter.
5. Draw the diagram of portion of datapath used for fetching instruction.
A portion of the data path is used for fetching instructions and incrementing the
program counter. The fetched instruction is used by other parts of the data path.
6. Define Sign Extend
Sign-extend is used to increase the size of a data item by replicating the highorder sign bit of the original data item in the high order bits of the larger, destination data
item.
7. What is meant by branch target address?
Branch target address is the address specified in a branch, which becomes the new
program counter (PC) if the branch is taken. In the MIPS architecture the branch target is
given by the sum of the off set field of the instruction and the address of the instruction
following the branch.
8. Differentiate branch taken from branch not taken.
Branch taken is a branch where the branch condition is satisfied and the program
counter (PC) becomes the branch target. All unconditional jumps are taken branches.
Branch not taken or (untaken branch) is a branch where the branch condition is
false and the program counter (PC) becomes the address of the instruction that
sequentially follows the branch.
9. What is meant by delayed branch?
Delayed branch is a type of branch where the instruction immediately following
the branch is always executed, independent of whether the branch condition is true or
false.
10. What are the three instruction classes and their instruction formats?
The three instruction classes (R-type, load and store, and branch) use two
different instruction formats.
11. Write the instruction format for the jump instruction.
The destination address for a jump instruction is formed by concatenating the
upper 4 bits of the current PC + 4 to the 26-bit address field in the jump instruction and
adding 00 as the 2 low-order bits.
1. Structural Hazards
2. Data Hazards
3. Control Hazards
16. What is meant by forwarding?
Forwarding, also called bypassing, is a method of resolving a data hazard by
retrieving the missing data element from internal buffers rather than waiting for it to
arrive from programmer visible registers or memory.
17. What is pipeline stall?
Pipeline stall, also called bubble, is a stall initiated in order to resolve a hazard.
They can be seen elsewhere in the pipeline.
18. What is meant by branch prediction?
Branch prediction is a method of resolving a branch hazard that assumes a given
outcome for the branch and proceeds from that assumption rather than waiting to
ascertain the actual outcome.
19. What are the 5 pipeline stages?
The 5 stages of instruction execution in a pipelined processor are:
1. IF: Instruction fetch
2. ID: Instruction decode and register file read
3. EX: Execution or address calculation
4. MEM: Data memory access
5. WB: Write back
20. What are exceptions and interrupts?
Exception, also called interrupt, is an unscheduled event that disrupts program
execution used to detect overflow. Eg. Arithmetic overflow, using an undefined
instruction.
Interrupt is an exception that comes from outside of the processor.
Eg. I/O device request
21. Define Vectored Interrupts
Vectored interrupt is an interrupt in that the address to which the control is
transferred is determined by the cause of the exception.
STAFF IN-CHARGE
HOD
COIMBATORE-59.
Degree: B.E. / Branch: CSE
Semester: III / Year: II
CS6303 / COMPUTER ARCHITECTURE
UNIT : IV
PARALLELISM
Part A ( 2 marks for each question)
1. What is meant by ILP?
Pipelining exploits the potential parallelism among instructions. This parallelism
is called instruction-level parallelism (ILP). There are two primary methods for
increasing the potential amount of instruction-level parallelism.
1. Increasing the depth of the pipeline to overlap more instructions.
2. Multiple issue.
2. What is multiple issue? Write any two approaches.
Multiple issue is a scheme whereby multiple instructions are launched in one
clock cycle. It is a method for increasing the potential amount of instruction-level
parallelism. It is done by replicating the internal components of the computer so that it
can launch multiple instructions in every pipeline stage. The two approaches are:
1. Static multiple issue (at compile time)
2. Dynamic multiple issue (at run time)
3. What is meant by speculation?
One of the most important methods for finding and exploiting more ILP is
speculation. It is an approach whereby the compiler or processor guesses the outcome of
an instruction to remove it as dependence in executing other instructions.
For example, we might speculate on the outcome of a branch, so that instructions
after the branch could be executed earlier.
4. Define Static Multiple Issue
Static multiple issue is an approach to implement a multiple-issue processor
where many decisions are made by the compiler before execution.
5. Define Issue Slots and Issue Packet
Issue slots are the positions from which instructions could be issued in a given
clock cycle. By analogy, these correspond to positions at the starting blocks for a sprint.
Issue packet is the set of instructions that issues together in one clock cycle; the
packet may be determined statically by the compiler or dynamically by the processor.
6. Define VLIW
Very Long Instruction Word (VLIW) is a style of instruction set architecture that
launches many operations that are defined to be independent in a single wide instruction,
typically with many separate opcode fields.
STAFF IN-CHARGE
HOD
periodically be refreshed.
5. What is flash memory?
Flash memory is a type of electrically erasable programmable read-only memory
(EEPROM). Unlike disks and DRAM, EEPROM technologies can wear out flash
memory bits. To cope with such limits, most flash products include a controller to spread
the writes by remapping blocks that have been written many times to less trodden blocks.
This technique is called wear levelling.
6. Define Rotational Latency
Rotational latency, also called rotational delay, is the time required for the desired
sector of a disk to rotate under the read/write head, usually assumed to be half the
rotation time.
7. What is direct-mapped cache?
Direct-mapped cache is a cache structure in which each memory location is
mapped to exactly one location in the cache. For example, almost all direct-mapped
caches use this mapping to find a block,
(Block address) modulo (Number of blocks in the cache)
8. Consider a cache with 64 blocks and a block size of 16 bytes. To what block number
does byte address 1200 map?
The block is given by,
9. How many total bits are required for a direct-mapped cache with 16 KiB of
data and 4-word blocks, assuming a 32-bit address?
13. What are the various block placement schemes in cache memory?
Direct-mapped cache is a cache structure in which each memory location is
mapped to exactly one location in the cache.
Fully associative cache is a cache structure in which a block can be placed in any
location in the cache.
Set-associative cache is a cache that has a fixed number of locations (at least two)
where each block can be placed.
14. Define MTTF and AFR
Reliability is a measure of the continuous service accomplishment or,
equivalently, of the time to failure from a reference point. Hence, mean time to failure
(MTTF) is a reliability measure. A related term is annual failure rate (AFR), which is just
the percentage of devices that would be expected to fail in a year for a given MTTF.
15. Define Availability
Availability is then a measure of service accomplishment with respect to the
alternation between the two states of accomplishment and interruption. Availability is
statistically quantified as
STAFF IN-CHARGE
HOD