The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

omputer Systems Architecture provides IT professionals and students with the necessary understanding of computer hardware. It addresses the ongoing issues related to computer hardware. The book describes the bus system, algorithms for ensuring data integrity, input and output (I/O) components, methods for performing I/O, various aspects relevant to software engineering, and non-volatile storage devices, such as hard drives and technologies for enhancing performance and reliability.

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by nurshaminie, 2021-11-09 18:26:17

INTRODUCTION TO COMPUTER SYSTEM ARCHITECTURE

omputer Systems Architecture provides IT professionals and students with the necessary understanding of computer hardware. It addresses the ongoing issues related to computer hardware. The book describes the bus system, algorithms for ensuring data integrity, input and output (I/O) components, methods for performing I/O, various aspects relevant to software engineering, and non-volatile storage devices, such as hard drives and technologies for enhancing performance and reliability.

Keywords: COMPUTER ARCHITECTURE

INTRODUCTION TO
COMPUTER ARCHITECTURE

1st Edition 2021

NUR SHAMINIE BINTI WAKIMIN

INTRODUCTION TO
COMPUTER ARCHITECTURE

1st Edition 2021

NUR SHAMINIE BINTI WAKIMIN

COPYRIGHT

All rights reserved. No part of this publication
may be reproduced, stored in a retrieval

system, or transmitted in any form or by any
means, electronic, mechanical, photocopying,

photographs, recordings, etc. without the
prior permission of Politeknik Mukah.



1 s t E d i t i
o n 2 0 2 1



Author
Nur Shaminie binti Wakimin





Published:
POLITEKNIK MUKAH SARAWAK
KM7.5,JALAN OYA
96400 MUKAH
SARAWAK
TEL: 084-874001
FAKS: 084-874 005
www.pmu.edu.my

EISBN : 978-967-2097-34-1

©NURSHAMINIE BINTI WAKIMIN

PREFACE

Computer Systems Architecture provides IT professionals
and students with the necessary understanding of
computer hardware. It addresses the ongoing issues
related to computer hardware. The book describes the bus
system, algorithms for ensuring data integrity, input and
output (I/O) components, methods for performing I/O,
various aspects relevant to software engineering, and non-
volatile storage devices, such as hard drives and
technologies for enhancing performance and reliability.

©NURSHAMINIE BINTI WAKIMIN

ABOUT THE AUTHOR













Nur Shaminie binti Wakimin.
Lecturer Politeknik Mukah Sarawak
[email protected]



















©NURSHAMINIE BINTI WAKIMIN

TABLE OF CONTENTS I COMPUTER FUNCTIONS AND INTERCONNECTIONS

1 The Computer System
4 Computer Architecture
5 Computer Organization
6 Computer Architecture vs Computer Organization
7 Computer Function
8 Computer Interconnection Structures
16 Bus Interconnection

II CONCEPT OF CACHE MEMORY

21 Cache Memory
23 How Cache Memory Work
25 Types of Cache Memory
27 How CPU Take Data
28 Cache Mapping

©NURSHAMINIE BINTI WAKIMIN

TABLE OF CONTENTS III INPUT/OUTPUT IN COMPUTER SYSTEM

32 Input / Output Module
36 List of Input / Output Devices
37 Input / Output Bus & Interface Modules
38 Parallel Interfaces
39 Serial Interface
40 Example of Interfaces

IV INPUT/OUTPUT DATA TRANSFER

41 Asynchronous Serial Transfer
42 Asynchronous Communication Interface
43 Mode Of Transfer : Programmed I/O, Interrupt-

Initiated I/O and Direct Memory Access

©NURSHAMINIE BINTI WAKIMIN

UPON COMPLETION OF THIS COURSE,
STUDENTS SHOULD BE ABLE TO :

I Explain the computer functions and interconnections.
II Describe the concept of cache memory
III Identify Input / Output in computer system.
IV Explain Input/ Output data transfer.

©NURSHAMINIE BINTI WAKIMIN

