CS501-Advanced Computer Architecture Final Term Spring 2012
CS501-Advanced Computer Architecture Final Term Spring 2012
1
6. Encode the register into binary? R0 TO R7 (3 Marks)
Answer:- (Page 51)
Encoding of the General Purpose
Registers.
R0 00000
R1 00001
R2 00010
R3 00011
R4 00100
R5 00101
R6 00110
R7 00111
7. What is the difference multimode fiber and mono fiber which are used as a physical medium of the
network? (3 Marks)
Answer:- (Page 391)
Multimode fiber
This fiber has large diameter. When light is injected, it disperses, so the effective data rate decreases.
Multimode fiber is used as a physical medium of the network
Mono mode Fiber
Its diameter is very small. So dispersion is small and data rate is very high.
10. Write the radix conversion algorithm to convert 39210 to the base 16? (5 Marks)
Answer:- (Page 335)
According to the above algorithm
390/16 =24( rem=6), x0=6
24/16= 1(rem=8), x1=8, x2=1
Thus 39010
=18616
11. What is the difference between internal segmentation and external segmentation relevant to the
computer storage? (5 Marks)
Answer:-
In fixed partitioning the pages are of fixed size and some space is wasted in the last page. For example if we
have page size equal to 2 K and the program size is of 9 K than we have to use 5 pages each of size 2 k. In this
case 4 pages fully consumed but the last page has 1 k free memory and it can not be utilized, so this type of
fragmentation is called internal fragmentation. It is basically the wastage of space of within the partition.
2
In variable partitioning the page size is not fixed. In this type of partitioning the page size is variable. So pages
are allocated accordingly. If say program A is of size 5 k than 5 k page size is reserved and say another program
B comes in having size 3 k so now page size of 3 k is reserved. Now if A program exits and the new program C
having size 4 k comes in, it will replace the 5 k partition of program A but the space of 1 K is wasted between
program C and program B. This wastage of space is called external fragmentation. It is basically the wastage of
space between the partitions.
12. Write the SRC assembly program for the following expression? (5 Marks)
Z= 16(a+b)-32(c-58)
Answer:- (According to Page 57)
ld R1, c ; c is a label used for a memory location
subi R3, R1, 58 ; R3 contains (c-58)
shl R7, R3, 5 ; R7 contains 32(c-58)
ld R4, a
ld R5, b
add R6, R4, R5 ; R6 contains (a+b)
shl R8, R6, 4 ; R8 contains 16(a+b)
sub R9, R7, R8 ; the result is in R9
st R9, z ; store the result in memory location z
3
Q3-Write the drawbacks of DMA? 2
Answer:- (Page 315)
The disadvantage however, would be that an additional DMA controller would be required, that could make
the system a bit more complex and expensive. Generally, the DMA requests have priority over all other bus
activities including interrupts. No interrupts may be recognized during a DMA cycle.
Multiplexer Channel
It is the DMA controller that can do block transfers for several devices at once.
4
Consider a LAN using bus topology if we replace the bus with a switch, what change occurs in such a
configuration. (2 marks )
Answer:- (Page 385)
If we replace the bus with a switch, the speed of the data transfer will be improved to a great extent.
Find the average relational latency if the disk octet 15000rpm. (3 marks )
Answer:- (Page 324)
The average latency to the desired data is halfway round the disk so
Average rotational latency = (1 / (RPM / 60)) * 0.5 * 1000
= 30000 / RPM = 30000 / 15000
=2ms
How the exception may be generated? Difference between external and internal exception.
Answer:- (Page 197)
Exceptions may be generated by an external or internal event such as a mouse click or an attempt to divide by
zero etc.
External exceptions or interrupts are generally asynchronous (do not depend on the system clock) while internal
exceptions are synchronous (paced by internal clock)
5
Does DMA affect the relationship between the memory system and the CPU? Explain (5 marks )
Answer:- (Page 321)
DMA and memory system
DMA disturbs the relationship between the memory system and CPU.
Direct memory access and the memory system
Without DMA, all memory accesses are handled by the CPU, using address translation and cache mechanism.
When DMA is implemented into an I/O system memory accesses can be made without intervening the CPU for
address translation and cache access. The problems created by the DMA in virtual memory and cache systems
can be solved using hardware and software techniques.
Suppose the I/O system with a single disk get an average of 200 I/O request/second assume that the
average time for a disk to service and I/O request is 4ms. What is the utilization of I/O system? (5marks )
Answer:- (Page 382)
Time for an I/O request = 4ms
=0.004sec
Server utilization = 200 x 0.004
= 0.8
Consider a 4 way set-associative cache with 256KB capacity and 32 byte lines
a) How many sets are there in the cache?
b) How many bits of address are required to select a set in cache?
Answer:-
(a)
256 × 1024 ÷ 32 = 8192 lines of data
8192 / 4 = 2048 sets in the cache
A 256KB cache with 32 byte lines contains 8192 lines of data. In a 4-way set associative cache, each set
contains 4 lines, so there are 2048 sets in the cache.
(b)
Log2 (2048) =11. Hence 11 bits of the address are required to select the set.
6
CS501- Advanced Computer Architecture
Final term Spring 2012
1. The following table shows a partial summary of the ISA for the SRC. Write an assembly language
program using the SRC assembly language to evaluate the
expression: (5 marks)
Z= (7 + 16a) – (8b – c)
Answer:-
Answer:- (According to Page 57)
Find the bandwidth of a memory system that has a latency of 30ns, a pre charge time of 10ns and
transfers 3 bytes of data per access. (5 marks)
Answer:-
Time between two memory reference
= latency + pre charge time
=30ns+10ns
= 40ns
Throughput = 1/40ns
=2.5 x107 operation/sec
2. Give an example for the logic design level, circuit level and mask level abstractions of digital design.
(3 marks)
Answer:- (Page 22)
Logic Design Level
The logic design level is also called the gate level. The basic elements at this level are gates and flip-flops. The
behavior is less visible, while the hardware structure predominates.
The above level relates to “logic design”.
Circuit Level
The key elements at this level are resistors, transistors, capacitors, diodes etc.
Mask Level
The lowest level is mask level dealing with the silicon structures and their layout that implement the system as
an integrated circuit.
The above two levels relate to “circuit design”.
Temporal Correlation
In this case, we say that at a particular time, if we have utilized a particular part of the memory then we might
access the adjacent parts very soon.
4. Suppose an I/O system with a single disk gets (on average) 200 I/O requests/second. Assume that
average time for a disk to service an I/O request is 4ms. (3 marks)
Answer:- Rep
8
What is the utilization of the I/O system? (3 marks)
Answer:- (Page 381)
Server Utilization = Arrival Rate x Timeq
Server utilization is also called traffic intensity and its value must be between 0 and 1.
Server utilization depends upon two parameters:
1. Arrival Rate
2. Average time required to serve each task
So, we can say that it depends on the I/O bandwidth and arrival rate of calls into the system.
1. Which term do we use to describe a “storage systems” resilience to disk failure through the use of
multiple disks and by the use of data distribution and correction techniques? (2 marks)
Answer:- click here for detail
RAID is the term used to describe a storage systems' resilience to disk failure through the use of multiple disks
and by the use of data distribution and correction techniques.
9
How many drives do you need a minimum to form RAID 0? (2 marks)
0
Only 1
Minimum 2
Maximum 2
Answer:- click here for detail
Minimum 2
To establish a RAID 0 volume, a minimum of at least 2 hard disk drives are required. Unlike RAID 1, the
number of drives used in the array can be an odd or even number.
Hard Reset
The SRC should perform a hard reset upon receiving a start (Strt) signal. This initializes the PC and the general
registers.
Soft Reset
The SRC should perform a soft reset upon receiving a reset (rst) signal. The soft reset results in initialization of
PC only.
The reset signal in SRC is assumed to be external and asynchronous.
10
Q 3 :- Convert (0.23)10 to the base 2 address 2Marks
Answer:- (page 336)
0.23*2=0.46, f-1=0
0.46*2=0.92, f-2=0
0.92*2=1.84, f-3=1
0.84*2=1.68, f-4=1
0.68*2=1.36, f-5=1, …
Thus 0.2410 =(0.00111) 2
Question no 4
What is meant by Packet switching
Answer:- (Page 387)
A block (an appropriate number of bits) of data is called a packet. Transfer of data in the form packets through
different paths in a network is called packet switching. Additional bits are usually associated with each packet.
These bits contain information about the packet. These additional bits are of two types: header and trailer. As
an example, a packet may have the form shown below:
Question no 6
Classification of fiber optics mode multimode and mono mode?
Answer:- Rep
Question no 7
Consider a 64KB direct-mapped cache with a line length of 32 bytes. (5 marks)
a. Determine the number of bits in the address that refer to the byte within a cache line.
b. Determine the number of bits in the address required to select the cache line
11
Answer:- (Page 375)
Address breakdown
n=log2 of number of bytes in line
m=log2 of number of lines in cache
a. For the given cache, the number of bits in the address to determine the byte within the line= n = log232 = 5
b. There are 64K/32= 2048 lines in the given cache. The number of bits required to select the required line = m
=log22048 = 11
Hence n=5 and m=11
Question no 8
If a DRAM has 512 rows and its fresh time is 9ms .What shoul be the frequency of row refresh operation
on the average?
Answer:- (Page 371)
Refresh time =9ms
Number of rows =512
Therefore we have to do 512 row refresh operations in a 9 ms interval, in other words
one row refresh operation every ( 9*10-³)/512=1.76 * 10-5 second
Question
Structural RTL for not instruction not ra ,rb
Answer:- (Page 160)
Question
why we use matrix in decoder
Answer:- (Page 352)
A typical one level decoder has n inputs and 2n output, using one level of gates, each with a fan-in of n. Two
level decoders are limited in size because of high gate fan-in. In order to reduce the gate fan-in to a value of 8
or 6, tree and matrix decoders are utilized.
12
CS501- Advanced Computer Architecture
Final term Fall 2011
41.What are the functions of memory cell? 2 marks
Answer:- (Page 351)
A memory cell provides four functions: Select, DataIn, DataOut, and Read/Write. DataIn means input and
DataOut means output. The select signal would be enabled to get an operation of Read/Write from this cell.
48. How shift instructions are useful? When we use them? 3 marks
Answer:- Rep
49.Assume there is an accumulator based machine in which there are eight general purpose registers of
the CPU. Each register is 16-bits in length. Also there are two additional 16-bit system registers which
are the program counter (PC) and the instruction register (IR). The size of the memory word is 16-bit.
Using yours knowledge of processor design process, answer the following question.
Which name convention will you use to name each of these eight general purpose registers?
What is the available memory space size knowing that memory word is 16 bits? 5 marks
50. Find the bandwidth of a memory system that has a latency of 30ns, a pre charge time of 10ns and
transfers 3 bytes of data per access. 5 marks
Answer:- Rep
14
CS501- Advanced Computer Architecture
Final term Fall 2011
How can overflow occur in floating point? (2 Marks)
Answer:- (Page 348)
Overflow occurs when the exponent is too large and can not be represented in the exponent field.
(3 Marks Questions)
What is 4-address instruction set and when it use?
Answer:- (Page 36)
15
Difference between virtual address and physical address
Answer:- (Page 321)
Virtual Address:
Virtual address is generated be the logical by the memory management unit for translation.
Physical Address:
Physical address is the address in the memory.
5 Marks Questions
Find the average access time of a level of memory hierarchy if the hit rate is 80%. The memory access
takes 12ns on a hit and 100ns on a miss.
Answer:- (Page 372)
16
What is difference of instruction in machine with and without Pipeline?
Answer:- (Page 202)
Consider a 4 way set-associative cache with 256KB capacity and 32 byte lines
a) How many sets are there in the cache?
b) How many bits of address are required to select a set in cache?
Answer:- Rep
Q 1: Consider 64KB direct mapped cache, line length 32 bytes, and find the number of bits in the
address. 2
Answer:- Rep
17
Q 2: Define virtual memory 2
Answer:- (Page 364)
Virtual memory acts as a cache between main memory and secondary memory. Data is fetched in advance from
the secondary memory (hard disk) into the main memory so that data is already available in the main memory
when needed. The benefit is that the large access delays in reading data from hard disk are avoided.
Q 5: Why MIPS is not very accurate basis for comparison of different processes. Write formula of MIPS.
3
Answer:- (Page 45)
MIPS = IC/ (ET x 106)
This measure is not a very accurate basis for comparison of different processors. This is because of the
architectural differences of the machines; some machines will require more instructions to perform the same job
as compared to other machines. For example, RISC machines have simpler instructions, so the same job will
require more instructions. This measure of performance was popular in the late 70s and early 80s when the
VAX 11/780 was treated as a reference.
18
Q 8: Calculate Bandwidth, given Latency 30ns, per charge time is 10ns and 3 bytes of data per access.
5
Answer:- Rep
define PROM
Answer:- Rep
(3)
STAGes in pipelined SRC
Answer:- (Page 206)
The SRC uses a five-stage pipeline. Those five stages are given below:
1. Instruction Fetch
2. Instruction decode/operand fetch
3. ALU operation
4. Memory access
5. Register write
19
diff bw serial and parallel transfer
Answer:- (Page 396)
Serial Transfer, or serial communication of data between the CPU and the I/O devices, refers to the situation
when all the data bits in a "piece of information", (which is a byte or word mostly), are transferred one bit at a
time, over a single pair of wires.
Parallel Transfer, or parallel communication of data between the CPU and the I/O devices, refers to the
situation when all the bits of data (8 or 16 usually), are transferred over separate lines simultaneously, or in
parallel.
Consider a 4 way set-associative cache with 256KB capacity and 32 byte lines
a) How many sets are there in the cache?
b) How many bits of address are required to select a set in cache?
Answer:- Rep
5)
difference bw connection oriented and connection less
Answer:- (Page 394)
Connection Oriented Communication
• In this method, same path is always taken for the transfer of messages.
• It reserves the bandwidth until the transfer is complete. So no other server could use that path until it becomes
free.
• Telephone exchange and circuit switching is the example of connection oriented communication.
Connection less Communication
• Here message is divided into packets with each packet having destination address.
• Each packet can take different path and reach the destination from any route by looking at its address.
• Postal system and packet switching are examples of connection less communication.
20
compare 1D AND 2D
Answer:- (Page 351)
In R3,57
R [3] ← IO [57]
OUT R6 15
IO [16] ← R [6]
RET R3
PC ← R [3]
ANDI R5 , R4. 5
R [5] ← R [4] & 5
21
CS501- Advanced Computer Architecture
Final term Fall 2011
Differentiate b/w RISC n CISC according to their instruction size and hardware, software? 5 marks.
Answer:- Click here for detail
CISC RISC
Emphasis on hardware Emphasis on Software
Include multi-clock Include Single-clock
complex instructions Reducedinstructions only
memory to memory: Registors to Register:
"LOAD" and "STORE"incorporated in instructions "LOAD" and "STORE"are independent instructions
Small code sizes Large code sizes
high cycles per second Low cycles per second
Transistors used for storing Spend more transistors on memory registors
22
A hard disk with 5 platters has 1024 tracks per platter,512 sectors per track and 512 bytes/sector. What
is the total capacity of the disk? 5 marks.
Answer:- (Page 324)
512 bytes x 512
sectors=0.2MB/track
0.2MB x 1024 tracks=0.2GB/platter
Therefore the hard disk has the total capacity of 5 x 0.2=1GB
23
CS501- Advanced Computer Architecture
Final term Fall 2011
What attributes should have a device to qualify in order to be master device ---- 2 Marks
Answer:- (Page 317)
A Master must have the capability to place addresses on the address bus and direct the bus activity during a bus
cycle.
A network is suing the Bus topology if we replace the bus with switch what change will be take effects by
this configuration…. 2 Marks
Answer:- Rep
Explain the relation ship between the Hard disk tracks, cylinders and sectors…3 marks
Answer:- (Page 323)
A hard disk is the most frequently used peripheral device. It consists of a set of platters. Each platter is divided
into tracks. The track is subdivided into sectors. To identify each sector, we need to have an address. So, before
the actual data, there is a header and this header consisting of few bytes like 10 bytes. Along with header there
is a trailer. Every sector has three parts: a header, data section and a trailer.
24
SRS assembly program for the following expiration..5 Marks
Z = 13(A+B)-32(c-58)
Answer:- (Page 57)
Notice that the SRC does not have a multiply instruction. We will make use of the fact that multiplication with
powers of 2 can be achieved by repeated shift left operations. But in the given example 13 is not directly is a
power of 2. So you need to make it power of 2.
13(A+B) = 8(A+B) + 4 (A+B) + (A+B)
Suppose we place A+B in some register say R6.
Latency of the ram is 30ns , if the time charge is 10ns and data pre change is 3 byte then find the band
width…5 Mrks
Answer:- Rep
25
CS501- Advanced Computer Architecture
Final term Fall 2011
Consider a 64KB direct-mapped cache with a line length of 32 bytes. (5 marks)
a. Determine the number of bits in the address that refer to the byte within a cache line.
b. Determine the number of bits in the address required to select the cache line
Answer:- Rep
How many platters are required for a 40GB disk if there are 1024 bytes/sector, 2048 sectors per track
and 4096 tracks per platter (5)
Answer:- Rep
26
Cache Management (2 marks)
Answer:- (Page 339)
To manage the working of the cache, cache control unit is implemented in hardware, which performs all the
logic operations on the cache. As data is exchanged in blocks between main memory and cache, four important
cache functions need to be defined.
27
4. Give two advantages of virtual memory.
Answer:- Rep
11. Give all steps of Integer division algorithm to divide 45 by 5 in 10 base systems.
Answer:- (Page 343)
There are steps of integer division present on page number 343 of course handouts. But none the less I am
going to explain its working.
28
47 = 000000 101111
In this the left six bits are the upper half of dividend and the right ones are the lower half of the dividend.
5 = 000101
We use capital “D” for dividend and small “d” for divisor.
D = 000000 101111
d = 000101
First we shift left one bit the value of Dividend and add zero.
D = 0 000001 011110
d= 000101
(Now we if the result is negative than we append “0” to the quotient and if it is positive than we replace the
upper half the dividend with the positive result and append “1” to the quotient.)
D = 0 000001 011110
d = 000101 q=0
D = 000010 111100
d = 000101 q = 00
D = 000101 111000
d = 000101
--------------
= 000000 q = 001
The result is positive so we append “1” to the quotient and replace the result with the upper half of the
dividend.
D = 000001 110000
d = 000101 q = 0010
D = 000111 000000
d = 000101
--------------
= 000010 q = 001001
2. An IO system with single disk gets 100 IO requests/sec. Assume the average time for a disk to
service an IO request is 6ms. What is utilization of the IO system? (5)
Answer:- (Page 382)
Time for an I/O request = 6ms
=0.006sec
Server utilization = 100 x 0.006
= 0.6
6. What are functions of valid bit in Associative mapping strategy for cache? (3)
Answer:- (Page 359)
A given block in cache is identified uniquely by its main memory block number, referred to as a tag, which is
stored inside a separate tag memory in the cache. To check the validity of the cache blocks, a valid bit is stored
for each cache entry, to verify whether the information in the corresponding block is valid or not.
31
9. Consider a 64KB directed mapped cache with a line length of 32 bytes. Determine the number of
bits in the address that refers to the byte within a cache line. (2)
Answer:- Rep
10. What attributes should a device have in order to be qualified as a master device? (2)
Answer:- Rep
2. Usage of DMA
Answer:- Rep
32
5. Define the different types of Instructions used in FALCON-E
Answer:- (Page 125)
Four different instruction formats are supported by the FALCON-E. These are
Type A instructions
The type A instructions have 5 bits reserved for the operation code (abbreviated op-code), and the rest of the
bits are either not used or specify a displacement.
Type B instructions
The type B instructions also have 5 bits (27 through 31) reserved for the op-code. There is a register operand
field, ra, and an immediate or displacement field in addition to the op-code field.
Type C instructions
Type C instructions have the 5-bit op-code field, two 3-bit operand registers (rb is the source register, ra is the
destination register), a 17-bit immediate or displacement field, as well as a 3-bit function field. The function
field is used to differentiate between instructions that may have the same op-code, but different operations.
Type D instructions
Type D instructions have the 5-bit op-code field, three 3-bit operand registers, 14 bits are unused, and a 3-bit
function field.
9. Define different level of RAID and What are the similarities at Level 2 and Level 3 of the RAID?
Answer:- (Page 329)
RAID Level 0
• Not a true member of the RAID family.
• Does not include redundancy to improve performance.
• In few applications, capacity and performance are primary concerns than improved reliability. So RAID level
0 is used in such applications.
• The user and system data are distributed across all the disks in the array.
33
• Notable advantage over the use of a single large disk.
• Two requests can be issued in parallel, reducing the I/O queuing time.
RAID Level 4
• Make use of independent access technique.
• Data striping is used.
• A bit-by-bit parity strip is calculated across corresponding strip on each data disk.
• Involves a write penalty when an I/O write request of small size is performed.
• To calculate the new parity, the array management software must read the old user parity strip.
RAID Level 5
• Organized in a similar fashion to RAID 4
• The only difference is that RAID 5 distributes the parity strips across all disks.
Q1 ( Marks: 5 )
Consider a 4 way set-associative cache with 256KB capacity and 32 byte lines
a) How many sets are there in the cache?
b) How many bits of address are required to select a set in cache?
Answer:- Rep
34
Q3 what do you know about " booth pair recording 3marks
Answer:- (Page 342)
The Booth Algorithm makes multiplication simple to implement at hardware level and speed up the procedure.
This procedure is as follows:
1. Start with LSB and for each 0 of the original number, place a 0 in the recorded number until a 1 in indicated.
2. Place a 1 for 1in the recorded table and skip any succeeding 1‟s until a 0 is encountered.
3. Place a 0 with 1 and repeat the procedure.
35
CS501- Advanced Computer Architecture
Final term Spring 2011
Q1 what is assembler and what is it important in assembly language (2)
Answer:- Rep
Q5define ISA
Answer:- Rep
Q7 define pipelining(5)
Answer:- (Page 202)
Pipelining is a technique of overlapping multiple instructions in time. A pipelined processor issues a new
instruction before the previous instruction completes. These results in a larger number of operations performed
per unit of time. This approach also results in a more efficient usage of all the functional units present in the
processor, hence leading to a higher overall throughput. As an example, many shorter integer instructions may
be executed along with a longer floating point multiply instruction, thus employing the floating point unit
simultaneously with the integer unit.
36
Q8 define the type of error control(5)
Answer:- (Page 328)
There are two main issues in error control:
1. Detection of Error
2. Correction of Error
For detection of error, we just need to know that there exists an error. When the error is detected then the next
step is to ask the source to resend that information. This process is called automatic request for repeat. In some
cases there is also possibility that redundancy is enough and we reconstruct and find out exactly which
particular bits are in error. This is called error correction.
3. Which technique allows certain hardware subsystems within a computer to access system memory for
read/write independently of the main CPU?
Answer:- click here for detail
Direct Memory Access. Allows certain hardware subsystems within a computer to access system memory for
reading and/or writing independently of the main CPU. Examples of systems that use DMA: Hard Disk
Controller, Disk Drive Controller, Graphics Card, Sound Card.
4. 64KB direct-mapped cache line length 32, determine number of bits in the address?
Answer:- Rep
37
RAID Level 5
• Organized in a similar fashion to RAID 4
• The only difference is that RAID 5 distributes the parity strips across all disks.
6. Consider a 4 way set-associative cache with 256KB capacity and 32 byte lines
i. find sets in the cache
ii. and bit address required to select a set .
Answer:- Rep
9. Diff b/w distributed computing and computer Network and classifications of networks
Answer:- (Page 386)
Difference between Distributed Computing and Computer Networks
In distributed computing, all elements which are interconnected operate under one operating system. To a user,
it appears as a virtual uni-processor system. In a computer network, the user has to specify and log in on a
specific machine. Each machine on the network has a specific address. Different machines communicate by
using the network which exists among them.
Classification of Networks
We can classify a network based on the following two parameters:
• The number and type of machines to be interconnected
• The distance between these machines
39
Briefly Describe Classification of Networks?
Answer:- (Page 387)
Classification of Networks
We can classify a network based on the following two parameters:
• The number and type of machines to be interconnected
• The distance between these machines
Based on these two parameters, we have the following type of networks:
SAN (System/Storage Area Network)
It refers to a cluster of machines where large disk arrays are present. Typical distances could be tens of meters.
LAN (Local Area Network)
It refers to the interconnection of machines in a building or a campus. Distances could be in Kilometers.
WAN (Wide Area Network)
It refers to the interconnection between LANs.
40