Date post: | 08-Apr-2018 |
Category: |
Documents |
Upload: | isuru-pasan-dasanayake |
View: | 219 times |
Download: | 0 times |
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 1/12
CS 2842-Computer Systems
ASSIGNMENT 02
Name: V.I.P. Dasanayake
Index Number: 090075M
Field: Electrical engineering
1
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 2/12
(1) Memory Hierarchy
This is mainly base on performances and cost of various kinds of memories such as
flash memory register, RAM, hard disks...etc. Memory hierarchy means put those
sections such as RAM, registers, hard drives …etc in a Oder based on performances and
prices, Other than that physical size, fast.
The principle of memory usage is
To optimize memory performances for a given cost set of technologies are arranged
in a hierarchy that contains a relatively small amount of fast memory and larger
amount of less expensive, but slower memory.
Data transfer speed in hard drive and registers are very different so they can’t
exchange data. So there should be some memories which speed is close to both speeds.
For that purpose there are some memories which supports to that. And the other thing is
when it is want to show some huge data (which have high memory capacity) it can’t be
shown due to the huge memory. Computer may take long time to load that data, so to
minimize that time there are several memories. These memories should have to put in
order. Memory hierarchy concept helps for that. So data transfer is happening b the
combination of all these memories. Here are some memories which are in the order of
the concept of Memory Hierarchy.
2
Cache
RAM
Register
Tape backup
Hard drive
Flash
..Price
..Fast
..Cost
ly
..Vola
til e
..S
mall
size
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 3/12
(2)i. Latency
Latency is the time that elapses between the start of an operation and the completion
(the delay between the time a bit is sent and the time the bit is received). This is usuallymeasured by nanoseconds (ns). This is a measure of the time required to perform a
transfer .
Latency doesn’t sufficient as a measure of memory performance. Latency is a
simplistic measure that doesn’t provide complete information.
ii. Memory Controller
There is a speed difference between the memory and the processor/CPU. So memory
controller supports to communication happens between processor and memory. While the
data transfers to processor from memory controller gets data from memory. So the datawhich receives from the controller is not fresh because data transfers to the processor
from controller are happening gradually.
Hardware use for memory access
To access memory a processor presents a read or write request to the controller.
Controller translates the memory address request to signals and passes to memory chips.
iii. Memory bus
This is a parallel interface which decides memory transfer size. Memory controller
provides the connection between a physical memory and a processer that uses the
memory. To achieve high performances, memory systems use parallelism. The processor
and the controller connected parallel with several wires and those wires can transfer one
data bit at any time. Those wires are called Memory bus.Control circuits in the memory use the address to select the bits at the specified
location in RAM and send a copy of the data back to the CPU over the memory bus.
(Technical name for the hardware connection between a processor and memory is
memory bus)
This can be shown as below.
Memory bus ( wires )
3
ControllerPhysical memory
Processor
ProcessorPhysical
memoryController
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 4/12
iv. Little-endian
When sending a byte of data over a network, both sending and receiving data should
be equaled as they will be transferred most significant bit or least significant bit first.
When a system that numbers bytes of an integer from least significant to most significant,we call it as little endian system.
Example:-
Number one expressed as thirty two bit
3 2 1 0
Little endian
(Least significant byte is zero)
v. Virtual Memory
Virtual memory means a mechanism that hides the details of the underlying physical
memory to provide a more suitable memory environment. We can simplify this as when
controller wants new data which aren’t include in the RAM, RAM replace some old data
and give the data to controller.
Illustration of a virtual memory system that an address space two physical memories
4
0000
0000
0000
0001
Memory 2
Memory 1Processor seesa singlecontiguousmemory
Address
0
999 1000
1999
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 5/12
(3)
i. Random Access Memory (RAM)
The term RAM is generally understood to refer to volatile memory, which can be
written as well as read. Mainly there are two types of RAM as Static RAM ( SRAM ) and
Dynamic RAM ( DRAM ).Those are alternatives to each other.
SRAM:-
This is the Easiest type for programmer because it is a straight forward extension of
digital logic. SRAM consists of transistors. Though this has a high speed, power
consumption and heat generating of this is relatively very high. Because when multiple
transistors operate continuously each transistor consumes power and generates heat in
small amount.
Miniature SRAM circuit that stores one data bit
DRAM:-
DRAM consumes less power because it consists of capacitors. When a value is
written to DRAM the hardware charges or discharges the capacitor to reflect the digital
value. Computer that uses DRAM contains an extra hardware circuit called a refresh
circuit which can perform fast writing and reading a bit. External refresh circuit
periodically read data and writes it back again or charge will dissipate and the value will
be lost.
When consider all the things most computer memories are composed of DRAM rather
than SRAM
A bit in a DRAM
5
Refresh
Circuit for
one bit
Writeenable
Output
Input
Circuit for
one bit
Writeenable
Output
Input
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 6/12
ii. Magnetic disks
Floppy and hard disk drives store information on magnetic disks. The disk is a thin,
flexible piece of plastic with little magnetic particles inlayed in its surface. The read-write
head creates a small magnetic field that aligns the magnetic poles of the particles on thesurface of the disk directly beneath the head to write data to the disk. While particles
aligned in one direction represent a “0”, particles aligned in the opposite direction
represent a “1”.The drive head scans the surface of the disk to read data from a disk. The
magnetic fields of the particles in the disk induce an alternating electric current in the
read-write head, which is then translated into the series of “1”s and “0”s that.
The main components of a disk drive are
a) The motor , which rotates the disk,
b) The read-write mechanism,
c) The logic board , (which receives commands from the operating, system to place or
retrieve information on the disk)
Floppy and hard drives use a small magnetic head to magnetize portions of the disk surface, to read or write information to a magnetic disk
iii. Tape drive
Tape drive is a data storage which can read and write data on a magnetic tape.
A tape drive provides random access storage. Tape drive can stream data from to tape
very quickly, because it spends much time winding tape between reels to read and
write any piece of data.
Now in market there are several tape drives which can store data by
compressing it to half of its original capacity. So if there has been mentioned 80/160,
it means that its true storage is 80 and it can store nearly 160 by compressing data to
80. Companies like IBM, Sony use higher compression ratio for their tape drives.
Compression ratio is depends on what type of data is being compressed. The true
storage capacity is known as the native capacity or the raw capacity.
Tape drive can be connected to computer using SCSI , Fiber channel , SATA,
USB. Earlier tape drive is designs as an alternative for disk drives and those are little
bit cheap than disk drives.
iv. Registers
Information is stored in a CPU memory location called a register. Registers can be
thought as the CPU’s tiny pad, temporarily storing instructions or data. Register capacity
is the total number of bits or bytes that a register in a microprocessor can store. Register isa volatile memory. There are two types of registers called program counter and
instruction register.
Program counter:-
When a program is running, register called the program counter keeps track of which
program instruction comes next by maintaining the memory location of the next program
instruction to be executed. The CPU’s control unit coordinates and times the CPU’s
functions, and it uses the program counter to locate and retrieve the next instruction from
memory. In other words we can say that it stores the address of instructions which are
coming through address bus.
Instruction register:-
The instruction travels along the memory bus from the computer’s memory to theCPU, is stores in instruction register
6
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 7/12
(4)Von Neumann Architecture
When a computer follows Von Neumann Architecture it uses the stored program
approach in which program resides in memory. The hardware that follows Von NeumannArchitecture consists of three principle components that interact,
1. Processor,
2. Memory,
3. Input Output facilities (I/O facilities)
Von Neumann Architecture concept can be shown as below.
Computer
(5)
I.
Fixed logic processors selectable logic processors
Can Perform only single
operation
Can’t change the function
Parameters of the function can’t
be changed
Less flexible
Multiple operations
Function is specified when the
processor is invoked
Can’t change the function
Parameters of the function can’t be
changed
More flexible
7
Processor
Input Output Facilities
Memory
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 8/12
II.
Fixed logic processors Parameterized logic processors.
Can Perform only singleoperation
Can’t change the function
Parameters of the function can’t
be changed
Less flexible
Performs pre determined operation Accepts a set of parameters that
control the operation
Mostly like fixed logic processors
Parameters of the function can be
changed
More flexible
(6)
Structure of the CPU:-
Information from an input device or from the computer’s memory is communicated
via the bus to the central processing unit (CPU), which is the part of the computer that
translates commands and runs programs. The CPU is a microprocessor chip that is, a single
piece of silicon containing millions of tiny, wired electrical components.
There are five major component of the CPU.
1. Controller
2. Computational Engine (ALU)
3. Local Data Storage
4. Internal Interconnections
5. External Interface
1. Controller
Controller is known as the heart of the computer because it Coordinates
operations. As it is mentioned earlier memory controller supports to communication
happens between processor and memory. Though there are four other structures of CPU, this is the most important thing.
2. Computational Engine (ALU)
An ALU consists of a single, complex hardware unit that can perform various
kinds of operations. (It provides operation on integer arithmetic, operation on bits
such as left or right shift. And hardware that performs logical operation such as
Boolean and, or, exclusive or and not) when ALU perform some operation such as
addition, subtraction, and bit shifting, remain functional units which supports to the
operation provide mechanisms that interface to the ALU to the rest of the system. The
computational engine doesn’t perform multiple or initiate activities. The engine only
operates at the request of the controller.
8
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 9/12
3. Local Data Storage
Mainly it is about hardware registers. As it is mentioned before information is stored
in a CPU memory location called a register. Register is a volatile memory. In here it is
dealing with memory size bites. This is a most important part of memory in the computer.
There are several register as instruction register, program counter. This registers get andsupply data to perform some operation and show.
4. Internal Interconnections
This is called data path also. The instruction code that tells the computer which
operation to perform also specifies which memory address or addresses to access. An address
is sent through wires called an address bus from the CPU to the main memory (RAM).
Control circuits in the memory use the address to select the bits at the specified location in
RAM and wires called a data bus, send a copy of the data back to the CPU. These address bus
and data bus are internal interconnections.
Internal interconnection is used to move data values from local storage to the
computational engine or move results from the computational engine to local storage. Internalinterconnections are in the CPU.
5. External Interface
This unit handles all communication between processor and the rest of the computer
system. Especially it is happening between the process and the external memory. While
there are several connections between external interface and ALU, controller, local storage,
there is also an external connection.
9
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 10/12
1100 01 10
(7)
Memory AccessingHere it can be use to write to the memory or read from the memory .
MBR:-Memory Buffer Register (MBR) is also called as Memory Data Register (MDR). All
the data in the MBR are situated according to an order. There are addresses in MAR in
HIGH, LOW manner. As Left number in MDR represents the HIGH part of MAR, right
number in MDR represents the LOW part.
MAR:-
MAR means Memory Address Register. To access a certain memory address for
MAR the controller give the address to MAR then is divided to low and high. As an example
when left bites of the address becomes the HIGH part of MAR, right part becomes LOW part
of MAR
The identifying of the address is can be explained as follows.
Example:-address=1101
The address = 10 | 01
The address
10
00
01 10 11
HIGH LOW
0, 0 0, 1 0, 2 0, 3
1, 0 1, 1 1, 2 1, 3
2, 0 2, 1 2, 2 2, 33, 0 3, 1 3, 2 3, 3
MDR
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 11/12
(8)Fetch –Execute cycle
Though the details among programmable processors are varying, all those processors
are following this fetch execution cycle.
The main idea of this is
When there is a stored point in a program, after accessing the next step of
The program from that point, it will be executed to perform steps of the program. This
whole thing will repeat forever
There are two main parts of this as Fetch cycle and Execute cycle. In fetch cycle there
are 3 steps and in Execute cycle there are two steps.
• In Fetch cycle
1) Fetch instruction
2) Decode opcode
3) Fetch operands
•
In Execute cycle4) Perform operation
5) Store result
In the Von Neumann Architecture the loop which is described earlier will continue
among processor, memory, Input Output facilities. The loop can briefly describe by following
picture.
11
Cycle happen of the Von Neumann Architecture
8/6/2019 V.I.P. Dasanayake_computer System
http://slidepdf.com/reader/full/vip-dasanayakecomputer-system 12/12
(9)There are two types of registers
IR – Instruction Register
PC – Program Counter (IP – Instruction Pointer)
While the Program counter stores the address of the instructions, Instruction Register
stores the instruction. Execution Flow Control happens using the value on the PC.
Program counter:-
When a program is running program counter keeps the track of which program
instruction comes next by maintaining the memory location of the next program
instruction to be executed. Address bus give these instruction addresses to the program
counter
Instruction register:-
While this program counting happening instruction coming along memory bus stored
in the instruction register.
Controller is the logical thing CPU (ALU is just doing some calculation only)
in CPU. When busses travel addresses and instruction to PC and IR, they store it. Whilethis happening memory controller supports to communication happens between processor
and memory. So when we consider execution of a program
Execution of a program with the control of the controller
12
ALU
Store theinstructions
Store the
address of
the
instruction