KEMBAR78
Computer processing | PPTX
COMPUTER
PROCESSING
CSE-101
LECTURE-02
SHAKILA MAHJABIN TONNI,
LECTURER, DEPT OF CSE, BAIUST
1©SMT,Faculty,CSE,BAIUST
©SMT,Faculty,CSE,BAIUST
What is Processing?
The procedure that
transforms raw data into
useful information is
called processing.
2
©SMT,Faculty,CSE,BAIUST
Components of Processing
1. CPU:
The Control Unit (CU)
The Arithmetic Logic Unit
(ALU)
2. Memory
4. Bus:
System Bus
Address Bus
Data Bus
Control Bus
Expansion Bus
3. Registers
3
The CPU
 The processor is also called the Central
Processing Unit (CPU)
 Converts data into information
 Set of electronic circuitry attached to the
computer's main circuit board (the
motherboard) that executes stored program
instructions
 It manages all devices and performs the
actual processing of data.
 Two parts
 Control Unit (CU)
 Arithmetic Logic Unit (ALU)
4
©SMT,Faculty,CSE,BAIUST
CENTRAL PROCESSING UNIT
(CPU)5
©SMT,Faculty,CSE,BAIUST
CENTRAL PROCESSING UNIT
(CPU)
The Control Unit (CU):
All the computer’s resources are managed from the
control unit. This is the logical hub of the computer.
The Arithmetic Logic Unit (ALU):
Arithmetic operations include addition, subtraction,
multiplication and division.
When the control unit encounters an instruction that
involves arithmetic or logic, it passes that instruction to
ALU.
6
©SMT,Faculty,CSE,BAIUST
Memory
Memory also consists of chips attached to the
motherboard. Memory holds data and program
instructions as the CPU works with them. This
memory is called Random Access Memory (RAM).
The CPU can find any piece of data in RAM, when
it needs it for processing.
Also called as Primary
storage/ Primary
memory/ Main
storage/ Internal
storage/Main memory
7
©SMT,Faculty,CSE,BAIUST
MEMORY SIZE
6.9
Unit Approx. Value Actual Value
(bytes) (bytes) (bytes)
Kilobyte (KB) 1,000 B 1,024
Megabyte (MB) 1,000 KB 1,048,576
Gigabyte (GB) 1,000 MB 1,073,741,824
Terabyte (TB) 1,000 GB 1,099,511,627,776
8
©SMT,Faculty,CSE,BAIUST
Types of Memory
Non- Volatile: Non-volatile chips hold data even when the
computer is unplugged. For example, ROM,
PROM(Programmable Read Only Memory), BIOS.
Volatile: Volatile memory requires power to store data. For
example, RAM, SIMM, DIMM, SO-DIMM.
Flush: Flush memory is a special type of non-volatile RAM. It is
often used as portable storage device.
Used in Digital camera, portable MP3 player, USB device.
9
©SMT,Faculty,CSE,BAIUST
Types of Memory
Cache: Moving data between RAM and the CPU’s register is one of the most
time consuming task, as Ram is more slower than CPU.
A partial solution is to add a small memory with the CPU. It is similar to RAM, but
very fast. It holds common or recently used data.
Speeds up computer processing. Most computers have several caches.
When a program is running and CPU needs to read data, it first checks whether
the data is in the Cache memory. If the data is not there, then CPU loads the data
from RAM to registers and also, loads a copy to the Cache.
10
©SMT,Faculty,CSE,BAIUST
Cache
Step 1
Processor
requests
data or
instructions
Step 2
Go to address in main
memory and read
Step 3
Transfer to main CPU and cache
Next processor request
• Look first at cache
• Go to memory
P
R
O
C
E
S
S
O
R
R
A
M
Cache
11
©SMT,Faculty,CSE,BAIUST
RAM (Random Access
Memory)
 Requires current to retain values
 Volatile
 Data and instructions can be read and
modified
 Users typically refer to this type of memory
 Maximum amount of RAM that can be
installed is based upon the motherboard
design
 RAM contains-
Systems current instructions
Program currently running
12
ROM (Read Only Memory)
 Non-volatile
 Instructions for booting the computer
 Data and instructions can be read, but not
modified
 Instructions are typically recorded at factory
