COA Notes
COA Notes
COMPUTER SCIENCE
LEVEL 6
The term Computer architectures refer to a set of rules stating how computer software and hardware are
combined together and how they interact to make a computer functional, furthermore, the computer architecture
also specifies which technologies the computer is able to handle.
Computer architecture is a specification, which describes how software and hardware interact together to
produce a functioning platform.
When a person thinks of the word “architecture”, the human mind will probably think of the assembly of buildings
or houses, moreover, with the same principle in mind, computer architecture involves the construction of a
computer system internally and externally.
System design:
The system design is the hardware parts, which includes multiprocessors, memory controllers, CPU,
data processors, and direct memory access. The system design can be considered to be the actual
computer system.
Instruction set architecture:
This revolves around the CPU. It includes the CPU capabilities and functions, furthermore it also
includes the CPU’s data formats, programming language and processor register types and instructions,
which are used by the computer programmers.
The CPU is the part in a computer, which makes a program run, whether it was the operating system or
an application like Photoshop.
Microarchitecture:
The microarchitecture in a system will define the storage element/data paths and how they will be
implemented into the instruction set architecture, the microarchitecture also is responsible for data
processing.
All these will get together in a certain order to make the system functional.
What is the von Neumann Architecture?
In 1945, John von Neumann, who was a mathematician at the time, had delved into the study that, a computer
could have a fixed simple structure and still be able to execute any kind of computation without hardware
modification. This is providing that the computer is properly programmed with proper instructions, in which it is
able to execute them.
Von Neumann’s primary advancement was referred to as “conditional control transfer”, which had allowed a
program sequence to be interrupted and then reinitiated at any point, furthermore, this advancement had
allowed data to be stored with instructions in the same memory unit.
This was beneficial because if instructions were desired, they can be arithmetically modified in the same way as
the data.
The von Neumann architecture describes a design model for a stored program digital computer that incorporates
only one single processing unit and one single separate storage structure, which will hold both instructions and
data.
The von Neumann architecture refers to one that keeps the data as well as the programmed instructions in read-
write RAM (Random Access Memory).
The control unit retrieves instruction and data in the same way
from one memory unit. This simplifies the development and Parallel executions of programs are not allowed due to serial instruction proces
design of the control unit
The above advantage would also mean that data from memory
Only one “bus” can be accessed at a time. This results in the CPU being idle (a
and from devices are accessed the same way. Therefore
faster than a data bus) This is considered to be the von Neumann Bottlenec
increasing efficiency
Although both instructions and data being stored in the same place can be viewe
An advantageous characteristic is that programmers have control
advantage as a whole. This can however result in re-writing over it, which results
of memory organisation
loss, due to an error in a program
If a defective program fails to release memory when they don’t require it (or fini
it), it may cause the computer to crash, as a result of insufficient memory avail
Caching:
Data which is more easily accessible in RAM, rather than stored in the main memory. The type of data
stored here will be the type of data, which is frequently used.
Prefetching:
The transport of some data into cache before it is requested. This will speed access in the event of a
request of the data.
Multithreading:
Managing many requests at the same time in separate threads.
New types of RAM:
Such as DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access Memory).
This type of RAM activates output on both the falling edge and the rising edge of the system clock,
instead of just the rising edge.
This can potentially double the output.
RAMBUS:
A subsystem connecting RAM controller, RAM, and the bus (path) connecting RAM to the
microprocessor and devices within the computer that utilise it.
Processing in Memory (PIM):
PIM’s integrate a processor and memory in single microchip.
The computer-stored instructions on “punched tape” (24 bits wide), furthermore the data was stored in electro
mechanical counters. The CPU of these early computer systems contained the data storage entirely, and it
provided no access to the instruction storage as data.
Harvard architecture is a type of architecture, which stores the data and instructions separately, therefore
splitting the memory unit.
The CPU in a Harvard architecture system is enabled to fetch data and instructions simultaneously, due to the
architecture having separate buses for data transfers and instruction fetches.
The memory dedicated to each (data and instructions) must be balanced by the
Due to instructions and data being transferred in different buses,
manufacturer. Because if there is free memory data memory, it cannot be used for
this means there is a smaller chance of data corruption
instructions and vice versa
However, this advantage (to the left) results in a more complex architecture, as it
Instructions and data can be accessed the same way requires two buses. This means it takes more time to manufacture and it makes these
systems more expensive
Based on the stored-program computer concept Based on the Harvard Mark I relay-based computer model
Uses the same physical memory address for instructions and data It uses separate memory addresses for instructions and data
The processors require two clock cycles to execute an instruction Processor requires only one cycle to complete an instruction
The von Neumann architecture consists of a simpler control unit design, Harvard architectures control unit consists of two buses, which results in a
which means less complex development is required. This means the system more complicated system. This adds to the development cost, resulting in a
will be less costly more expensive system
Instruction fetches and data transfers cannot be performed at the same time Instruction fetches and data transfers can be performed at the same time
Used in laptops, personal computers, and workstations Used in signal processing and micro-controllers
Modified Harvard Architecture
A pure Harvard architecture suffers from the disadvantage that the mechanism must be provided to separate the
load from the program to be executed into instruction memory and thus leaving any data to be operated upon
into the data memory.
However modern systems nowadays use a read-only technology for the instruction memory and read/write
technology for the same memory.
This allows a system to allow the execution of a pre-loaded program as soon as power is applied.
However, the data will be in an unknown state, therefore it cannot provide any pre-defined values to the
program.
The solution to this is to provide machine language instructions so that the contents of the instruction memory
can be read as if they were data, as well as providing a hardware pathway.
Most adoptions of Harvard architecture nowadays is a modified form, this is to loosen the strict separation
between the data and the code, whilst still maintaining a high-performance concurrent data and instruction
access of the original Harvard architecture.
The modified Harvard architecture is a variation of the original Harvard architecture. However, the difference
between the two of them is, the modified architecture allows the contents of the instruction memory to be
accessed as data.
Split-cache architecture:
Very similar to the von Neumann architecture, this modification builds a memory hierarchy with CPU
caches for instructions and data at lower levels of hierarchy.
Instruction-memory-as-data architecture:
This modification allows to access the content of the instruction memory as the data. This can be
carried because data cannot directly get executed as instructions.
(Though there is a debate to whether or not this actually can be named as “Modified” Harvard
architecture)
Data-memory-as-instruction architecture:
Executing instructions fetched from any memory segment, unlike Harvard architecture, which can only
execute instructions, fetched from the program memory segment.
Summary and Facts
The von Neumann Architecture was a large advancement from the program-controlled computers, which were
used in the 1940’s. Such computer were programmed by setting the inserting patch leads and switches to route
data and control signals between different functional sets.
Whereas nowadays, the majority of computer systems share the same memory for both data and program
instructions.
The CPU in a Harvard architecture system is enabled to fetch data and instructions simultaneously, due to the
architecture having separate buses for data transfers and instruction fetches.
Split-cache architecture
Instruction-memory-as-data architecture
Data-memory-as-instruction architecture
RISC and CISC Processors
The general definition of a processor or a microprocessor is: A small chip that is placed inside the computer as
well as other electronic devices.
In very simple terms, the main job of a processor is to receive input and then provide the appropriate output
(depending on the input).
Modern-day processors have become so advanced that they can handle trillions of calculations per second,
increasing efficiency and performance.
Both RISC and CISC architectures have been developed largely as a breakthrough to cover the semantic gap.
The semantic gap, is the gap that is present between machine language and high-level language.
Therefore the main objective of creating these two architectures is to improve the efficiency of software
development, and by doing so, there have been several programming languages that have been developed as a
result, such as Ada, C++, C, and Java etc.
Therefore to allow for efficient compilation of these high-level language programs, RISC and CISC are used.
The word “Reduced Instruction Set” may be incorrectly interpreted to refer to “reduced number of instructions”.
Though this is not the case, the term actually means that the amount of work done by each instruction is
decreased in terms of the number of cycles.
Due to the design of Alan Turing 1946 Automatic Computing Engine, it had many characteristics that resembled
RISC architecture, furthermore many traits of RISC architectures were seen in the 1960s due to them
embodying the load/store approach.
That being said the term RISC had first been used by David Patterson of “Berkeley RISC project”, who is
considered to be a pioneer in his RISC processor designs. Patterson is currently the Vice-Chair of the Board of
Directors of the RISC-V Foundation.
A RISC chip doesn’t require many transistors, which makes them less costly to design and produce. One of
RISCs main characteristics is that the instruction set contains relatively simple and basic instructions from which
more complex instructions can be produced.
RISC processors/architectures are used across a wide range of platforms nowadays, ranging from tablet
computers to smartphones, as well as supercomputers (i.e. Summit top500 list in 2018).
Thread level parallelism can also be identified as “Task Parallelism”, which is a form of parallel computing for
multiple computer processors, using a technique for distributing the execution of processes and threads across
different parallel processor nodes. This type of parallelism is mostly used in multitasking operating systems, as
well as applications that depend on processes and threads.
Instruction Level Parallelism:
Instructions level parallelism increases the speed of the CPU in executing instructions. This type of parallelism
that measures how many of the instructions in a computer can be executed simultaneously.
However, Instruction level parallelism is not to be confused with concurrency. Instruction level parallelism is
about the parallel election of a sequence of instructions, which belong to a specific thread of execution of a
process.
Whereas concurrency is about threads of one or different processes being assigned by the CPU’s core in a
mannered and strict alteration or in true parallelism (provided that there are enough CPU cores).
Until recent times, all major manufacturers of microprocessors had used CISC based designs to develop their
products. The reason for that was because, CISC was introduced around the early 1970s, where it was used for
simple electronic platforms, such as stereos, calculators, video games, not personal computers, therefore
allowing the CISC technology to be used for these types of applications, as it was more suitable.
However, eventually, CISC microprocessors found their way into personal computers, this was to meet the
increasing need of PC users. CISC manufacturers started to focus their efforts from general-purpose designs to
a high-performance computing orientation.
Advantageously, CISC processors helped in simplifying the code and making it shorter in order to reduce the
memory requirements.
In CISC processors, every single instruction has several low-level operations. Yes, this makes CISC instructions
short, but complex.
However, to do this, CISC has to embed some of the low-level instructions in a single complex instruction.
Moreover, this means that when it is decoded, this instruction generates several microinstructions to execute.
Control Unit:
The control units access the control signals, which are produced by the microprogram control unit, moreover,
they operate the functioning of processors hardware.
Due to CISC instructions being of variable length, and having multiple operands, as well as complex addressing
Implementing pipelining on RISC is modes and complex instructions this increases complexity. Furthermore, CISC as defined above occupies more
easier than a memory word. Thus taking several cycles to execute operand fetch. Implementing pipelining on CISC is
complicated
Although the above showcases differences between the two architectures, the main difference between RISC
and CISC is the CPU time taken to execute a given program.
CPU time = (number of instruction) x (average cycles per instruction) x (seconds per cycle)
RISC architectures will shorten the execution time by reducing the average clock cycle per one instruction.
However, CISC architectures try to reduce execution time by reducing the number of instructions per program.
Summary and Facts
A reduced Instruction Set Computer (RISC), can be considered as an evolution of the alternative to Complex
Instruction Set Computing (CISC). With RISC, in simple terms, its function is to have simple instructions that do
less but execute very quickly to provide better performance.