SlideShare a Scribd company logo
Computer Organization
By
Mr.S.Selvaraj
Asst. Professor (SRG) / CSE
Kongu Engineering College
Perundurai, Erode, Tamilnadu, India
Thanks to and Resource from : V. Carl Hamacher, Zvonko G. Vranesic, Safwat G. Zaky “Computer organization”, 5th Edition, McGraw Hill, 2012
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 2
Computer Organization
Introduction to CA
• Computer Architecture is a blueprint for
design and implementation of a computer
system.
• It provides the functional details and
behaviour of a computer system and comes
before computer organization.
• Computer architecture deals with 'What to
do?'
4/6/2022 Computer Organization 3
Introduction to CO
• Computer Organization is how operational
parts of a computer system are linked
together.
• It provides structural relationship between
parts of a computer system.
• It implements the provided computer
architecture.
• Computer organization deals with 'How to
do?'
4/6/2022 Computer Organization 4
Computer Architecture Vs Computer Organization
4/6/2022 Computer Organization 5
Types of Computer
4/6/2022 Computer Organization 6
Type Specifications
PC (Personal
Computer)
It is a single user computer system having moderately powerful
microprocessor.
Workstation It is also a single user computer system, similar to personal
computer however has a more powerful microprocessor
Mini Computer It is a multi-user computer system, capable of supporting hundreds
of users simultaneously.
Main Frame It is a multi-user computer system, capable of supporting hundreds
of users simultaneously. Software technology is different from
minicomputer.
Supercomputer It is an extremely fast computer, which can execute hundreds of
millions of instructions per second. For example, weather
forecasting, scientific simulations, (animated) graphics, fluid
dynamic calculations, nuclear energy research, electronic design,
and analysis of geological data (e.g. in petrochemical prospecting).
Generation of Computer
4/6/2022 Computer Organization 7
Generation Description
First
Generation
i. The period of first generation: 1946-1959.
ii. Vacuum tube based.
Second
Generation
i. The period of second generation: 1959-1965.
ii. Transistor based.
Third
Generation
i. The period of third generation: 1965-1971.
ii. Integrated Circuit based.
Fourth
Generation
i. The period of fourth generation: 1971-1980.
ii. VLSI microprocessor based.
Fifth
Generation
i. The period of fifth generation: 1980-
onwards.
ii. ULSI microprocessor based.
Quiz 1
• Which type of computers are used for
whether forecasting?
4/6/2022 Computer Organization 8
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 9
Computer Organization
Functional Units of Computer
4/6/2022 Computer Organization 10
Functional Units of Computer
4/6/2022 Computer Organization 11
Operation Description
Take Input  The process of entering data and instructions into the computer
system
Store Data  Saving data and instructions so that they are available for processing
as and when required.
Processing
Data
 Performing arithmetic, and logical operations on data in order to
convert them into useful information.
Output
Information
 The process of producing useful information or results for the user,
such as a printed report or visual display.
Control the
workflow
 Directs the manner and sequence in which all of the above
operations are performed.
Connection between Memory and Processor
4/6/2022 Computer Organization 12
Components of Processor
4/6/2022 Computer Organization 13
Components Description
IR  It holds the instruction that is currently being executed.
 Its output is available to the Control Circuits, which generate the
timing signals.
PC  It keeps track of execution of a program.
 It contains the memory address of the next instruction to be