PROM
 Programmable ROM
 ROM burner can change instructions on some
ROM chips
13
©SMT,Faculty,CSE,BAIUST
Register
Special-purpose, High-speed , Temporary storage
Located inside CPU
The size of a register is sometimes called the word-size. It indicates
the amount of data or bits with which a processor can work at a single
time.
The bigger the word size, the more quickly computer can process
data.
In real life the terminologies “16-bit processor” or, “64-bit processor”
is refers to the size of registers in the processor.
If other factors are kept normal, than 32-bit registers can process
data twice as fast as the registers with 16-bits.
Instruction register
Holds instruction currently
being executed
Data register
Holds data waiting to be
processed and results from
processing
14
©SMT,Faculty,CSE,BAIUST
Bus
 Paths that transport electrical signals
 Bus width
 Number of bits of data that can be carried at a time
 Normally the same as the CPUs word size
 Speed measured in MHz
15
©SMT,Faculty,CSE,BAIUST
System Bus
 Transports data between the CPU and memory
 System Bus is of three types-
 Address bus,
 Data bus,
 Control bus.
 Address - the components pass memory
addresses to one another over the address bus.
 Control - used to send out signals to coordinate
and manage the activities of the motherboard
components.
 Data - transferred between peripherals, memory
and the CPU. Obviously, the data bus can be a
16
©SMT,Faculty,CSE,BAIUST
System Bus
CPU
PRIMARY
STORAGE
DATA BUS
ADDRESS BUS
CONTROL BUS
INPUT
DEVICES
OUTPUT
DEVICES
SECONDARY
STORAGE
17 ©SMT,Faculty,CSE,BAIUST
Expansion Buses
 Connect the motherboard to expansion slots
 Plug expansion boards into slots
 interface cards
 adapter cards
 Provides for external connectors / ports
 Serial
 Parallel
18
©SMT,Faculty,CSE,BAIUST
External/PC Buses
ISA Slow-speed devices like mouse, modem
PCI High-speed devices like hard disks and network cards
AGP Connects memory and graphics card for faster video
performance
USB Supports “daisy-chaining” eliminating the need for
multiple expansion cards; hot-swappable
IEEE 1394
(FireWire)
High-speed bus connecting video equipment to the
computer
PC Card Credit card sized PC card devices normally found on
laptops
19
©SMT,Faculty,CSE,BAIUST
Buses
20
©SMT,Faculty,CSE,BAIUST
Decoders
This type of devices is used to tell the processor what must be
done based on the instructions in the memory written by users.
So if, for example, some bytes are found in the memory that
corresponds to an addition instruction the decoder will read them and
knows that it is addition based on the bytes contained then it will
activate the control lines to inform the processor that it is an addition.
Thus the decoder is considered an interface between the memory
and the processor
©SMT,Faculty,CSE,BAIUST
Other Components21
Processors
Ό A processor is part of the computer that interpret and
executes instructions.
Ό Microprocessor: A microprocessor is essentially a
processor that happens to be on a chip (or a small
number of chips), as opposed to one made from a large
number of individual components.
 Chip size is ¼ x ¼ inch
 Composed of silicon
 Contains millions of transistors
22
©SMT,Faculty,CSE,BAIUST
Types of Microprocessors
Intel
 Pentium
 Celeron
 Xeon and Itanium
 Core i -series
Intel-compatible
 Cyrix
 AMD
23
©SMT,Faculty,CSE,BAIUST
Based on the types of instruction sets, processors are of two types
 CISC Processor (Complex Instruction Set Computing)
 CISC Technology instructions
 Supplies a large number of complex instructions at the assembly
language level.
 During the early years, since memory was slow and instructions
could be retrieved up to 10 times faster from a local ROM than
from main memory, programmers tried to put as many
instructions as possible in a microcode.
 Many of the instructions were remain unused.
 The CISC approach attempts to minimize the number of
instructions per program, sacrificing the number of cycles per
instruction.
Processor Types24
©SMT,Faculty,CSE,BAIUST
 RISC Processor (Reduced Instruction Set Computing)
 Reduced instruction set
 Small subset of instructions
 Increases speed
 RISC reduces the cycles per instruction at the cost of the
