Cs 501 Solved Final Term Papers
Cs 501 Solved Final Term Papers
FINALTERM EXAMINATION
CS501- Advance Computer Architecture (Session - 1)
Marks: 75
Mc100201523
Syed Muhsan Abbas
www.vustudents.ning.com
2
www.vustudents.ning.com
3
IRQ
INT
NMI
Question No: 13 ( Marks: 1 ) - Please choose one
If NMI and INTR both interrupts occur simultaneously, then which one has the
precedence over the other
NMI
INTR
IRET
All of the given
Question No: 14 ( Marks: 1 ) - Please choose one
Identify the following type of serial communication error condition:
The prior character that was received was not still read by the CPU and is
over written by a new received character.
Framing error
Parity error
Overrun error
Under-run error
Question No: 15 ( Marks: 1 ) - Please choose one
----------the device usually means reading its status register every so often until
the device's status changes to indicate that it has completed the request.
Executing
Interrupting
Masking
Polling
Question No: 16 ( Marks: 1 ) - Please choose one
Which I/O technique will be used by a sound card that may need to access data
stored in the computer's RAM?
Programmed I/O
Interrupt driven I/O
Direct memory access(DMA)
Polling
Question No: 17 ( Marks: 1 ) - Please choose one
For increased and better performance we use _____ which are usually made of glass.
Coaxial Cables
Twisted Pair Cables
Fiber Optic Cables
Shielded Twisted Pair Cables
Question No: 18 ( Marks: 1 ) - Please choose one
In _____ if we find some call party busy we can have provision of call waiting.
Delay System
Loss System
Single Server Model
None of the given
www.vustudents.ning.com
4
www.vustudents.ning.com
5
Hardware interrupts:
Hardware interrupts are generated by external events specific to peripheral devices. Most
processors have at least one line dedicated to interrupt requests. When a device signals on
this specific line, the processor halts its activity and executes an interrupt service routine.
Such interrupts are always asynchronous with respect to instruction execution, and are
www.vustudents.ning.com
6
not associated with any particular instruction. They do not prevent instruction completion
as exceptions like an arithmetic overflows does. Thus, the control unit only needs to
check for such interrupts at the start of every new instruction. Additionally, the CPU
needs to know the identification and priority of the device sending the interrupt request.
There are two types of hardware interrupt:
Maskable Interrupts
Non-maskable Interrupts
Maskable Interrupts:
• These interrupts are applied to the INTR pin of the processor.
• These can be blocked by resetting the flag bit for the interrupts.
Non-maskable Interrupts:
• These interrupts are detected using the NMI pin of the processor.
• These can not be blocked or masked.
• Reserved for catastrophic event in the system
For full duplex operation, it is necessary to use
switches in a LAN. If there are loops in the
wiring between two (or more) switch ports,
problems will occur and the network will not
function properly.
A CPU cache is a cache used by the central processing unit of a computer to reduce the average
time to access memory. The cache is a smaller, faster memory which stores copies of the data
from the most frequently used main memory locations. As long as most memory accesses are to
cached memory locations, the average latency of memory accesses will be closer to the cache
latency than to the latency of main memory.
a processor register is a small amount of storage available on the CPU whose contents can be
accessed more quickly than storage available elsewhere. Most, but not all, modern computer
architectures operate on the principle of moving data from main memory into registers, operating
www.vustudents.ning.com
7
on them, then moving the result back into main memory—a so-called load-store architecture. A
common property of computer programs is locality of reference: the same values are often
accessed repeatedly; and holding these frequently used values in registers improves program
execution performance.
Source(s):
http://en.wikipedia.org/wiki/CPU_cache
http://en.wikipedia.org/wiki/Processor_r…
www.vustudents.ning.com
8
n–k=m
3. CRC
The basic principle for CRC is very simple. We divide a particular code word and make it
divisible by a prime number, and if it is divisible by a prime number then it is a valid
code word.
CRC does not support error correction but the CRC bits generated can be used to detect
multi-bit errors. At the transmitter, we generate extra CRC bits, which are appended to
the data word and sent along. The receiving entity can check for errors by re computing
the CRC and comparing it with the one that was transmitted.
CRC has lesser overhead as compared to Hamming code. It is practically quite simple to
implement and easy to use.
RAID
The main advantage of having an array of disks is that we could have a simultaneous I/O
request. Latency could also be reduced..
RAID Level 0
www.vustudents.ning.com
9
Figure B explains this type of transfer. All activity is still synchronous with the system
clock, but in some situations, the slave device
may not be able to provide the data to the
master within the allotted time. The additional
time needed by the slave, can be provided by
adding an integral number of clock periods to
the master’s cycle time.
The slave indicates its readiness by activating
the complete signal. Upon receiving this
signal, the master activates the Enable signal
to latch the data provided by the slave.
Transfers between the CPU and the main
memory are examples of semi-synchronous
transfer.
Asynchronous transmission:
This type of transfer does not require a
common clock. The master and the slave
operate at different speeds. Handshaking
signals are necessary in this case, and are used
to coordinate the data transfer between the
master and the slave as shown in the Figure C.
When the master wants to initiate a data
transfer, it activates its Ready signal. The
slave detects this signal, and if it can provide
data to the master, it does so and also activates
its Acknowledge signal. Upon receiving the
Acknowledge signal, the master uses the
Enable signal to latch the incoming data .The
master then deactivates its Ready line, and in
response to it, the slave removes its data and
deactivates its Acknowledge line.
In all the three cases discussed above, the
waveforms correspond to an “input” or a “read”
Figure A
Figure A
Figure B
Figure C
Advanced Computer Architecture-CS501
________________________________________________________
Last Modified: 17-Feb-07 Page 239
operation. A similar explanation will apply to an “output” or a “write” operation. It
should also be noted that the latching of the incoming data can be done by the master
either by using the rising edge of the Enable signal or by using its falling-edge. This will
depend on the way the intermediate circuitry between the master and the slave is
designed.
www.vustudents.ning.com
10
Temporal Locality: Concept that a resource will be referenced at one point in time will be
referenced again. Cache miss traffic decreases fast when cache size increases and temporal
locality determines sensitivity to cache size.
Spatial Locality: Concept that likelihood of referencing a resource is higher if a resource near it
was referenced. Cache miss traffic does not increase much when line size increases. Spatial
locality determines sensivity to line size.
~BR
Mukkaysh Srivastav
Temporal Locality: Concept that a resource will be referenced at one point in time will be
referenced again. Cache miss traffic decreases fast when cache size increases and temporal
locality determines sensitivity to cache size.
Spatial Locality: Concept that likelihood of referencing a resource is higher if a resource near it
was referenced. Cache miss traffic does not increase much when line size increases. Spatial
locality determines sensivity to line size.
~BR
Mukkaysh Srivastav
Read
more: http://wiki.answers.com/Q/What_is_the_distinction_between_spatial_locality_and_tem
poral_locality#ixzz1l6tZx0L3
Solution:
Since r2 contains 1234h, the bit pattern corresponding to this value will be sent out to the
output port at address 222 (or DEh). This is the address of the output port in this
13 Dependingon the way the assembler is written, the syntax of the out instruction may allow only the
decimal form of the port address, or only the hexadecimal form, or both. Our version of the assembler for
the FALCON-A allows the decimal form only. It also requires that the port address be aligned on 16-bit
“word boundaries”, which means that every port address should be divisible by 2.
Advanced Computer Architecture-CS501
www.vustudents.ning.com
11
________________________________________________________
Last Modified: 17-Feb-07 Page 247
example. Writing the bit pattern in binary will help us determine the LEDs which will be
ON.
Now 1234h gives us the following bit associations with the data bus
0001001000110100
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
MSB at address DEh LSB at address DFh
Note that the 8-bit register which uses lines D15 .. D8 of the FALCON-A’s data bus is
actually mapped onto address DEh of the I/O space. This is because the architect of the
FALCON-A had chosen a “byte-wide” (i.e., x8) organization of the address space, a 16-
bit data bus width, and the “big-endian” data format at the ISA design stage.
Additionally, data bus lines D15...D8 will transfer the data byte of higher significance
(MSB) using address DEh, and D7...D0 will transfer the data byte of lower significance
(LSB) using address DFh. Thus the LEDs at L12, L9, L5, L4 and L2 will turn on.
Example 11
Consider a 2-way set-associative cache with 64KB capacity and 16 byte lines.
a. How many sets are there in the cache?
b. How many bits of address are required to select a set in the cache?
c. Repeat the above two calculations for a 4-way set-associative cache with
same size.
Solution
a. A 64KB cache with 16 byte lines contains 4096 lines of data. In a 2-way set
associative cache, each set contains 2 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.
Advanced Computer Architecture-CS501
________________________________________________________
Last Modified: 17-Feb-07 Page 376
c. The cache with 64KB capacity and 16 byte line has 4096 lines of data. For a 4-
way set associative cache, each set contains 4 lines, so the number of sets in the
cache would be 1024 and Log 2 (1024) =10. Therefore 10 bits of the address are
required to select a set in the cache.
www.vustudents.ning.com
12
I/O Ports
I/O Ports: I/O ports are labeled as “14” in Figure 6. These ports are available
for the user to enter input operation values and visualize output operation
values whenever an I/O operation takes place in the program. The input
value for an input operation is given by the user before an instruction
executes. The output values are visible in the I/O port area once the
instruction has successfully executed.
List File
List File: Labeled as “3”, in Figure 1, the List File feature gives a detailed
insight of the FALCON-A listing file, which is produced as a result of the
execution of the 1st and 2nd-pass. It shows the Program Counter value in
hexadecimal and decimal formats along with the machine code generated for
every line of assembly code. These values are printed when the 2nd-pass is
completed.
Single Step
Single Step: “Single Step” lets the user execute the program, one instruction
at a time. The next instruction is not executed unless the user does a “single
step” again. By default, the instruction to be executed will be the one next in
the sequence. It changes if the user specifies a different PC value using the
Change PC option (explained below).
Change PC: This option lets the user change the value of PC
(Program Counter). By changing the PC the user can execute the
instruction to which the specified PC points
Error Log
Error Log: The Error Log is labeled as “4” in Figure 1. It informs the user
about the errors and their respective details, which occurs in any of the
www.vustudents.ning.com
13
bytes/sector, 2048 sectors per track and 4096 tracks per platter
How many platters are required for a 40GB disk if there are 1024
bytes/sector, 2048 sectors per track and 4096 tracks per platter
Solution
The capacity of one platter
= 1024 x 2048 x 4096
= 8GB
For a 40GB hard disk, we need 40/8
= 5 such platters.
How many platters are required for a 80GB disk if there are 1024
bytes/sector, 2048 sectors per track and 4096 tracks per platter
www.vustudents.ning.com