fetched and executed.
MAR  It holds the address of the location to be accessed.
MDR  It contains the data to be written into or read out of the
addressed location.
GPR  General Purpose Registers are used to store the operand values
temporarily. R0,R1,R2,R3,.... Rn-1
Quiz 2
• Which holds the address of the memory
location?
– IR
– PC
– MAR
– MDR
– GPR
4/6/2022 Computer Organization 14
Hardware Components of Computer
Computer Organization
4/6/2022 15
Motherboard Structure
4/6/2022 Computer Organization 16
RAM
4/6/2022 Computer Organization 17
ROM
4/6/2022 Computer Organization 18
Hard Disk
4/6/2022 Computer Organization 19
Quiz 3
• RAM is a non-volatile memory?
– TRUE
– FALSE
4/6/2022 Computer Organization 20
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 21
Computer Organization
Numbering and Character Set
• BCD
– 4 bit
• ASCII
– 7 bit
• EBCDIC
– 8 bit
• UNICODE
– 16 bit
– 32 bit
4/6/2022 Computer Organization 22
BCD
4/6/2022 Computer Organization 23
ASCII Table
4/6/2022 Computer Organization 24
EBCDIC Table
4/6/2022 Computer Organization 25
4/6/2022 Computer Organization 26
UTF - 16
4/6/2022 Computer Organization 27
Power of 10
4/6/2022 Computer Organization 28
4/6/2022 Computer Organization 29
4/6/2022 Computer Organization 30
Quiz 4
• 236 = ____?
4/6/2022 Computer Organization 31
Number Representation
4/6/2022 Computer Organization 32
Quiz 5
• Represent in 20-bit 2’s Complement Number: (-20) 10
– a. 1111 1111 1111 1110 1100
– b. 1111 1111 1111 1110 1011
– c. 1111 1111 1111 1111 0100
– d. 0000 0000 0000 0001 0100
4/6/2022 Computer Organization 33
Addition and Subtraction
4/6/2022 Computer Organization 34
Quiz 6
• Convert the following pairs of decimal
numbers to 5-bit 2’s-complement numbers,
then perform addition and subtraction on
each pair. Indicate whether or not overflow
occurs for each case.
– (a) 7 and 13
– (b) −12 and 9
4/6/2022 Computer Organization 35
Multiplication of Unsigned Numbers using Array Method
(Normal)
4/6/2022 Computer Organization 36
Multiplication of Unsigned Numbers using
Sequential Circuit Method - Algorithm
4/6/2022 Computer Organization 37
Multiplication of Unsigned Numbers using Sequential Circuit Method
4/6/2022 Computer Organization 38
Multiplication of Signed Numbers Using Sign Extension
4/6/2022 Computer Organization 39
Booth Algorithm for Signed Numbers Multiplication
4/6/2022 Computer Organization 40
Quiz 7
• Using Booth's Algorithm for multiplication, the
multiplier -46 will be recoded as___
4/6/2022 Computer Organization 41
Multiplication of Signed Numbers Using
Booth Algorithm
4/6/2022 Computer Organization 42
Quiz 8
• Multiply (+13) * (-6) using booth algorithm.
4/6/2022 Computer Organization 43
Quiz 8 - Solution
4/6/2022 Computer Organization 44
Bit-pair Recoding Algorithm for Fast Multiplication
4/6/2022 Computer Organization 45
Example – Bit-pair Recoding
4/6/2022 Computer Organization 46
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 47
Computer Organization
Memory Location and Address
• The memory consists of many millions
of storage cells, each of which can
store a bit of information having the
value 0 or 1.
• Each group of n bits is referred to as a
word of information, and n is called the
word length.
• The memory of a computer can be
schematically represented as a
collection of words, as shown in Figure.
• Modern computers have word lengths
that typically range from 16 to 64 bits.
• If the word length of a computer is 32
bits, a single word can store a 32-bit
signed number or four ASCII-encoded
characters, each occupying 8 bits, as
shown in Figure.
• A unit of 8 bits is called a byte.
4/6/2022 Computer Organization 48
Memory Location and Address
• Machine instructions may require one or
more words for their representation.
• The memory can have up to 2k addressable
locations. The 2k addresses constitute the
address space of the computer.
• For example, a 24-bit address generates an
address space of 224 (16,777,216) locations.
This number is written as 16M (16 mega),
where 1M is the number 220 (1,048,576).
4/6/2022 Computer Organization 49
Quiz 9
• a 32-bit address generates how many address
locations?
4/6/2022 Computer Organization 50
Big Endian and Little Endian Assignments
• The name big-endian is used when lower byte
addresses are used for the more significant
bytes (the leftmost bytes) of the word.
• The name little-endian is used for the
opposite ordering, where the lower byte
addresses are used for the less significant
bytes (the rightmost bytes) of the word.
(Reverse)
4/6/2022 Computer Organization 51
Big Endian and Little Endian Assignments
4/6/2022 Computer Organization 52
Quiz 10
• Consider a computer that has a byte-addressable
memory organized in 32-bit words according to the
big-endian scheme. A program reads ASCII characters
entered at a keyboard and stores them in successive
byte locations, starting at location 1000. Show the
contents of the two memory words at locations 1000
and 1004 after the word “Johnson” has been
entered. Repeat Problem for the little-endian
scheme.
4/6/2022 Computer Organization 53
Quiz 10 - Solution
• In Big Endian Scheme:
– Byte contents in hex, starting at location 1000, will be
4A, 6F, 68, 6E, 73, 6F, 6E.
– The two words at 1000 and 1004 will be 4A6F686E
and 736F6EXX. Byte 1007 (shown as XX) is unchanged.
• In Little Endian Scheme:
– Byte contents in hex, starting at location 1000, will be
4A, 6F, 68, 6E, 73, 6F, 6E.
– The two words at 1000 and 1004 will be 6E686F4A
and XX6E6F73. Byte 1007 (shown as XX) is unchanged.
4/6/2022 Computer Organization 54
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 55
Computer Organization
Addressing Modes
• The different ways for specifying the
locations of instruction operands are known
as addressing modes.
4/6/2022 Computer Organization 56
Types of Addressing Modes
4/6/2022 Computer Organization 57
Quiz 11
• Registers R4 and R5 contain the decimal numbers
2000 and 3000 before each of the following
addressing modes is used to access a memory
operand. What is the effective address (EA) in
each case?
– (a) 12(R4)
– (b) (R4,R5)
– (c) 28(R4,R5)
– (d) (R4)+
– (e) −(R4)
4/6/2022 Computer Organization 58
Types of Instructions
• The instructions are classified into 4 basic
types based on the number of operands used
in the instructions.
– Three-address
– Two-address
– One–address and
– Zero-address instruction.
4/6/2022 Computer Organization 59
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 60
Computer Organization
Pipeline Intro
• To improve the performance of a CPU we have two
options:
– 1) Improve the hardware by introducing faster circuits.
– 2) Arrange the hardware such that more than one operation
can be performed at the same time.
• Since, there is a limit on the speed of hardware and the
cost of faster circuits is quite high, we have to adopt the
2nd option.
• Pipelining is a process of arrangement of hardware
elements of the CPU such that its overall performance is
increased.
• Simultaneous execution of more than one instruction takes
place in a pipelined processor
4/6/2022 Computer Organization 61
Case Study
• Consider a water bottle packaging plant. Let there be 3
stages that a bottle should pass through, Inserting the
bottle(I), Filling water in the bottle(F), and Sealing the
bottle(S). Let us consider these stages as stage 1, stage 2
and stage 3 respectively. Let each stage take 1 minute to
complete its operation.
• Now, in a non pipelined operation, a bottle is first inserted
in the plant, after 1 minute it is moved to stage 2 where
water is filled. Now, in stage 1 nothing is happening.
Similarly, when the bottle moves to stage 3, both stage 1
and stage 2 are idle. But in pipelined operation, when the
bottle is in stage 2, another bottle can be loaded at stage 1.
Similarly, when the bottle is in stage 3, there can be one
bottle each in stage 1 and stage 2. So, after each minute,
we get a new bottle at the end of stage 3. Hence, What is
the average time taken to manufacture 1 bottle by using
with pipeline and without pipeline?.
4/6/2022 Computer Organization 62
Case Study Solution
• Without pipelining = 9/3 minutes = 3m.
• With pipelining = 5/3 minutes = 1.67m .
4/6/2022 Computer Organization 63
Pipelining
• Executing the machine instructions concurrently
is called as pipelining.
• a pipelined processor may process each
instruction in four steps, as follows:
– Fetch (F): read the instruction from the memory.
– Decode (D): decode the instruction and fetch the
source operand(s).
– Execute (E): perform the operation specified by the
instruction.
– Write (W): store the result in the destination location.
4/6/2022 Computer Organization 64
4-stage pipeline
4/6/2022 Computer Organization 65
Execution in a Pipelined Processor
• Execution sequence of instructions in a pipelined processor
can be visualized using a space-time diagram. For example,
consider a processor having 4 stages and let there be 2
instructions to be executed. We can visualize the execution
sequence through the following space-time diagrams:
4/6/2022 Computer Organization 66
Performance of a pipelined processor
• Consider a ‘k’ segment pipeline with clock cycle time as ‘Tp’.
• Let there be ‘n’ tasks to be completed in the pipelined processor.
• Now, the first instruction is going to take ‘k’ cycles to come out of
the pipeline but the other ‘n – 1’ instructions will take only ‘1’ cycle
each, i.e, a total of ‘n – 1’ cycles.
• So, time taken to execute ‘n’ instructions in a pipelined processor:
• In the same case, for a non-pipelined processor, execution time of
‘n’ instructions will be:
4/6/2022 Computer Organization 67
Quiz
• Consider a ‘5’ segment pipeline with clock
cycle time as ‘1 minute’. Let there be ‘20’
instructions to be completed.
– What is the estimated time to execute all the
instructions in the pipelined processor?
– What is the estimated time to execute all the
instructions in the non-pipelined processor?
4/6/2022 Computer Organization 68
Speedup, Efficiency and Throughput
4/6/2022 Computer Organization 69
Quiz
• Consider a ‘5’ segment pipeline with clock
cycle time as ‘1 minute’. Let there be ‘20’
instructions to be completed.
– What is the estimated time to execute all the
instructions in the pipelined processor?
– What is the estimated time to execute all the
instructions in the non-pipelined processor?
– What is the speedup?
– What is the efficiency?
– What is the throughput?
4/6/2022 Computer Organization 70
Hazard and its Types
• Any condition that causes the pipeline to stall
is called a hazard.
• The other names for stalls is idle periods and
bubbles.
• There are three types of hazards occurs in
pipelined operation. These are
– Data Hazard
– Instruction Hazard
– Structure Hazard
4/6/2022 Computer Organization 71
Stall - Example
4/6/2022 Computer Organization 72
Data Hazard
• Any condition in which wither the source or the
destination operands of an instruction are not available at
the time expected in the pipeline is called data hazard.
4/6/2022 Computer Organization 73
Instruction Hazard
• The pipeline may also be stalled because of a
delay in the availability of an instruction.
• For example, this may be a result of a miss in the
cache, requiring the instruction to be fetched
from the main memory.
• Such hazards are often called control hazards or
instruction hazards.
4/6/2022 Computer Organization 74
Structural Hazard
• The situation, when two instructions requires
the use of a given hardware resources at the
same time is called structural hazard.
• Most common case in which this hazard may
arise is in access to memory.
• For Example, One instruction may need to
access memory as part of the Execute or
Write stage while another instruction is being
fetched.
4/6/2022 Computer Organization 75
Quiz 12
• Consider a pipelined processor with the following five stages:
– F: Instruction Fetch
– D: Instruction Decode and Operand Fetch
– C: Execute
– M: Memory
– W: Write Back
• The F, D, W and M stages take one clock cycle each to complete the
operation. The number of clock cycles for the EX stage depends on
the instruction. The ADD and SUB instructions need 1 clock cycle
and the MUL instruction needs 3 clock cycles in the C stage.
Operand forwarding is used in the pipelined processor. What is the
number of clock cycles taken to complete the following sequence of
instructions?
– ADD R2, R1, R0 R2 <- R0 + R1
– MUL R4, R3, R2 R4 <- R3 * R2
– SUB R6, R5, R4 R6 <- R5 - R4
4/6/2022 Computer Organization 76
Quiz 12 - Solution
4/6/2022 Computer Organization 77
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 78
Computer Organization
Memory Hierarchy, Cost, Size, Speed
Comparison
4/6/2022 Computer Organization 79
RAM Memory Organization
4/6/2022 Computer Organization 80
Example
• How many 64 x 8 RAM chips are needed to
provide a memory capacity of 2048 bytes?
– Assuming that 64 x 8 RAM chips means 64 x 8 bit RAM
chips,
– Since 8 bits = 1 byte,
– Each RAM chip has 64 x 1 byte = 64 bytes.
– Thus the number of chips to address a memory
capacity of 2048 bytes will be,
– 2048/64 = 32 chips.
4/6/2022 Computer Organization 81
Quiz 13
• How many 128x16 RAM chips are needed to
provide a memory capacity of 8KB?
• How many 512Wx4B RAM chips are needed to
provide a memory capacity of 1GB?
4/6/2022 Computer Organization 82
Static RAM
• Continuous power is needed for the cell to retain its state. If
power is interrupted, the cell’s contents are lost.
• Hence, SRAMs are said to be volatile memories because their
contents are lost when power is interrupted.
• Static RAMs can be accessed very quickly.
• Access times on the order of a few nanoseconds.
• SRAMs are used in applications where speed is of critical concern.
4/6/2022 Computer Organization 83
Dynamic RAMs
• Static RAMs are fast, but their cells require several transistors, so highly
expensive and lower density RAMs can be implemented with complex
cells .
• We need less expensive and higher density RAMs can be implemented
with simpler cells.
• But, these simpler cells do not retain their state for a long period, unless
they are accessed frequently for Read or Write operations. Memories that
use such cells are called dynamic RAMs (DRAMs).
• Information is stored in a dynamic memory cell in the form of a charge on
a capacitor, but this charge can be maintained for only tens of
milliseconds.
• Since the cell is required to store information for a much longer time, its
contents must be periodically refreshed by restoring the capacitor charge
to its full value.
4/6/2022 Computer Organization 84
RAM Types
• Different types of volatile memories have been
developed like
– SRAM
– DRAM
• ADRAM
• SDRAM
– SDR SDRAM
– DDR SDRAM
– DDR2 SDRAM
– DDR3 SDRAM
– DDR4 SDRAM
– DDR5 SDRAM
• RDRAM (RAMBUS)
4/6/2022 Computer Organization 85
ROM
• Both static and dynamic RAM chips are volatile, which means that
they retain information only while power is turned on.
• There are many applications requiring memory devices that retain
the stored information when power is turned off.
• For example, we need to store a small program in such a memory,
to be used to start the bootstrap process of loading the operating
system from a hard disk into the main memory.
• But, a special writing process is needed to place the information
into a non-volatile memory.
• Since its normal operation involves only reading the stored data, a
memory of this type is called a read-only memory (ROM).
4/6/2022 Computer Organization 86
ROM Types
• Different types of non-volatile memories have been
developed like
– ROM,
– PROM,
– EPROM,
– EEPROM,
– Flash Memory (Digital Cameras, MP3 Players)
– Flash Cards (Memory Cards)
– Flash Drives (Pen Drives, SSD Hard Disks), etc.
4/6/2022 Computer Organization 87
Quiz 14
• Which type of ROM is uses UV light to erase
the content?
4/6/2022 Computer Organization 88
Secondary Memory
• Different types of secondary memories have
been developed like
– Magnetic Hard Disks
– CD-ROM
– DVD
4/6/2022 Computer Organization 89
Magnetic Hard Disk
4/6/2022 Computer Organization 90
Magnetic Hard Disk
• Seek time, is the time required to move the
read/write head to the proper track.
• This time depends on the initial position of the head
relative to the track specified in the address. Average
values are in the 5- to 8-ms range.
• The second component is the rotational delay, also
called latency time, which is the time taken to reach
the addressed sector after the read/write head is
positioned over the correct track. On average, this is
the time for half a rotation of the disk.
• The sum of these two delays is called the disk access
time.
4/6/2022 Computer Organization 91
Quiz 15
• There are 16 data-recording surfaces with
65,536 tracks per surface. There is an average
of 512 sectors per track, and each sector
contains 256 bytes of data. Find out the
capacity of the Hard Disk.
4/6/2022 Computer Organization 92
Cache Memory
• The cache is a small and very fast memory, interposed between
the processor and the main memory.
• The effectiveness of this approach is based on a property of
computer programs called locality of reference.
• This behavior manifests itself in two ways: temporal and spatial.
• The first means that a recently executed instruction is likely to be
executed again very soon.
• The spatial aspect means that instructions close to a recently
executed instruction are also likely to be executed soon.
4/6/2022 Computer Organization 93
Hit rate and Miss rate
• Let h be the hit rate, M the miss penalty, and C the time to access
information in the cache. Thus, the average access time
experienced by the processor is
– tavg = hC + (1 − h)M
• the average access time experienced by the processor in such a
system is:
– tavg = h1C1 + (1 − h1)h2C2 + (1 – h1)(1- h2)M
• where
– h1 is the hit rate in the L1 caches.
– h2 is the hit rate in the L2 cache.
– C1 is the time to access information in the L1 caches.
– C2 is the miss penalty to transfer information from the L2 cache to an
L1 cache.
– M is the miss penalty to transfer information from the main memory
to the L2 cache.
4/6/2022 Computer Organization 94
Quiz 16
• Cache access time (C)= 100 ns, Memory access
time (M) = 500 ns, If the hit rate is 90 % then
what is the effective access time?
4/6/2022 Computer Organization 95
Cache Memory Mapping Techniques
• There are several possible methods for
determining where memory blocks are placed
in the cache.
• 4 Techniques:
– Direct Mapping
– Associative Mapping
– Set Associative Mapping
– K-way Set Associative Mapping
4/6/2022 Computer Organization 96
Example - Cache Memory Mapping Techniques
• Consider a cache consisting of 128 blocks of 16 words each,
for a total of 2048 (2K) words, and assume that the main
memory is addressable by a 16-bit address. The main memory
has 64K words, which we will view as 4K blocks of 16 words
each. For simplicity, we have assumed that consecutive
addresses refer to consecutive words.
4/6/2022 Computer Organization 97
Direct Mapping
• The simplest way to determine cache locations in which to store
memory blocks is the direct-mapping technique.
• In this technique, block j of the main memory maps onto block j
modulo 128 of the cache, as depicted in Figure.
• Thus, whenever one of the main memory blocks 0, 128, 256, . . . is
loaded into the cache, it is stored in cache block 0. Blocks 1, 129,
257, . . . are stored in cache block 1, and so on.
• Since more than one memory block is mapped onto a given cache
block position, contention may arise for that position even when
the cache is not full.
• The direct-mapping technique is easy to implement, but it is not
very flexible.
4/6/2022 Computer Organization 98
Direct Mapping
4/6/2022 Computer Organization 99
Direct Mapping Examples
4/6/2022 Computer Organization 100
4/6/2022 Computer Organization 101
4/6/2022 Computer Organization 102
Associative Mapping
• In this method, a main memory block can be placed into any cache block
position.
• The tag bits of an address received from the processor are compared to
the tag bits of each block of the cache to see if the desired block is
present. This is called the associative-mapping technique.
• It gives complete freedom in choosing the cache location in which to
place the memory block, resulting in a more efficient use of the space in
the cache.
• When a new block is brought into the cache, it replaces (ejects) an existing
block only if the cache is full.
• In this case, we need an algorithm to select the block to be replaced.
Many replacement algorithms are possible.
• The complexity of an associative cache is higher than that of a direct-
mapped cache, because of the need to search all 128 tag patterns to
determine whether a given block is in the cache.
• To avoid a long delay, the tags must be searched in parallel. A search of
this kind is called an associative search.
4/6/2022 Computer Organization 103
Associative Mapping
4/6/2022 Computer Organization 104
Associative Mapping
4/6/2022 Computer Organization 105
Set Associative Mapping
• Another approach is to use a combination of the
direct and associative-mapping techniques.
• The blocks of the cache are grouped into sets,
and the mapping allows a block of the main
memory to reside in any block of a specific set.
• Hence, the contention problem of the direct
method is eased by having a few choices for
block placement.
• At the same time, the hardware cost is reduced
by decreasing the size of the associative search.
4/6/2022 Computer Organization 106
Set Associative Mapping
4/6/2022 Computer Organization 107
Set Associative
4/6/2022 Computer Organization 108
Quiz
• Assume a computer main memory contains 8192
blocks, and each blocks contains 256 words (1
word = 1 Byte). And also a block-set-associative
(BSA) cache memory consists of a total of 32
blocks which is divided into 4 –block sets. Find
out the number of bits for physical memory,
TAG,SET and WORD fields?
– A) 21, 10, 3, 8
– B) 21, 11, 2, 8
– C) 19, 8, 4, 7
– D) 19, 9, 3, 7
4/6/2022 Computer Organization 109
Need of Virtual Memory
• In most modern computer systems, the physical main
memory is not as large as the address space of the
processor.
• For example, a processor that issues 32-bit addresses
has an addressable space of 4G bytes.
• The size of the main memory in a typical computer
with a 32-bit processor may range from 1G to 4G
bytes.
• If a program does not completely fit into the main
memory, the parts of it not currently being executed
are stored on a secondary storage device, typically a
magnetic disk.
4/6/2022 Computer Organization 110
Virtual Memory
4/6/2022 Computer Organization 111
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 112
Computer Organization
I/O Device Accessing
4/6/2022 Computer Organization 113
Connection for Processor and I/O devices
4/6/2022 Computer Organization 114
I/O Device Accessing Methods
• Memory Mapped I/O
• Program-Controlled I/O
4/6/2022 Computer Organization 115
Memory Mapped I/O
• The I/O devices and the memory share the same address
space; this arrangement is called memory-mapped I/O.
• It is used in most computers.
• With memory-mapped I/O, any machine instruction that
can access memory can be used to transfer data to or from
an I/O device.
• For example, if DATAIN is the address of a register in an
input device, the instruction reads the data from the
DATAIN register and loads them into processor register R2.
– Load R2, DATAIN
• Similarly, the instruction sends the contents of register R2
to location DATAOUT, which is a register in an output
device.
– Store R2, DATAOUT
4/6/2022 Computer Organization 116
Program-Controlled I/O
• Consider a task that reads characters typed on a
keyboard, stores these data in the memory, and
displays the same characters on a display screen.
• A simple way of implementing this task is to write a
program that performs all functions needed to realize
the desired action.
• This method is known as program-controlled I/O.
4/6/2022 Computer Organization 117
Implementing I/O operations
• There are two other commonly used mechanisms
for implementing I/O operations:
– Interrupts
– Direct Memory Access (DMA)
• The following techniques are used to handle
multiple devices interrupt requests:
– Vectored Interrupts
– Nested Interrupts
– Multiple Priority Scheme
– Polling
– Daisy Chain Scheme
4/6/2022 Computer Organization 118
Interconnection Standards
• SCSI Bus
• SATA
• SAS
• FIREWIRE
• PCI Bus
• PCI Express
• Universal Serial Bus (USB)
4/6/2022 Computer Organization 119
Preamble
1. Introduction
2. Functional Units of Computer
3. Number Representation and Arithmetic Operations
4. Memory Location and Addresses
5. Addressing Modes
6. Pipelining
7. Memory Hierarchy
8. I/O Organization
9. Control Signals Generation
4/6/2022 120
Computer Organization
Control Signals Generation
• We now examine how the processor
generates the control signals that cause these
actions to take place in the correct sequence
and at the right time.
• There are two basic approaches:
– Hardwired control and
– Micro-programmed control
4/6/2022 Computer Organization 121
Thank you and any ???
4/6/2022 Computer Organization 122