number of instructions per program.
 It is designed to operate at a higher speed (perform more million
instructions per second, or millions of instructions per second).
 Earlier, computers used only 20% of the instructions. Making the
other 80% unnecessary. One advantage of reduced instruction
set computers is that they can execute their instructions very fast
because the instructions are so simple.
Processor Types25
©SMT,Faculty,CSE,BAIUST
Types of Processing
 Serial processing
 Execute one instruction at a time
 Fetch, decode, execute, store
 Parallel Processing
 Multiple processors used at the same time
 Can perform trillions of floating-point instructions
per second (teraflops)
 Ex: network servers, supercomputers
26
©SMT,Faculty,CSE,BAIUST
Types of Processing
TASK 1
RESULT
TASK 2
RESULT
Progra
m
CPU
Progra
m
CPU
Progra
m
CPU
TASK 2
CPU
TASK 3
CPU
TASK 1
RESULT
SERIAL
PARALLEL
27
©SMT,Faculty,CSE,BAIUST
Pipelining
 Instruction’s
action need not
be complete
before the next
begins
 Fetch instruction
1, begin to
decode and fetch
instruction 2
28
©SMT,Faculty,CSE,BAIUST
Executing Programs
 CU gets an instruction
and places it in memory
 CU decodes the
instruction
 CU notifies the
appropriate part of
hardware to take action
 Control is transferred to
the appropriate part of
hardware
 Task is performed
 Control is returned to the
CU
29
©SMT,Faculty,CSE,BAIUST
Fetching
Decodin
g
Executio
n
Storing
 Steps by CPU to process data.
 CPU performance is dependent upon Instruction Count, CPI (Cycles
per instruction) and Clock cycle time. And all three are affected by the
instruction set architecture.
Fetching: This is the
instruction cycle.
Here, CPU fetches the
instruction from
memory to registers.
Decoding: CPU breaks
downs the
instructions to
correspond with the
CPU’s instruction set.
Machine Cycle
30 ©SMT,Faculty,CSE,BAIUST
Machine Cycle
©SMT,Faculty,CSE,BAIUST
Execution: CPU
carries out the
instructions in
order.
Storing: Often
CPU may required
to store the
outcome into the
memory.
Machine Cycle
31
Speed and Power
What makes a computer fast?
 Microprocessor speed
 Bus line size
 Availability of cache
 Flash memory
 RISC computers
 Parallel processing
32
©SMT,Faculty,CSE,BAIUST
THANK YOU!!33
©SMT,Faculty,CSE,BAIUST