ICOMPUTER
FUNCTIONS AND
INTERCONNECTIONS

1 The Computer System

4 Computer Architecture
5 Computer Organization

6 Computer Architecture vs Computer
Organization

7 Computer Function

8 Computer Interconnection Structures

16 Bus Interconnection

1 I

THE COMPUTER SYSTEM

A computer system primarily comprises a central processing
unit (CPU), memory, input/output devices and storage devices.
All these components function together as a single unit to
deliver the desired output. A computer system comes in various
forms and sizes. It can vary from a high-end server to a personal
desktop, laptop, tablet computer, or smartphone.

2

WHAT IT IS??

WebCam Monitor
Speaker

Keyboard Mouse

Printer CD/DVD

3I

COMPUTER
A computer is an electronic device that manipulates
information or data. It has the ability to store, retrieve, and
process data.

An electronic device is capable of receiving information (data) in
a particular form and of performing a sequence of operations in
accordance with a predetermined but variable set of procedural
instructions (program) to produce a result in the form of
information or signals.

4I

COMPUTER ARCHITECTURE

Computer architecture is a specification detailing how a set of
software and hardware technology standards interact to form
a computer system or platform.

In short, computer architecture refers to how a computer system
is designed and what technologies it is compatible with. Refers
as a set of attributes of a system as seen by the programmer.
Examples of the Architectural attributes include the instruction
set, the no of bits used to represent the data types, the Input-
Output mechanism, and the technique for addressing
memories.

5I

COMPUTER ORGANIZATION

Computer Organization comes after the decision of Computer
Architecture first. Computer Organization is how operational
attributes are linked together and contribute to realizing the
architectural specification. Computer Organization deals with
structural relationship

Deals with all physical components of computer systems that
interact with each other to perform various functionalities.
Examples of Organizational attributes include hardware details
transparent to the programmer such as control signal and
interfaces between the computer and peripherals; and the
memory technology used.

6I

COMPUTER ARCHITECTURE
VS COMPUTER ORGANIZATION

Table 1 : Computer Architecture Vs Computer Organisation
(https://www.geeksforgeeks.org/differences-between-computer-
architecture-and-computer-organization/)

7I

COMPUTER FUNCTION

Basic functions that a computer can perform are :
Data processing :
Arithmetic and logic instructions

Data storage :
Movement of data into or out of register and or memory
locations

Data movement(Input/Output) :
When data are received & delivered to a device, the process is
known as Input / Output (I/O) instructions & the device is
referred as peripheral.

Control :
Test and branch instructions

8I

COMPUTER INTERCONNECTION
STRUCTURES

A computer consists of a set of components or modules of three
basic types (processor/CPU, memory, I/O) that communicate
with each other.
The collection of paths connecting the various modules is called
the interconnection structure. The design of this structure will
depend on the exchanges that must be made among modules.

Figure 1.1: Major operation performed by Computer System

9I

Interconnection structure must support the following types of
transfers:

Memory to processor: The processor reads an instruction or a
unit of data from memory.
Processor to memory: The processor writes a unit of data to
memory.
I/O to processor: The processor reads data from an I/O device
via an I/O module.
Processor to I/O: The processor sends data to the I/O device.
I/O to or from memory: For these two cases, an I/O module is
allowed to exchange data directly with memory, without
going through the processor, using direct memory access
(DMA).

I10

Input Device
An input device is essentially a piece of instrument or hardware
that allows users to provide information, or control instructions
to a computer used for interaction and control.
Data is entered into a computer in a raw format, which is
converted into computer understandable language by input
devices and processed by a central processing unit (CPU) to
produce output.
In order for a computer to receive the requests and instructions
of the user, some methods of inputting data and information to
the computer are required.

I11

Output Device
An output device is essentially a piece of instrument or
computer hardware that retrieves data from a computer system
and further translates the received data into a form
understandable to humans.
The most common human-understandable forms typically
include text, visual, audio or a hard copy (printed on a paper).
In another word, an output device is a type of peripheral device
that helps us to get data processed from the computer, usually
in the form of audio, visual and xerox..