More Related Content

What's hot

Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
Mazin Alwaaly
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
Kamal Acharya
 
Instruction Formats
Instruction FormatsInstruction Formats
Instruction Formats
RaaviKapoor
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
pradeepa velmurugan
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
Vikas Gupta
 
Instruction format
Instruction formatInstruction format
Instruction format
Sanjeev Patel
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
Tushar Swami
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
mali yogesh kumar
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
Yasir Khan
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
Dr. Balaji Ganesh Rajagopal
 
mano.ppt
mano.pptmano.ppt
mano.ppt
prathamgunj
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
Mazin Alwaaly
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
rishi ram khanal
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
Stack organization
Stack organizationStack organization
Stack organization
chauhankapil
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formats
Mazin Alwaaly
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
ihsanjamil
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
utsav_shah
 
Input output interface
Input output interfaceInput output interface
Input output interface
Christ University
 

What's hot (20)

Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Instruction Formats
Instruction FormatsInstruction Formats
Instruction Formats
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
 
Instruction format
Instruction formatInstruction format
Instruction format
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
 
mano.ppt
mano.pptmano.ppt
mano.ppt
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Stack organization
Stack organizationStack organization
Stack organization
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formats
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
Input output interface
Input output interfaceInput output interface
Input output interface
 

Similar to Computer Organization

CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
Asst.prof M.Gokilavani
 
Computer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdfComputer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdf
TSANKARARAO
 
Chapter 4 the components of the system unit
Chapter 4   the components of the system unitChapter 4   the components of the system unit
Chapter 4 the components of the system unit
haider ali
 
indira technical institue nashik course syllabus
indira technical institue nashik course syllabus indira technical institue nashik course syllabus
indira technical institue nashik course syllabus
indiratechnicalinsti
 
It5304 syllabus
It5304 syllabusIt5304 syllabus
It5304 syllabus
nimal83
 
COA_UNIT-1new[1].pdf
COA_UNIT-1new[1].pdfCOA_UNIT-1new[1].pdf
COA_UNIT-1new[1].pdf
AbinayaBhaskar1
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
vishnu murthy
 
Chapter 04
Chapter 04Chapter 04
Lesson 2.1. System Unit.pptx
Lesson 2.1. System Unit.pptxLesson 2.1. System Unit.pptx
Lesson 2.1. System Unit.pptx
JojamesArnaldoGaddi
 
Embedded System -Lyla B Das.pdf
Embedded System -Lyla B Das.pdfEmbedded System -Lyla B Das.pdf
Embedded System -Lyla B Das.pdf
JohnMcClaine2
 
CIS 312 Success Begins / snaptutorial.com
CIS 312 Success Begins / snaptutorial.comCIS 312 Success Begins / snaptutorial.com
CIS 312 Success Begins / snaptutorial.com
Robinson068
 
Week1 lec2 computer_system_components
Week1 lec2 computer_system_componentsWeek1 lec2 computer_system_components
Week1 lec2 computer_system_components
Resty Aldana
 
Topic 2 system unit components
Topic 2   system unit componentsTopic 2   system unit components
Topic 2 system unit componentsChristian Sampaga
 
files_1570175665_204715750.pdf
files_1570175665_204715750.pdffiles_1570175665_204715750.pdf
files_1570175665_204715750.pdf
beherapravat936
 
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...Anurag Deb
 
Final ict
Final ictFinal ict
Final ict
anasazwar7995
 
64-bit
64-bit64-bit
64-bit
PVS-Studio
 
Design and implementation of complex floating point processor using fpga
Design and implementation of complex floating point processor using fpgaDesign and implementation of complex floating point processor using fpga
Design and implementation of complex floating point processor using fpga
VLSICS Design
 
Unit 3. control unit
Unit 3. control unitUnit 3. control unit
Unit 3. control unit
Kiran Bagale
 

Similar to Computer Organization (20)

CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
 
Computer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdfComputer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdf
 
Chapter 4 the components of the system unit
Chapter 4   the components of the system unitChapter 4   the components of the system unit
Chapter 4 the components of the system unit
 
indira technical institue nashik course syllabus
indira technical institue nashik course syllabus indira technical institue nashik course syllabus
indira technical institue nashik course syllabus
 
It5304 syllabus
It5304 syllabusIt5304 syllabus
It5304 syllabus
 
COA_UNIT-1new[1].pdf
COA_UNIT-1new[1].pdfCOA_UNIT-1new[1].pdf
COA_UNIT-1new[1].pdf
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
 
Lesson 2.1. System Unit.pptx
Lesson 2.1. System Unit.pptxLesson 2.1. System Unit.pptx
Lesson 2.1. System Unit.pptx
 
Embedded System -Lyla B Das.pdf
Embedded System -Lyla B Das.pdfEmbedded System -Lyla B Das.pdf
Embedded System -Lyla B Das.pdf
 
CIS 312 Success Begins / snaptutorial.com
CIS 312 Success Begins / snaptutorial.comCIS 312 Success Begins / snaptutorial.com
CIS 312 Success Begins / snaptutorial.com
 
Week1 lec2 computer_system_components
Week1 lec2 computer_system_componentsWeek1 lec2 computer_system_components
Week1 lec2 computer_system_components
 
Topic 2 system unit components
Topic 2   system unit componentsTopic 2   system unit components
Topic 2 system unit components
 
files_1570175665_204715750.pdf
files_1570175665_204715750.pdffiles_1570175665_204715750.pdf
files_1570175665_204715750.pdf
 
Dst
DstDst
Dst
 
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
 
Final ict
Final ictFinal ict
Final ict
 
64-bit
64-bit64-bit
64-bit
 
Design and implementation of complex floating point processor using fpga
Design and implementation of complex floating point processor using fpgaDesign and implementation of complex floating point processor using fpga
Design and implementation of complex floating point processor using fpga
 
Unit 3. control unit
Unit 3. control unitUnit 3. control unit
Unit 3. control unit
 

More from Selvaraj Seerangan

Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...
Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...
Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...
Selvaraj Seerangan
 
Unit 5 _ Fog Computing .pdf
Unit 5 _ Fog Computing .pdfUnit 5 _ Fog Computing .pdf
Unit 5 _ Fog Computing .pdf
Selvaraj Seerangan
 
CAT III Answer Key.pdf
CAT III Answer Key.pdfCAT III Answer Key.pdf
CAT III Answer Key.pdf
Selvaraj Seerangan
 