Computer processing

  • 1.
  • 2.
    ©SMT,Faculty,CSE,BAIUST What is Processing? Theprocedure that transforms raw data into useful information is called processing. 2
  • 3.
    ©SMT,Faculty,CSE,BAIUST Components of Processing 1.CPU: The Control Unit (CU) The Arithmetic Logic Unit (ALU) 2. Memory 4. Bus: System Bus Address Bus Data Bus Control Bus Expansion Bus 3. Registers 3
  • 4.
    The CPU  Theprocessor is also called the Central Processing Unit (CPU)  Converts data into information  Set of electronic circuitry attached to the computer's main circuit board (the motherboard) that executes stored program instructions  It manages all devices and performs the actual processing of data.  Two parts  Control Unit (CU)  Arithmetic Logic Unit (ALU) 4 ©SMT,Faculty,CSE,BAIUST
  • 5.
  • 6.
    CENTRAL PROCESSING UNIT (CPU) TheControl Unit (CU): All the computer’s resources are managed from the control unit. This is the logical hub of the computer. The Arithmetic Logic Unit (ALU): Arithmetic operations include addition, subtraction, multiplication and division. When the control unit encounters an instruction that involves arithmetic or logic, it passes that instruction to ALU. 6 ©SMT,Faculty,CSE,BAIUST
  • 7.
    Memory Memory also consistsof chips attached to the motherboard. Memory holds data and program instructions as the CPU works with them. This memory is called Random Access Memory (RAM). The CPU can find any piece of data in RAM, when it needs it for processing. Also called as Primary storage/ Primary memory/ Main storage/ Internal storage/Main memory 7 ©SMT,Faculty,CSE,BAIUST
  • 8.
    MEMORY SIZE 6.9 Unit Approx.Value Actual Value (bytes) (bytes) (bytes) Kilobyte (KB) 1,000 B 1,024 Megabyte (MB) 1,000 KB 1,048,576 Gigabyte (GB) 1,000 MB 1,073,741,824 Terabyte (TB) 1,000 GB 1,099,511,627,776 8 ©SMT,Faculty,CSE,BAIUST
  • 9.
    Types of Memory Non-Volatile: Non-volatile chips hold data even when the computer is unplugged. For example, ROM, PROM(Programmable Read Only Memory), BIOS. Volatile: Volatile memory requires power to store data. For example, RAM, SIMM, DIMM, SO-DIMM. Flush: Flush memory is a special type of non-volatile RAM. It is often used as portable storage device. Used in Digital camera, portable MP3 player, USB device. 9 ©SMT,Faculty,CSE,BAIUST
  • 10.
    Types of Memory Cache:Moving data between RAM and the CPU’s register is one of the most time consuming task, as Ram is more slower than CPU. A partial solution is to add a small memory with the CPU. It is similar to RAM, but very fast. It holds common or recently used data. Speeds up computer processing. Most computers have several caches. When a program is running and CPU needs to read data, it first checks whether the data is in the Cache memory. If the data is not there, then CPU loads the data from RAM to registers and also, loads a copy to the Cache. 10 ©SMT,Faculty,CSE,BAIUST
  • 11.
    Cache Step 1 Processor requests data or instructions Step2 Go to address in main memory and read Step 3 Transfer to main CPU and cache Next processor request • Look first at cache • Go to memory P R O C E S S O R R A M Cache 11 ©SMT,Faculty,CSE,BAIUST
  • 12.
    RAM (Random Access Memory) Requires current to retain values  Volatile  Data and instructions can be read and modified  Users typically refer to this type of memory  Maximum amount of RAM that can be installed is based upon the motherboard design  RAM contains- Systems current instructions Program currently running 12
  • 13.
    ROM (Read OnlyMemory)  Non-volatile  Instructions for booting the computer  Data and instructions can be read, but not modified  Instructions are typically recorded at factory PROM  Programmable ROM  ROM burner can change instructions on some ROM chips 13 ©SMT,Faculty,CSE,BAIUST
  • 14.
    Register Special-purpose, High-speed ,Temporary storage Located inside CPU The size of a register is sometimes called the word-size. It indicates the amount of data or bits with which a processor can work at a single time. The bigger the word size, the more quickly computer can process data. In real life the terminologies “16-bit processor” or, “64-bit processor” is refers to the size of registers in the processor. If other factors are kept normal, than 32-bit registers can process data twice as fast as the registers with 16-bits. Instruction register Holds instruction currently being executed Data register Holds data waiting to be processed and results from processing 14 ©SMT,Faculty,CSE,BAIUST
  • 15.
    Bus  Paths thattransport electrical signals  Bus width  Number of bits of data that can be carried at a time  Normally the same as the CPUs word size  Speed measured in MHz 15 ©SMT,Faculty,CSE,BAIUST
  • 16.
    System Bus  Transportsdata between the CPU and memory  System Bus is of three types-  Address bus,  Data bus,  Control bus.  Address - the components pass memory addresses to one another over the address bus.  Control - used to send out signals to coordinate and manage the activities of the motherboard components.  Data - transferred between peripherals, memory and the CPU. Obviously, the data bus can be a 16 ©SMT,Faculty,CSE,BAIUST
  • 17.
    System Bus CPU PRIMARY STORAGE DATA BUS ADDRESSBUS CONTROL BUS INPUT DEVICES OUTPUT DEVICES SECONDARY STORAGE 17 ©SMT,Faculty,CSE,BAIUST
  • 18.
    Expansion Buses  Connectthe motherboard to expansion slots  Plug expansion boards into slots  interface cards  adapter cards  Provides for external connectors / ports  Serial  Parallel 18 ©SMT,Faculty,CSE,BAIUST
  • 19.
    External/PC Buses ISA Slow-speeddevices like mouse, modem PCI High-speed devices like hard disks and network cards AGP Connects memory and graphics card for faster video performance USB Supports “daisy-chaining” eliminating the need for multiple expansion cards; hot-swappable IEEE 1394 (FireWire) High-speed bus connecting video equipment to the computer PC Card Credit card sized PC card devices normally found on laptops 19 ©SMT,Faculty,CSE,BAIUST
  • 20.
  • 21.
    Decoders This type ofdevices is used to tell the processor what must be done based on the instructions in the memory written by users. So if, for example, some bytes are found in the memory that corresponds to an addition instruction the decoder will read them and knows that it is addition based on the bytes contained then it will activate the control lines to inform the processor that it is an addition. Thus the decoder is considered an interface between the memory and the processor ©SMT,Faculty,CSE,BAIUST Other Components21
  • 22.
    Processors Ό A processoris part of the computer that interpret and executes instructions. Ό Microprocessor: A microprocessor is essentially a processor that happens to be on a chip (or a small number of chips), as opposed to one made from a large number of individual components.  Chip size is ¼ x ¼ inch  Composed of silicon  Contains millions of transistors 22 ©SMT,Faculty,CSE,BAIUST
  • 23.
    Types of Microprocessors Intel Pentium  Celeron  Xeon and Itanium  Core i -series Intel-compatible  Cyrix  AMD 23 ©SMT,Faculty,CSE,BAIUST
  • 24.
    Based on thetypes of instruction sets, processors are of two types  CISC Processor (Complex Instruction Set Computing)  CISC Technology instructions  Supplies a large number of complex instructions at the assembly language level.  During the early years, since memory was slow and instructions could be retrieved up to 10 times faster from a local ROM than from main memory, programmers tried to put as many instructions as possible in a microcode.  Many of the instructions were remain unused.  The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction. Processor Types24 ©SMT,Faculty,CSE,BAIUST
  • 25.
     RISC Processor(Reduced Instruction Set Computing)  Reduced instruction set  Small subset of instructions  Increases speed  RISC reduces the cycles per instruction at the cost of the number of instructions per program.  It is designed to operate at a higher speed (perform more million instructions per second, or millions of instructions per second).  Earlier, computers used only 20% of the instructions. Making the other 80% unnecessary. One advantage of reduced instruction set computers is that they can execute their instructions very fast because the instructions are so simple. Processor Types25 ©SMT,Faculty,CSE,BAIUST
  • 26.
    Types of Processing Serial processing  Execute one instruction at a time  Fetch, decode, execute, store  Parallel Processing  Multiple processors used at the same time  Can perform trillions of floating-point instructions per second (teraflops)  Ex: network servers, supercomputers 26 ©SMT,Faculty,CSE,BAIUST
  • 27.
    Types of Processing TASK1 RESULT TASK 2 RESULT Progra m CPU Progra m CPU Progra m CPU TASK 2 CPU TASK 3 CPU TASK 1 RESULT SERIAL PARALLEL 27 ©SMT,Faculty,CSE,BAIUST
  • 28.
    Pipelining  Instruction’s action neednot be complete before the next begins  Fetch instruction 1, begin to decode and fetch instruction 2 28 ©SMT,Faculty,CSE,BAIUST
  • 29.
    Executing Programs  CUgets an instruction and places it in memory  CU decodes the instruction  CU notifies the appropriate part of hardware to take action  Control is transferred to the appropriate part of hardware  Task is performed  Control is returned to the CU 29 ©SMT,Faculty,CSE,BAIUST
  • 30.
    Fetching Decodin g Executio n Storing  Steps byCPU to process data.  CPU performance is dependent upon Instruction Count, CPI (Cycles per instruction) and Clock cycle time. And all three are affected by the instruction set architecture. Fetching: This is the instruction cycle. Here, CPU fetches the instruction from memory to registers. Decoding: CPU breaks downs the instructions to correspond with the CPU’s instruction set. Machine Cycle 30 ©SMT,Faculty,CSE,BAIUST
  • 31.
    Machine Cycle ©SMT,Faculty,CSE,BAIUST Execution: CPU carriesout the instructions in order. Storing: Often CPU may required to store the outcome into the memory. Machine Cycle 31
  • 32.
    Speed and Power Whatmakes a computer fast?  Microprocessor speed  Bus line size  Availability of cache  Flash memory  RISC computers  Parallel processing 32 ©SMT,Faculty,CSE,BAIUST
  • 33.