I12

Computer Memory
Memory is an essential part of the computer system because a
computer cannot process any task without it. Memory is used to
store data and instructions for performing specific tasks on the
computer system. The computer memory is typically a storage
that is capable of storing and fetching data.

The performance of the computer system depends on the
memory and CPU. CPU cannot store programs or a large set of
data permanently.

Basically, there are two types of computer memory which is
internal memory and external memory. Internal memory usually
refer to the chips or modules that are directly connected to the
motherboard. External memory is usually a kind of memory that
is attached to the computer system separately.

I13

Central Processing Unit (CPU)
CPU or Central Processing Unit is known as the brain of the
computer system. It is an electronic hardware device that
processes all the operations (e.g arithmetic and logical
operations) of the computer.
In other words, all the major calculations, operations or
comparisons are performed inside the CPU. CPU also
responsible for handling the operations of several other units.
Majority of the operations of the computer are handled by
processor. Central processing unit contains Control Unit (CU)
and Arithmetic and Logic Unit (ALU).

I14

Structure/block diagram of computer

Figure 1.2: Computer Block Diagram
(https://www.tutorialsmate.com/2020/04/block-diagram-of-

computer.html)
A computer system is a combination of three components:

1.Input Unit
2.CPU (Central Processing Unit)
3.Output Unit

15 I

Three Basic Computer Function

Figure 1.3: Interconnection Structure within computer system
(https://www.oreilly.com/library/view/designing-embedded-
hardware/0596007558/ch01.html)

Arithemetic Logic Unit (ALU) is where arithmetic and Boolean
Logical calculations are performed.

Control Unit (CU) is functions to controls the flow of
information through the processor and coordinates of the other
units within it.

Central Processing Unit (CPU) function to execute programs
stored in the main memory by fetching, examining and
executing instruction one after another.

I16

BUS INTERCONNECTION

A bus is a communication pathway connecting two or more
devices. A key characteristic of a bus is that it is a shared
transmission medium. A bus consists of multiple pathways or
lines. Each line is capable of transmitting a signal representing
binary digit (1 or 0).

A sequence of bits can be transmitted across a single line.
Several lines can be used to transmit bits simultaneously ( in
parallel). A BUS that connects major components (CPU, Memory,
I/O ) is called System Bus. The most common computer
interconnections structure are based on the use of one or more
system buses.

A system bus consists of 50-100 lines. Each line is assigned a
particular meaning or function. On any bus, the lines can be
classified into 3 groups:

1.Data Lines
2.Address Lines
3.Control Lines.

I17