END SEM _ Design Thinking _ 16 Templates.pptx
END SEM _ Design Thinking _ 16 Templates.pptxEND SEM _ Design Thinking _ 16 Templates.pptx
END SEM _ Design Thinking _ 16 Templates.pptx
Selvaraj Seerangan
 
Design Thinking _ Complete Templates.pptx
Design Thinking _ Complete Templates.pptxDesign Thinking _ Complete Templates.pptx
Design Thinking _ Complete Templates.pptx
Selvaraj Seerangan
 
CAT 3 _ List of Templates.pptx
CAT 3 _ List of Templates.pptxCAT 3 _ List of Templates.pptx
CAT 3 _ List of Templates.pptx
Selvaraj Seerangan
 
[PPT] _ Unit 5 _ Evolve.pptx
[PPT] _ Unit 5 _ Evolve.pptx[PPT] _ Unit 5 _ Evolve.pptx
[PPT] _ Unit 5 _ Evolve.pptx
Selvaraj Seerangan
 
[PPT] _ Unit 4 _ Engage.pptx
[PPT] _ Unit 4 _ Engage.pptx[PPT] _ Unit 4 _ Engage.pptx
[PPT] _ Unit 4 _ Engage.pptx
Selvaraj Seerangan
 
[PPT] _ Unit 3 _ Experiment.pptx
[PPT] _ Unit 3 _ Experiment.pptx[PPT] _ Unit 3 _ Experiment.pptx
[PPT] _ Unit 3 _ Experiment.pptx
Selvaraj Seerangan
 
CAT 2 _ List of Templates.pptx
CAT 2 _ List of Templates.pptxCAT 2 _ List of Templates.pptx
CAT 2 _ List of Templates.pptx
Selvaraj Seerangan
 
Design Thinking - Empathize Phase
Design Thinking - Empathize PhaseDesign Thinking - Empathize Phase
Design Thinking - Empathize Phase
Selvaraj Seerangan
 
CAT-II Answer Key.pdf
CAT-II Answer Key.pdfCAT-II Answer Key.pdf
CAT-II Answer Key.pdf
Selvaraj Seerangan
 
PSP LAB MANUAL.pdf
PSP LAB MANUAL.pdfPSP LAB MANUAL.pdf
PSP LAB MANUAL.pdf
Selvaraj Seerangan
 
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf
Selvaraj Seerangan
 
DS LAB MANUAL.pdf
DS LAB MANUAL.pdfDS LAB MANUAL.pdf
DS LAB MANUAL.pdf
Selvaraj Seerangan
 
CAT 1 _ List of Templates.pptx
CAT 1 _ List of Templates.pptxCAT 1 _ List of Templates.pptx
CAT 1 _ List of Templates.pptx
Selvaraj Seerangan
 
[PPT] _ UNIT 1 _ COMPLETE.pptx
[PPT] _ UNIT 1 _ COMPLETE.pptx[PPT] _ UNIT 1 _ COMPLETE.pptx
[PPT] _ UNIT 1 _ COMPLETE.pptx
Selvaraj Seerangan
 
CAT-1 Answer Key.doc
CAT-1 Answer Key.docCAT-1 Answer Key.doc
CAT-1 Answer Key.doc
Selvaraj Seerangan
 
Unit 3 Complete.pptx
Unit 3 Complete.pptxUnit 3 Complete.pptx
Unit 3 Complete.pptx
Selvaraj Seerangan
 
