Home Work 3: Class: M.C.A SECTION: RE3004 Course Code: CAP211
Home Work 3: Class: M.C.A SECTION: RE3004 Course Code: CAP211
ON
Class: M.C.A
SECTION: RE3004
RISC vs CISC is a topic quite popular on the Net. Everytime Intel (CISC)
or Apple (RISC) introduces a new CPU, the topic pops up again. But
what are CISC and RISC exactly, and is one of them reallybetter?
Explain in simple terms what RISC and CISC are and what the future
might bring for the both of them. This article is by no means intended as
an article pro-RISC or pro-CISC. You draw your own conclusions …
CISC:-
Pronounced sisk, and stands for Complex Instruction Set Computer. Most
PC's use CPU based on this architecture.
Typically CISC chips have a
large amount of different and complex instructions. The philosophy
behind it is that hardware is always faster than software, therefore one
should make a powerful instructionset, which provides programmers with
assembly instructions to do a lot with short programs.
In common
CISC chips are relatively slow (compared to RISC chips) per instruction,
but use little instructions.
RISC:-
Pronounced risk, and stands for Reduced Instruction Set Computer. RISC
chips evolved around the mid-1980 as a reaction at CISC chips. The
philosophy behind it is that almost no one uses complex assembly
language instructions as used by CISC, and people mostly use compilers
which never use complex instructions. Apple for instance uses RISC
chips.
Therefore fewer, simpler and faster instructions would
be better, than the large, complex and slower CISC instructions.
However, more instructions are needed to accomplish a task. An other
advantage of RISC is that - in theory - because of the more simple
instructions, RISC chips require fewer transistors.
For example, supports more instructions than the Pentium. Yet the 601 is
considered a RISC chip, while the Pentium is definitely CISC. Further
more today's CISC chips use many techniques formerly associated with
RISC chips.
Source code
1. Hand-tuning 2. Preprocessor
3. Compiler front end
optimization Optimization
Preprocessor-
Hand-tuned Intermediate
tuned source
source code language code
code
4. Back end optimization
Object code
Its back end optimizer then translates the IL code into machine language
and in this process it may apply a wide range of optimizations at the IL
level, depending on the user-selectable flag settings which invoke
specific sets of optimizations.
Optimization Examples
An Array-Processing Example
Consider the two codes shown in Figure 3 which perform element-wise
array multiplication [6]. These codes are clearly seen to be functionally
equivalent.
do i=1,n do j=1,n
do j=1,n do i=1,n
c(i,j)=c(i,j)+a(i,j)*b(i,j) c(i,j)=c(i,j)+a(i,j)*b(i,j)
enddo enddo
enddo enddo
a) stride_n.f b) stride1.f
The only difference between the two examples in Figure is that the array
elements are referenced in a different order. All runs were made on an
IBM RISC System/6000, Model 530 with a 64KB cache. The arrays were
all declared REAL*8. A timing loop was inserted around the loops in the
examples so that the reported time is the average of 50 million inner loop
iterations.
5
4.5 stride1
4 striden
Time( (Microsecond)
3.5
3
2.5
2
1.5
1
0.5
0
10 25 37 50 100 166 200 333 500
n
However, if other entries in this line are referenced much later (as in
stride_n), the line with the referenced entries may get replaced in the
cache before they are referenced; referencing an element that is in the
cache is called a cache hit, otherwise the reference is a cache miss and
suffers a delay called the miss penalty. The advantage of the stride1 code
is that there is roughly one miss per cache line of elements accessed,
1st stage receives some parts, performs its assembly task, and passes the
1
results to the second stage;
2nd stage takes the partially assembled product from the first stage,
performs its task, and passes its work to the third stage;
3rd stage does its work, passing the results to the last stage, which
completes the task and outputs its results.
As the first piece moves from the first stage to the second stage, a new set
of parts for a new piece enters the first stage. Ultimately, every stage
processes a piece simultaneously. This is how time is saved. Each product
requires the same amount of time to be processed (actually slightly more,
to account for the transfers between stages), but products are
manufactured more quickly because several are being created at the same
time.
Solution:
Part - B
.
Q4: How RISC pipelines are implemented in RISC environment?
The IBM 801, the first RISC computer, also uses a four-stage instruction
pipeline.
Other processors, such as the RISC II, use only three stages; they
combine the execute and store result operations in to a single stage.
Note that each stage has a register that latches its data at the end of the
stage to synchronize data flow between stages.
The Pentium provides greatly increased performance over the 486 chips that
precede it, due to several architectural changes. Roughly speaking,
a Pentium chip is double the speed of a 486 chip of the same clock speed. In
addition, the Pentium goes to much higher clock speeds than the 486 ever
did. The following are the key architectural enhancements made in the
Pentium over the 486-class chips (note that some of these are present in
Cyrix's 5x86 processor, but that chip was developed after the Pentium):
Wider Data Bus: The Pentium's data bus is doubled to 64 bits, providing
double the bandwidth for transfers to and from memory.
Split Level 1 Cache: The Pentium uses a split level 1 cache, 8 KB each for
data and instructions. The cache was split so that the data and instruction
caches could be individually tuned for their specific use.
Improved Floating Point Unit: The floating point unit of the Pentium is
significantly faster than that of the 486.
Pentiums use three different sockets. The original Pentium 60 and 66 use
Socket 4. Pentiums from 75 to 133 will fit in either socket 5 or socket 7;
Pentium 150s, 166s and 200s require Socket 7. Intel makes Pentium Over
Drives that allow the use of faster Pentiums in older Pentium sockets (in
addition to Over Drives that go in 486 motherboards).
If you suspect your Pentium of having the FDIV bug, try this computation
test using a spreadsheet or calculator program: take the number 4,195,835
and divide it by 3,145,727. Then take the result and multiply it by the same
number again (3,145,727). You should of course get the same 4,195,835
back that you started with. On a PC with the FDIV bug you will get
4,195,579 (an error of 256), but beware that some operating systems and
applications have been patched to compensate for this bug, so a simple math
test isn't necessarily conclusive. Try looking at this page on Intel's web
site for replacement information, if you suspect that you have an FDIV bug
on your older Pentium chip.
For many years, the Pentium processor was the mainstream processor of
choice, but finally the Pentium with MMX has driven it to the economy
market. With the regular Pentium maxing out at 200 MHz and the Pentium
with MMX 166 dropping well below $200, the "Pentium Classic" doesn't
make nearly as much sense as it used to for new PCs. The 60 and 66 are
obsolete due to their slow speed and older technology, and the 75 to 150 are
obsolete because their performance is much lower than the 166 and 200, for
almost the same amount of money.
The entire classic Pentium line is now technically obsolete, due to the
availability of inexpensive, faster Pentium with MMX chips (as well as
comparable offerings from AMD and Cyrix). The non-MMX Pentium is no
longer generally used in new systems. However, since the Pentium with
MMX requires split rail voltage, the classic Pentium 200 remains a great
chip for those who have socket 7 motherboards and want to upgrade, but
who do not have split rail voltage support.
Vector and array processing are essentially the same because, with slight
and rare differences, a vector processor and an array processor are the
same type of processor. A processor, or central processing unit (CPU),
is a computer chip that handles most of the information and functions
processed through a computer.
Vector processor and Array processor are just the same thing, its a CPU
design where instruction are set includes operations that can perform
mathematical operations on multiple data elements simultaneously.
P1 P2 Pn