Figure 1.4: Bus Interconnection Scheme
(http://casem3.blogspot.com/2016/08/bus-interconnection.html)
Data Lines (Data bus)
Provides a path for moving data between system modules.
These lines, collectively are called the data bus. The data bus
typically consists of 8,16 or 32 separated lines, the numbers of
lines being transferred to as width of the data bus.
Each line carries only 1 bit at a time, the number of lines
determines how many bits can be transferred at a time - overall
system performance.

I18

Address Lines
Used to designate the source or destination of the data on the
data bus. The width of the address bus determines the
maximum possible memory capacity of the system.

Control Lines
Used to control the access to and the use of the data and
address lines. Typical control lines include memory write,
memory read, I/O write, I/O read, interrupt request, clock, reset,
Bus request, Bus grant and Interrupt/ Transfer ACK.

I19

In computer architecture, a bus is a subsystem that transfers
data between components inside a computer, or between
computers. There are two types of bus:

1.Internal bus (system bus)
2.External bus (expansion bus).

An internal bus connects all the internal components of a
computer to the motherboard (and thus, the CPU and internal
memory). These types of buses are also referred to as local bus.

An external bus connects external peripherals to the
motherboard.

1. Accelerated Graphic Port (AGP)
2.Peripheral Component Interconnect (PCIe)
3.Peripheral Component Interconnect (PCI)
4. USB

I20

Figure 1.5: Computer Bus Interconnection
(https://www.learncomputerscienceonline.com/computer-bus/)

IICONCEPT
OF CACHE MEMORY

21 Cache Memory
23 How Cache Memory Work
25 Types of Cache Memory
27 How CPU Take Data
28 Cache Mapping

21 II

CACHE MEMORY

Cache memory, also called CPU memory, is high-speed static
random access memory (SRAM) that a computer microprocessor
can access more quickly than it can access regular random access
memory (RAM).

This memory is typically integrated directly into the CPU chip or
placed on a separate chip that has a separate bus interconnect
with the CPU.

The purpose of cache memory is to store program instructions
and data that are used repeatedly in the operation of programs or
information that the CPU is likely to need next.

The computer processor can access this information quickly from
the cache rather than having to get it from the computer's main
memory.

22 II

A special very-high-speed memory called a cache is used to
increase the speed of processing by making current programs
and data available to the CPU at a rapid rate.

Fast access to these instructions increases the overall speed of
the program.

Cache memory is located in two general locations: inside the
processor (internal cache) and on the motherboard (external
cache).

Cache memory consists of Three Level of cache memory:
1.Level 1 Cache Memory
2.Level 2 Cache Memory
3.Level 3 Cache Memory,

23 II

HOW CACHE MEMORY WORK

Figure 2.1: How Cache Memory Work
(https://www.engineersgarage.com/how-cache-memory-works/)
When an application starts or data is to be read/written or any
operation is to be performed then the data and commands
associated with the specific operation are shifted from a slow-
moving storage device (magnetic device – hard disk, optical
device – CD drive, etc.) to a faster device. This faster device is
called RAM – Random Access Memory. The type of this RAM is
DRAM (Dynamic Random Access Memory).

24 II

RAM is placed here because it is a faster device, and whenever
data, commands, or instructions are needed by processors, they
provide them at a faster rate than slow storage devices. They
serve as a cache memory for the storage devices. Although they
are much faster than slow storage devices but the processor
processes at much a faster pace and they are not able to provide
the needed data or instructions at that rate.

So there is a need for a device that is faster than RAM which
could keep up with the speed of processor needs. Therefore the
data required is transmitted to the next level of fast memory,
which is known as cache memory. The cache is also a type of
RAM, but it is Static RAM – SRAM. SRAM is faster and costlier
than DRAM because it has flip-flops (6 transistors) to store data,
unlike DRAM which uses one transistor and capacitor to store
data in form of charge. Moreover, they need not be refreshed
periodically (because of bistable latching circuitry) unlike DRAM
making it faster.

25 II

TYPES OF CACHE MEMORY

LEVEL 1 CACHE MEMORY
L1 cache, or primary cache, is extremely fast but relatively small
and is usually embedded in the processor chip as CPU cache. It
is a type of memory in which data is stored and accepted that
are immediately stored in the CPU. The most commonly used
register is accumulator, program counter, and address register.

LEVEL 2 CACHE MEMORY

L2 cache, or secondary cache, is often more capacious than L1.
The L2 cache may be embedded on the CPU, or it can be on a
separate chip or coprocessor and have a high-speed alternative
system bus connecting the cache and CPU. That way it doesn't
get slowed by traffic on the main system bus.
It is the fastest memory which has faster access time where data
is temporarily stored for faster access.

26 II

LEVEL 3 CACHE MEMORY
Level 3 (L3) cache is specialized memory developed to improve
the performance of L1 and L2. L1 or L2 can be significantly faster
than L3, though L3 is usually double the speed of RAM. With
multicore processors, each core can have a dedicated L1 and L2
cache, but they can share an L3 cache. If an L3 cache references
an instruction, it is usually elevated to a higher level of cache.

It is memory on which the computer works currently. It is small
in size and once power is off data no longer stays in this
memory.

27 II

HOW CPU TAKE DATA

When a program starts on your computer, data flows from the
RAM to the L3 cache, then the L2, and finally to the L1. While the
program is running, the CPU looks for the information it needs
to run, starting in the L1 cache and working backward from
there. If the CPU finds the needed information, it’s called a
cache hit. If it cannot find the information it needs, it is a cache
miss, and the computer has to go looking somewhere else to
find the information it needs.

Cache memory is a high-speed random access memory that is
used by a system Central processing unit for storing the data or
instruction temporarily. It decreases the execution time by
storing the most frequent and most probable data and
instructions “closer” to the processor, where the CPU systems can
quickly get it.

28 II

CACHE MAPPING

There are three different types of mapping used for cache
memory which are as follows:

1.Direct mapping
2.Associative mapping
3.Set-Associative mapping

DIRECT MAPPING
The simplest technique, known as direct mapping, maps each
block of main memory into only one possible cache line. or
In Direct mapping, assign each memory block to a specific line
in the cache. If a line is previously taken up by a memory block
when a new block needs to be loaded, the old block is trashed.
An address space is split into two parts index field and a tag
field. The cache is used to store the tag field whereas the rest is
stored in the main memory. Direct mapping`s performance is
directly proportional to the Hit ratio.

29 II

DIRECT MAPPING

Figure 2.2: Direct Mapping
( https://www.geeksforgeeks.org/cache-memory-in-computer-

organization/)

The associative memory is used to store the content and
addresses of the memory word. Any block can go into any line of
the cache. This means that the word id bits are used to identify
which word in the block is needed, but the tag becomes all of
the remaining bits. This enables the placement of any word at
any place in the cache memory. It is considered to be the fastest
and the most flexible mapping form.

30 II

ASSOCIATIVE MAPPING

Figure 2.3: Associative Mapping
( https://www.geeksforgeeks.org/cache-memory-in-computer-

organization/)

This form of mapping is an enhanced form of direct mapping
where the drawbacks of direct mapping are removed. Set
associative addresses the problem of possible thrashing in the
direct mapping method. It does this by saying that instead of
having exactly one line that a block can map to in the cache, we
will group a few lines together creating a set. Then a block in
memory can map to any one of the lines of a specific set.

31 II

SET ASSOCIATIVE MAPPING

Figure 2.4: Set-Associative Mapping
( https://www.geeksforgeeks.org/cache-memory-in-computer-

organization/)

Set-associative mapping allows that each word that is present in
the cache can have two or more words in the main memory for
the same index address. Set associative cache mapping
combines the best of direct and associative cache mapping
techniques.

IIIINPUT/OUTPUT IN
COMPUTER SYSTEM

32 Input / Output Module
36 List of Input / Output Devices
37 Input / Output Bus & Interface Modules
38 Parallel Interfaces
39 Serial Interface
40 Example of Interfaces

32 III

INPUT/OUTPUT MODULE

In most cases, the input/output module (I/O module) is
connected to the computer system on one end and to one or
more input/output devices on the other. In most cases, an I/O
module can control one or more peripheral devices. An I/O
module is required because:

1.The diversity and variety of I/O devices: it is difficult to
incorporate all peripheral device logic (control commands,
data format, etc.) into the CPU.

2.I/O devices are typically slower than memory and CPU, it is
not recommended that they be used directly for
communication on a high-speed bus.

3.The data format and word length used by the peripheral
may differ significantly from those used by the CPU.

33 III

An I/O module serves as a bridge between the processor and an
I/O device or devices. It manages data exchange between
external devices and main memory, or between external devices
and CPU registers. As a result, an I/O module provides an internal
interface to the computer that connects it to the CPU and main
memory, as well as an external interface that connects it to an
external device or peripheral. The I/O module should not only
communicate data from the CPU to the I/O device, but it should
also coordinate the two. Furthermore, because CPU and I/O
device speeds differ, the I/O module should include features
such as a buffer (storage area) and an error detection
mechanism.

If an I/O module bears a greater processing load, it is referred to
as an I/O channel or processor. I/O controllers or device
controllers are the names given to primitive I/O modules that
require detailed control by the processor. These I/O controllers
are typically used in microcomputers, whereas I/O processors are
typically used in mainframes. Because I/O work for
microcomputers is typically limited to single-use jobs, we do not
anticipate a large enough volume of I/O to justify the investment
in I/O processors, which are costly.

34 III

INPUT/OUTPUT MODULE DIAGRAM

Figure 3.1: Block Diagram I/O Module
(http://casem3.blogspot.com/2016/10/io-module-functions.html)

35 III

This module connect to the rest of the computer through a set
of signal lines. (eg. System bus lines). Data transferred to and
from the module are buffered in one or more data registers.
There may also be one or more status registers that provide
current status information. A status register may also function as
a control register, to accept detailed control information from
the processor. The logic within the module interacts with the
processor via a set of control lines. The processor uses the control
lines to issue commands to the I/O module.

A buffer is something that prevents something else from being
harmed or that prevents two things from harming each other.

The module must also be able to recognize and generate
addresses associated with the devices it controls. Each I/O
module has a unique address or if it controls more than one
external device, a unique set or address. Finally, the I/O module
contains logic specific to the interface with each device that it
controls.

36 III

LIST OF INPUT/OUTPUT DEVICES

Figure 3.2: Input/ Output Devices List
1) Human readable communicating with the computer user

Printer, keyboard, video display terminals (VDTs)
2) Machine readable communicating with equipment

Magnetic disk, tape systems, sensors.
3) Communication communicating with remote device

Terminal, machine readable device or even another computer

37 III

INPUT/OUTPUT BUS AND
INTERFACE MODULES

Figure 3.3: Connection of Input/ Output Bus
A typical communication link between the processor and
several peripherals is shown in the figure above. The I/O bus
consists of data lines, address lines, and control lines.

The I/O bus from the processor is attached to all peripheral
interfaces. To communicate with a particular device, the
processor place a device address to the address line. Each
Interface attached to the I/O bus contains an address decoder
that monitors the address line.

Input/Output Interface provides a method for transferring
information between internal storage and external I/O devices.
Peripheral connected to a computer need special
communication link for interfacing them with the central
processing unit. Connecting IO devices with IO modules. The
interface to a peripheral from an I/O module must be tailored to
the nature and operation of the peripheral. One major
characteristic of the interface is whether it is serial or parallel.

38 III

PARALLEL INTERFACE

The parallel interface transmits 8 bits of data, or one byte, over
multiple data bus lines in a single clock pulse. Parallel
transmission is faster than serial transmission, but it is typically
more expensive and requires more data pins to be connected.
The parallel interface has eight data pins and three control pins.
Register Select (RS), Enable (E), and Read/Write (R/W) are the
most common control pin labels. Other common parallel
interface pins may include: Contrast adjusts (V0), Chip Select
(CS) and so on.

The parallel interface is a multiple lines connecting the I/O
module and the peripheral. A multiple bits are transferred
simultaneously, just as all of the bits of a word are transferred
simultaneously over the data bus. A parallel interface has
traditionally been used for higher-speed peripherals, such as
tape and disk.

39 III

SERIAL INTERFACE

The serial interface is a bi-directional data bus that sends a series
of 8-bits in parity, one at a time, each with a fixed clock pulse
width. As a result, serial interface communication is often slower
(but less expensive) than parallel interface transmission. LCD
controllers with a serial interface require fewer connection pins
than those with a parallel interface. This simplifies the process of
connecting to an external processor (such as a microcontroller).

Serial interface, only one line is used to transmit data, and bits
must be transmitted one at a time. The serial interface has
traditionally been used for printers and terminals. With a new
generation of high-speed serial interfaces, parallel interfaces are
becoming much less common.


Click to View FlipBook Version