[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf
[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf
[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf
Selvaraj Seerangan
 

More from Selvaraj Seerangan (20)

Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...
Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...
Unit 2,3,4 _ Internet of Things A Hands-On Approach (Arshdeep Bahga, Vijay Ma...
 
Unit 5 _ Fog Computing .pdf
Unit 5 _ Fog Computing .pdfUnit 5 _ Fog Computing .pdf
Unit 5 _ Fog Computing .pdf
 
CAT III Answer Key.pdf
CAT III Answer Key.pdfCAT III Answer Key.pdf
CAT III Answer Key.pdf
 
END SEM _ Design Thinking _ 16 Templates.pptx
END SEM _ Design Thinking _ 16 Templates.pptxEND SEM _ Design Thinking _ 16 Templates.pptx
END SEM _ Design Thinking _ 16 Templates.pptx
 
Design Thinking _ Complete Templates.pptx
Design Thinking _ Complete Templates.pptxDesign Thinking _ Complete Templates.pptx
Design Thinking _ Complete Templates.pptx
 
CAT 3 _ List of Templates.pptx
CAT 3 _ List of Templates.pptxCAT 3 _ List of Templates.pptx
CAT 3 _ List of Templates.pptx
 
[PPT] _ Unit 5 _ Evolve.pptx
[PPT] _ Unit 5 _ Evolve.pptx[PPT] _ Unit 5 _ Evolve.pptx
[PPT] _ Unit 5 _ Evolve.pptx
 
[PPT] _ Unit 4 _ Engage.pptx
[PPT] _ Unit 4 _ Engage.pptx[PPT] _ Unit 4 _ Engage.pptx
[PPT] _ Unit 4 _ Engage.pptx
 
[PPT] _ Unit 3 _ Experiment.pptx
[PPT] _ Unit 3 _ Experiment.pptx[PPT] _ Unit 3 _ Experiment.pptx
[PPT] _ Unit 3 _ Experiment.pptx
 
CAT 2 _ List of Templates.pptx
CAT 2 _ List of Templates.pptxCAT 2 _ List of Templates.pptx
CAT 2 _ List of Templates.pptx
 
Design Thinking - Empathize Phase
Design Thinking - Empathize PhaseDesign Thinking - Empathize Phase
Design Thinking - Empathize Phase
 
CAT-II Answer Key.pdf
CAT-II Answer Key.pdfCAT-II Answer Key.pdf
CAT-II Answer Key.pdf
 
PSP LAB MANUAL.pdf
PSP LAB MANUAL.pdfPSP LAB MANUAL.pdf
PSP LAB MANUAL.pdf
 
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf
 
DS LAB MANUAL.pdf
DS LAB MANUAL.pdfDS LAB MANUAL.pdf
DS LAB MANUAL.pdf
 
CAT 1 _ List of Templates.pptx
CAT 1 _ List of Templates.pptxCAT 1 _ List of Templates.pptx
CAT 1 _ List of Templates.pptx
 
[PPT] _ UNIT 1 _ COMPLETE.pptx
[PPT] _ UNIT 1 _ COMPLETE.pptx[PPT] _ UNIT 1 _ COMPLETE.pptx
[PPT] _ UNIT 1 _ COMPLETE.pptx
 
CAT-1 Answer Key.doc
CAT-1 Answer Key.docCAT-1 Answer Key.doc
CAT-1 Answer Key.doc
 
Unit 3 Complete.pptx
Unit 3 Complete.pptxUnit 3 Complete.pptx
Unit 3 Complete.pptx
 
[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf
[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf
[PPT] _ Unit 2 _ 9.0 _ Domain Specific IoT _Home Automation.pdf
 

Recently uploaded

Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 

Recently uploaded (20)

Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 

Computer Organization

  • 1. Computer Organization By Mr.S.Selvaraj Asst. Professor (SRG) / CSE Kongu Engineering College Perundurai, Erode, Tamilnadu, India Thanks to and Resource from : V. Carl Hamacher, Zvonko G. Vranesic, Safwat G. Zaky “Computer organization”, 5th Edition, McGraw Hill, 2012
  • 2. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 2 Computer Organization
  • 3. Introduction to CA • Computer Architecture is a blueprint for design and implementation of a computer system. • It provides the functional details and behaviour of a computer system and comes before computer organization. • Computer architecture deals with 'What to do?' 4/6/2022 Computer Organization 3
  • 4. Introduction to CO • Computer Organization is how operational parts of a computer system are linked together. • It provides structural relationship between parts of a computer system. • It implements the provided computer architecture. • Computer organization deals with 'How to do?' 4/6/2022 Computer Organization 4
  • 5. Computer Architecture Vs Computer Organization 4/6/2022 Computer Organization 5
  • 6. Types of Computer 4/6/2022 Computer Organization 6 Type Specifications PC (Personal Computer) It is a single user computer system having moderately powerful microprocessor. Workstation It is also a single user computer system, similar to personal computer however has a more powerful microprocessor Mini Computer It is a multi-user computer system, capable of supporting hundreds of users simultaneously. Main Frame It is a multi-user computer system, capable of supporting hundreds of users simultaneously. Software technology is different from minicomputer. Supercomputer It is an extremely fast computer, which can execute hundreds of millions of instructions per second. For example, weather forecasting, scientific simulations, (animated) graphics, fluid dynamic calculations, nuclear energy research, electronic design, and analysis of geological data (e.g. in petrochemical prospecting).
  • 7. Generation of Computer 4/6/2022 Computer Organization 7 Generation Description First Generation i. The period of first generation: 1946-1959. ii. Vacuum tube based. Second Generation i. The period of second generation: 1959-1965. ii. Transistor based. Third Generation i. The period of third generation: 1965-1971. ii. Integrated Circuit based. Fourth Generation i. The period of fourth generation: 1971-1980. ii. VLSI microprocessor based. Fifth Generation i. The period of fifth generation: 1980- onwards. ii. ULSI microprocessor based.
  • 8. Quiz 1 • Which type of computers are used for whether forecasting? 4/6/2022 Computer Organization 8
  • 9. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 9 Computer Organization
  • 10. Functional Units of Computer 4/6/2022 Computer Organization 10
  • 11. Functional Units of Computer 4/6/2022 Computer Organization 11 Operation Description Take Input  The process of entering data and instructions into the computer system Store Data  Saving data and instructions so that they are available for processing as and when required. Processing Data  Performing arithmetic, and logical operations on data in order to convert them into useful information. Output Information  The process of producing useful information or results for the user, such as a printed report or visual display. Control the workflow  Directs the manner and sequence in which all of the above operations are performed.
  • 12. Connection between Memory and Processor 4/6/2022 Computer Organization 12
  • 13. Components of Processor 4/6/2022 Computer Organization 13 Components Description IR  It holds the instruction that is currently being executed.  Its output is available to the Control Circuits, which generate the timing signals. PC  It keeps track of execution of a program.  It contains the memory address of the next instruction to be fetched and executed. MAR  It holds the address of the location to be accessed. MDR  It contains the data to be written into or read out of the addressed location. GPR  General Purpose Registers are used to store the operand values temporarily. R0,R1,R2,R3,.... Rn-1
  • 14. Quiz 2 • Which holds the address of the memory location? – IR – PC – MAR – MDR – GPR 4/6/2022 Computer Organization 14
  • 15. Hardware Components of Computer Computer Organization 4/6/2022 15
  • 19. Hard Disk 4/6/2022 Computer Organization 19
  • 20. Quiz 3 • RAM is a non-volatile memory? – TRUE – FALSE 4/6/2022 Computer Organization 20
  • 21. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 21 Computer Organization
  • 22. Numbering and Character Set • BCD – 4 bit • ASCII – 7 bit • EBCDIC – 8 bit • UNICODE – 16 bit – 32 bit 4/6/2022 Computer Organization 22
  • 24. ASCII Table 4/6/2022 Computer Organization 24
  • 27. UTF - 16 4/6/2022 Computer Organization 27
  • 28. Power of 10 4/6/2022 Computer Organization 28
  • 31. Quiz 4 • 236 = ____? 4/6/2022 Computer Organization 31
  • 33. Quiz 5 • Represent in 20-bit 2’s Complement Number: (-20) 10 – a. 1111 1111 1111 1110 1100 – b. 1111 1111 1111 1110 1011 – c. 1111 1111 1111 1111 0100 – d. 0000 0000 0000 0001 0100 4/6/2022 Computer Organization 33
  • 34. Addition and Subtraction 4/6/2022 Computer Organization 34
  • 35. Quiz 6 • Convert the following pairs of decimal numbers to 5-bit 2’s-complement numbers, then perform addition and subtraction on each pair. Indicate whether or not overflow occurs for each case. – (a) 7 and 13 – (b) −12 and 9 4/6/2022 Computer Organization 35
  • 36. Multiplication of Unsigned Numbers using Array Method (Normal) 4/6/2022 Computer Organization 36
  • 37. Multiplication of Unsigned Numbers using Sequential Circuit Method - Algorithm 4/6/2022 Computer Organization 37
  • 38. Multiplication of Unsigned Numbers using Sequential Circuit Method 4/6/2022 Computer Organization 38
  • 39. Multiplication of Signed Numbers Using Sign Extension 4/6/2022 Computer Organization 39
  • 40. Booth Algorithm for Signed Numbers Multiplication 4/6/2022 Computer Organization 40
  • 41. Quiz 7 • Using Booth's Algorithm for multiplication, the multiplier -46 will be recoded as___ 4/6/2022 Computer Organization 41
  • 42. Multiplication of Signed Numbers Using Booth Algorithm 4/6/2022 Computer Organization 42
  • 43. Quiz 8 • Multiply (+13) * (-6) using booth algorithm. 4/6/2022 Computer Organization 43
  • 44. Quiz 8 - Solution 4/6/2022 Computer Organization 44
  • 45. Bit-pair Recoding Algorithm for Fast Multiplication 4/6/2022 Computer Organization 45
  • 46. Example – Bit-pair Recoding 4/6/2022 Computer Organization 46
  • 47. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 47 Computer Organization
  • 48. Memory Location and Address • The memory consists of many millions of storage cells, each of which can store a bit of information having the value 0 or 1. • Each group of n bits is referred to as a word of information, and n is called the word length. • The memory of a computer can be schematically represented as a collection of words, as shown in Figure. • Modern computers have word lengths that typically range from 16 to 64 bits. • If the word length of a computer is 32 bits, a single word can store a 32-bit signed number or four ASCII-encoded characters, each occupying 8 bits, as shown in Figure. • A unit of 8 bits is called a byte. 4/6/2022 Computer Organization 48
  • 49. Memory Location and Address • Machine instructions may require one or more words for their representation. • The memory can have up to 2k addressable locations. The 2k addresses constitute the address space of the computer. • For example, a 24-bit address generates an address space of 224 (16,777,216) locations. This number is written as 16M (16 mega), where 1M is the number 220 (1,048,576). 4/6/2022 Computer Organization 49
  • 50. Quiz 9 • a 32-bit address generates how many address locations? 4/6/2022 Computer Organization 50
  • 51. Big Endian and Little Endian Assignments • The name big-endian is used when lower byte addresses are used for the more significant bytes (the leftmost bytes) of the word. • The name little-endian is used for the opposite ordering, where the lower byte addresses are used for the less significant bytes (the rightmost bytes) of the word. (Reverse) 4/6/2022 Computer Organization 51
  • 52. Big Endian and Little Endian Assignments 4/6/2022 Computer Organization 52
  • 53. Quiz 10 • Consider a computer that has a byte-addressable memory organized in 32-bit words according to the big-endian scheme. A program reads ASCII characters entered at a keyboard and stores them in successive byte locations, starting at location 1000. Show the contents of the two memory words at locations 1000 and 1004 after the word “Johnson” has been entered. Repeat Problem for the little-endian scheme. 4/6/2022 Computer Organization 53
  • 54. Quiz 10 - Solution • In Big Endian Scheme: – Byte contents in hex, starting at location 1000, will be 4A, 6F, 68, 6E, 73, 6F, 6E. – The two words at 1000 and 1004 will be 4A6F686E and 736F6EXX. Byte 1007 (shown as XX) is unchanged. • In Little Endian Scheme: – Byte contents in hex, starting at location 1000, will be 4A, 6F, 68, 6E, 73, 6F, 6E. – The two words at 1000 and 1004 will be 6E686F4A and XX6E6F73. Byte 1007 (shown as XX) is unchanged. 4/6/2022 Computer Organization 54
  • 55. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 55 Computer Organization
  • 56. Addressing Modes • The different ways for specifying the locations of instruction operands are known as addressing modes. 4/6/2022 Computer Organization 56
  • 57. Types of Addressing Modes 4/6/2022 Computer Organization 57
  • 58. Quiz 11 • Registers R4 and R5 contain the decimal numbers 2000 and 3000 before each of the following addressing modes is used to access a memory operand. What is the effective address (EA) in each case? – (a) 12(R4) – (b) (R4,R5) – (c) 28(R4,R5) – (d) (R4)+ – (e) −(R4) 4/6/2022 Computer Organization 58
  • 59. Types of Instructions • The instructions are classified into 4 basic types based on the number of operands used in the instructions. – Three-address – Two-address – One–address and – Zero-address instruction. 4/6/2022 Computer Organization 59
  • 60. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 60 Computer Organization
  • 61. Pipeline Intro • To improve the performance of a CPU we have two options: – 1) Improve the hardware by introducing faster circuits. – 2) Arrange the hardware such that more than one operation can be performed at the same time. • Since, there is a limit on the speed of hardware and the cost of faster circuits is quite high, we have to adopt the 2nd option. • Pipelining is a process of arrangement of hardware elements of the CPU such that its overall performance is increased. • Simultaneous execution of more than one instruction takes place in a pipelined processor 4/6/2022 Computer Organization 61
  • 62. Case Study • Consider a water bottle packaging plant. Let there be 3 stages that a bottle should pass through, Inserting the bottle(I), Filling water in the bottle(F), and Sealing the bottle(S). Let us consider these stages as stage 1, stage 2 and stage 3 respectively. Let each stage take 1 minute to complete its operation. • Now, in a non pipelined operation, a bottle is first inserted in the plant, after 1 minute it is moved to stage 2 where water is filled. Now, in stage 1 nothing is happening. Similarly, when the bottle moves to stage 3, both stage 1 and stage 2 are idle. But in pipelined operation, when the bottle is in stage 2, another bottle can be loaded at stage 1. Similarly, when the bottle is in stage 3, there can be one bottle each in stage 1 and stage 2. So, after each minute, we get a new bottle at the end of stage 3. Hence, What is the average time taken to manufacture 1 bottle by using with pipeline and without pipeline?. 4/6/2022 Computer Organization 62
  • 63. Case Study Solution • Without pipelining = 9/3 minutes = 3m. • With pipelining = 5/3 minutes = 1.67m . 4/6/2022 Computer Organization 63
  • 64. Pipelining • Executing the machine instructions concurrently is called as pipelining. • a pipelined processor may process each instruction in four steps, as follows: – Fetch (F): read the instruction from the memory. – Decode (D): decode the instruction and fetch the source operand(s). – Execute (E): perform the operation specified by the instruction. – Write (W): store the result in the destination location. 4/6/2022 Computer Organization 64
  • 66. Execution in a Pipelined Processor • Execution sequence of instructions in a pipelined processor can be visualized using a space-time diagram. For example, consider a processor having 4 stages and let there be 2 instructions to be executed. We can visualize the execution sequence through the following space-time diagrams: 4/6/2022 Computer Organization 66
  • 67. Performance of a pipelined processor • Consider a ‘k’ segment pipeline with clock cycle time as ‘Tp’. • Let there be ‘n’ tasks to be completed in the pipelined processor. • Now, the first instruction is going to take ‘k’ cycles to come out of the pipeline but the other ‘n – 1’ instructions will take only ‘1’ cycle each, i.e, a total of ‘n – 1’ cycles. • So, time taken to execute ‘n’ instructions in a pipelined processor: • In the same case, for a non-pipelined processor, execution time of ‘n’ instructions will be: 4/6/2022 Computer Organization 67
  • 68. Quiz • Consider a ‘5’ segment pipeline with clock cycle time as ‘1 minute’. Let there be ‘20’ instructions to be completed. – What is the estimated time to execute all the instructions in the pipelined processor? – What is the estimated time to execute all the instructions in the non-pipelined processor? 4/6/2022 Computer Organization 68
  • 69. Speedup, Efficiency and Throughput 4/6/2022 Computer Organization 69
  • 70. Quiz • Consider a ‘5’ segment pipeline with clock cycle time as ‘1 minute’. Let there be ‘20’ instructions to be completed. – What is the estimated time to execute all the instructions in the pipelined processor? – What is the estimated time to execute all the instructions in the non-pipelined processor? – What is the speedup? – What is the efficiency? – What is the throughput? 4/6/2022 Computer Organization 70
  • 71. Hazard and its Types • Any condition that causes the pipeline to stall is called a hazard. • The other names for stalls is idle periods and bubbles. • There are three types of hazards occurs in pipelined operation. These are – Data Hazard – Instruction Hazard – Structure Hazard 4/6/2022 Computer Organization 71
  • 72. Stall - Example 4/6/2022 Computer Organization 72
  • 73. Data Hazard • Any condition in which wither the source or the destination operands of an instruction are not available at the time expected in the pipeline is called data hazard. 4/6/2022 Computer Organization 73
  • 74. Instruction Hazard • The pipeline may also be stalled because of a delay in the availability of an instruction. • For example, this may be a result of a miss in the cache, requiring the instruction to be fetched from the main memory. • Such hazards are often called control hazards or instruction hazards. 4/6/2022 Computer Organization 74
  • 75. Structural Hazard • The situation, when two instructions requires the use of a given hardware resources at the same time is called structural hazard. • Most common case in which this hazard may arise is in access to memory. • For Example, One instruction may need to access memory as part of the Execute or Write stage while another instruction is being fetched. 4/6/2022 Computer Organization 75
  • 76. Quiz 12 • Consider a pipelined processor with the following five stages: – F: Instruction Fetch – D: Instruction Decode and Operand Fetch – C: Execute – M: Memory – W: Write Back • The F, D, W and M stages take one clock cycle each to complete the operation. The number of clock cycles for the EX stage depends on the instruction. The ADD and SUB instructions need 1 clock cycle and the MUL instruction needs 3 clock cycles in the C stage. Operand forwarding is used in the pipelined processor. What is the number of clock cycles taken to complete the following sequence of instructions? – ADD R2, R1, R0 R2 <- R0 + R1 – MUL R4, R3, R2 R4 <- R3 * R2 – SUB R6, R5, R4 R6 <- R5 - R4 4/6/2022 Computer Organization 76
  • 77. Quiz 12 - Solution 4/6/2022 Computer Organization 77
  • 78. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 78 Computer Organization
  • 79. Memory Hierarchy, Cost, Size, Speed Comparison 4/6/2022 Computer Organization 79
  • 80. RAM Memory Organization 4/6/2022 Computer Organization 80
  • 81. Example • How many 64 x 8 RAM chips are needed to provide a memory capacity of 2048 bytes? – Assuming that 64 x 8 RAM chips means 64 x 8 bit RAM chips, – Since 8 bits = 1 byte, – Each RAM chip has 64 x 1 byte = 64 bytes. – Thus the number of chips to address a memory capacity of 2048 bytes will be, – 2048/64 = 32 chips. 4/6/2022 Computer Organization 81
  • 82. Quiz 13 • How many 128x16 RAM chips are needed to provide a memory capacity of 8KB? • How many 512Wx4B RAM chips are needed to provide a memory capacity of 1GB? 4/6/2022 Computer Organization 82
  • 83. Static RAM • Continuous power is needed for the cell to retain its state. If power is interrupted, the cell’s contents are lost. • Hence, SRAMs are said to be volatile memories because their contents are lost when power is interrupted. • Static RAMs can be accessed very quickly. • Access times on the order of a few nanoseconds. • SRAMs are used in applications where speed is of critical concern. 4/6/2022 Computer Organization 83
  • 84. Dynamic RAMs • Static RAMs are fast, but their cells require several transistors, so highly expensive and lower density RAMs can be implemented with complex cells . • We need less expensive and higher density RAMs can be implemented with simpler cells. • But, these simpler cells do not retain their state for a long period, unless they are accessed frequently for Read or Write operations. Memories that use such cells are called dynamic RAMs (DRAMs). • Information is stored in a dynamic memory cell in the form of a charge on a capacitor, but this charge can be maintained for only tens of milliseconds. • Since the cell is required to store information for a much longer time, its contents must be periodically refreshed by restoring the capacitor charge to its full value. 4/6/2022 Computer Organization 84
  • 85. RAM Types • Different types of volatile memories have been developed like – SRAM – DRAM • ADRAM • SDRAM – SDR SDRAM – DDR SDRAM – DDR2 SDRAM – DDR3 SDRAM – DDR4 SDRAM – DDR5 SDRAM • RDRAM (RAMBUS) 4/6/2022 Computer Organization 85
  • 86. ROM • Both static and dynamic RAM chips are volatile, which means that they retain information only while power is turned on. • There are many applications requiring memory devices that retain the stored information when power is turned off. • For example, we need to store a small program in such a memory, to be used to start the bootstrap process of loading the operating system from a hard disk into the main memory. • But, a special writing process is needed to place the information into a non-volatile memory. • Since its normal operation involves only reading the stored data, a memory of this type is called a read-only memory (ROM). 4/6/2022 Computer Organization 86
  • 87. ROM Types • Different types of non-volatile memories have been developed like – ROM, – PROM, – EPROM, – EEPROM, – Flash Memory (Digital Cameras, MP3 Players) – Flash Cards (Memory Cards) – Flash Drives (Pen Drives, SSD Hard Disks), etc. 4/6/2022 Computer Organization 87
  • 88. Quiz 14 • Which type of ROM is uses UV light to erase the content? 4/6/2022 Computer Organization 88
  • 89. Secondary Memory • Different types of secondary memories have been developed like – Magnetic Hard Disks – CD-ROM – DVD 4/6/2022 Computer Organization 89
  • 90. Magnetic Hard Disk 4/6/2022 Computer Organization 90
  • 91. Magnetic Hard Disk • Seek time, is the time required to move the read/write head to the proper track. • This time depends on the initial position of the head relative to the track specified in the address. Average values are in the 5- to 8-ms range. • The second component is the rotational delay, also called latency time, which is the time taken to reach the addressed sector after the read/write head is positioned over the correct track. On average, this is the time for half a rotation of the disk. • The sum of these two delays is called the disk access time. 4/6/2022 Computer Organization 91
  • 92. Quiz 15 • There are 16 data-recording surfaces with 65,536 tracks per surface. There is an average of 512 sectors per track, and each sector contains 256 bytes of data. Find out the capacity of the Hard Disk. 4/6/2022 Computer Organization 92
  • 93. Cache Memory • The cache is a small and very fast memory, interposed between the processor and the main memory. • The effectiveness of this approach is based on a property of computer programs called locality of reference. • This behavior manifests itself in two ways: temporal and spatial. • The first means that a recently executed instruction is likely to be executed again very soon. • The spatial aspect means that instructions close to a recently executed instruction are also likely to be executed soon. 4/6/2022 Computer Organization 93
  • 94. Hit rate and Miss rate • Let h be the hit rate, M the miss penalty, and C the time to access information in the cache. Thus, the average access time experienced by the processor is – tavg = hC + (1 − h)M • the average access time experienced by the processor in such a system is: – tavg = h1C1 + (1 − h1)h2C2 + (1 – h1)(1- h2)M • where – h1 is the hit rate in the L1 caches. – h2 is the hit rate in the L2 cache. – C1 is the time to access information in the L1 caches. – C2 is the miss penalty to transfer information from the L2 cache to an L1 cache. – M is the miss penalty to transfer information from the main memory to the L2 cache. 4/6/2022 Computer Organization 94
  • 95. Quiz 16 • Cache access time (C)= 100 ns, Memory access time (M) = 500 ns, If the hit rate is 90 % then what is the effective access time? 4/6/2022 Computer Organization 95
  • 96. Cache Memory Mapping Techniques • There are several possible methods for determining where memory blocks are placed in the cache. • 4 Techniques: – Direct Mapping – Associative Mapping – Set Associative Mapping – K-way Set Associative Mapping 4/6/2022 Computer Organization 96
  • 97. Example - Cache Memory Mapping Techniques • Consider a cache consisting of 128 blocks of 16 words each, for a total of 2048 (2K) words, and assume that the main memory is addressable by a 16-bit address. The main memory has 64K words, which we will view as 4K blocks of 16 words each. For simplicity, we have assumed that consecutive addresses refer to consecutive words. 4/6/2022 Computer Organization 97
  • 98. Direct Mapping • The simplest way to determine cache locations in which to store memory blocks is the direct-mapping technique. • In this technique, block j of the main memory maps onto block j modulo 128 of the cache, as depicted in Figure. • Thus, whenever one of the main memory blocks 0, 128, 256, . . . is loaded into the cache, it is stored in cache block 0. Blocks 1, 129, 257, . . . are stored in cache block 1, and so on. • Since more than one memory block is mapped onto a given cache block position, contention may arise for that position even when the cache is not full. • The direct-mapping technique is easy to implement, but it is not very flexible. 4/6/2022 Computer Organization 98
  • 100. Direct Mapping Examples 4/6/2022 Computer Organization 100
  • 103. Associative Mapping • In this method, a main memory block can be placed into any cache block position. • The tag bits of an address received from the processor are compared to the tag bits of each block of the cache to see if the desired block is present. This is called the associative-mapping technique. • It gives complete freedom in choosing the cache location in which to place the memory block, resulting in a more efficient use of the space in the cache. • When a new block is brought into the cache, it replaces (ejects) an existing block only if the cache is full. • In this case, we need an algorithm to select the block to be replaced. Many replacement algorithms are possible. • The complexity of an associative cache is higher than that of a direct- mapped cache, because of the need to search all 128 tag patterns to determine whether a given block is in the cache. • To avoid a long delay, the tags must be searched in parallel. A search of this kind is called an associative search. 4/6/2022 Computer Organization 103
  • 106. Set Associative Mapping • Another approach is to use a combination of the direct and associative-mapping techniques. • The blocks of the cache are grouped into sets, and the mapping allows a block of the main memory to reside in any block of a specific set. • Hence, the contention problem of the direct method is eased by having a few choices for block placement. • At the same time, the hardware cost is reduced by decreasing the size of the associative search. 4/6/2022 Computer Organization 106
  • 107. Set Associative Mapping 4/6/2022 Computer Organization 107
  • 109. Quiz • Assume a computer main memory contains 8192 blocks, and each blocks contains 256 words (1 word = 1 Byte). And also a block-set-associative (BSA) cache memory consists of a total of 32 blocks which is divided into 4 –block sets. Find out the number of bits for physical memory, TAG,SET and WORD fields? – A) 21, 10, 3, 8 – B) 21, 11, 2, 8 – C) 19, 8, 4, 7 – D) 19, 9, 3, 7 4/6/2022 Computer Organization 109
  • 110. Need of Virtual Memory • In most modern computer systems, the physical main memory is not as large as the address space of the processor. • For example, a processor that issues 32-bit addresses has an addressable space of 4G bytes. • The size of the main memory in a typical computer with a 32-bit processor may range from 1G to 4G bytes. • If a program does not completely fit into the main memory, the parts of it not currently being executed are stored on a secondary storage device, typically a magnetic disk. 4/6/2022 Computer Organization 110
  • 111. Virtual Memory 4/6/2022 Computer Organization 111
  • 112. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 112 Computer Organization
  • 113. I/O Device Accessing 4/6/2022 Computer Organization 113
  • 114. Connection for Processor and I/O devices 4/6/2022 Computer Organization 114
  • 115. I/O Device Accessing Methods • Memory Mapped I/O • Program-Controlled I/O 4/6/2022 Computer Organization 115
  • 116. Memory Mapped I/O • The I/O devices and the memory share the same address space; this arrangement is called memory-mapped I/O. • It is used in most computers. • With memory-mapped I/O, any machine instruction that can access memory can be used to transfer data to or from an I/O device. • For example, if DATAIN is the address of a register in an input device, the instruction reads the data from the DATAIN register and loads them into processor register R2. – Load R2, DATAIN • Similarly, the instruction sends the contents of register R2 to location DATAOUT, which is a register in an output device. – Store R2, DATAOUT 4/6/2022 Computer Organization 116
  • 117. Program-Controlled I/O • Consider a task that reads characters typed on a keyboard, stores these data in the memory, and displays the same characters on a display screen. • A simple way of implementing this task is to write a program that performs all functions needed to realize the desired action. • This method is known as program-controlled I/O. 4/6/2022 Computer Organization 117
  • 118. Implementing I/O operations • There are two other commonly used mechanisms for implementing I/O operations: – Interrupts – Direct Memory Access (DMA) • The following techniques are used to handle multiple devices interrupt requests: – Vectored Interrupts – Nested Interrupts – Multiple Priority Scheme – Polling – Daisy Chain Scheme 4/6/2022 Computer Organization 118
  • 119. Interconnection Standards • SCSI Bus • SATA • SAS • FIREWIRE • PCI Bus • PCI Express • Universal Serial Bus (USB) 4/6/2022 Computer Organization 119
  • 120. Preamble 1. Introduction 2. Functional Units of Computer 3. Number Representation and Arithmetic Operations 4. Memory Location and Addresses 5. Addressing Modes 6. Pipelining 7. Memory Hierarchy 8. I/O Organization 9. Control Signals Generation 4/6/2022 120 Computer Organization
  • 121. Control Signals Generation • We now examine how the processor generates the control signals that cause these actions to take place in the correct sequence and at the right time. • There are two basic approaches: – Hardwired control and – Micro-programmed control 4/6/2022 Computer Organization 121
  • 122. Thank you and any ??? 4/6/2022 Computer Organization 122