01 - Computer System
-
Upload
programming-techniques-and-algorithms -
Category
Technology
-
view
2.097 -
download
1
description
Transcript of 01 - Computer System
1188 110 Computer Programming : Chapter 1.2 – Computer Systems
Computer Systems
2188 110 Computer Programming : Chapter 1.2 – Computer Systems
Computer Systems
People
Software
Data
Hardware
3188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Hardware ~ Computer
Physical parts of a computer, including digital electronic circuitry.
Devices for input, processing, and output. Interestingly, microcomputer is only 0.2% of all
computer produced. Most of them are embedded systems.
Software ~ Program Introduced by John W. Tukey in 1958. A program that enables a computer to perform a
specific task, as opposed to the hardware. Consist of a list of instructions that explicitly
implement an algorithm.
4188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Data, which the system convert into information
Data are everything what is/can be processed. Consist of propositions that reflect reality. Such propositions may comprise numbers, words,
images etc. Information describes a physical or abstract domain. Stored in binary format.
People ~ Users Computer users
5188 110 Computer Programming : Chapter 1.2 – Computer Systems
Hardware Components Processors Memory Storage devices Input/Output devices
6188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
7188 110 Computer Programming : Chapter 1.2 – Computer Systems
The Processors The procedure that transforms raw data into
useful information is called processing. To perform this transformation, the computer uses two components: the processor and memory.
The processor, in a personal computer, usually consists of one or more microprocessors, which are the electronic devices. The microprocessor is plugged into a circuit board, motherboard, containing the circuitry that connects the processor to other hardware.
8188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
CPU
Memory
ExpansionCard
Motherboard
9188 110 Computer Programming : Chapter 1.2 – Computer Systems
Central Processing Unit The term central processing unit (CPU) refers to
a computer’s processing hardware, whether it consists of a single chip or several circuit boards.
10188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) The CPU is the brain of the computer, where
data is manipulated. In a microcomputer, the entire CPU is contained
on a tiny chip called microprocessor. The chip has at least two basic parts:
The control unit The arithmetic and logic unit
11188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
ALU
Data Cache
Bus Interface
Code Cache
Intel® Pentium® CPU Die
FPU
Control
Decode
Fetch
12188 110 Computer Programming : Chapter 1.2 – Computer Systems
The Control Unit All the computer resources are managed from the
control unit. The CPU’s instructions for carry out commands are built
into the control unit. The instructions, or instruction set, list all the
operations that the CPU can perform. Each instruction in the instruction set is expressed in
microcode - a series of basic directions that tell the CPU how to execute more complex operations.
Different CPUs have different instruction sets. Basic instruction such as moving data from input to
memory, moving data from memory to output.
13188 110 Computer Programming : Chapter 1.2 – Computer Systems
The Arithmetic and Logic Unit (ALU) Because all computer data is stored as numbers, much
of the processing that takes place involves comparing numbers or carrying out mathematical operations.
The computer can perform only two types of operations: Arithmetic operations Logical operations
When the control unit encounters an instruction that involves arithmetic or logic, it passes that instruction to the ALU.
The ALU includes a group of registers that are used to hold the data currently being processed. Register = high-speed memory built directly inside the
CPU.
14188 110 Computer Programming : Chapter 1.2 – Computer Systems
Operations Performed by the ALU Arithmetic Operations
+ add- subtract× multiply/ divide^ raise by a power
Logical Operations=, ≠ equal, not equal> greater than≥ greater than or equal< less than≤ less than or equal~ not
15188 110 Computer Programming : Chapter 1.2 – Computer Systems
Registers The size of the registers, called word size,
indicates the amount of data which the computer can work at any given time.
The bigger the word size, the more quickly the computer can process a set of data.
When we refer to 32-bit processors, or 64-bit processors, or even 64-bit computers, we usually refer to the size of register inside the processor chip.
16188 110 Computer Programming : Chapter 1.2 – Computer Systems
CPUs used in Microcomputers Intel
CPU Register Max. Memory8086
8088
i386
Pentium
Pentium 4
Core 2
Itanium 9000
16 bits
16 bits
32 bits
32 bits
32 bits
64 bits
64 bits
1 MB
1 MB
4 GB
4 GB
4 GB
1 TB
1 PB
Data Bus16 bits
8 bits
32 bits
64 bits
64 bits
64 bits
64 bits
17188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Advanced Micro Device (AMD)
Head-to-head since Pentium® Sempron ~ Intel Celeron Athlon 64 ~ Intel Core Opteron ~ Intel Xeon
VIA Technologies Small, cheap, low power consumption C3 C7
18188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)MIPS R4400
PowerPC 970
UltraSPARC T1
Cell
19188 110 Computer Programming : Chapter 1.2 – Computer Systems
Floating Point Units The ALU in CPU is designed to manipulate
whole numbers that are not too large or too small. If it is forced to work with decimals, it can really get bogged down.
A math coprocessor is a special chip designed to handle complicated mathematical operations. New CPUs have math coprocessor built in.
The math coprocessor uses floating-point arithmetic techniques that translates numbers into the scientific notation, e.g., 0.0000586 → 5.86 x 10-5 128610000000 → 1.2861 x 1011
20188 110 Computer Programming : Chapter 1.2 – Computer Systems
Parallel Processing A computer with more than one processor
produces faster data processing. The dual-processor and quad-processor versions
of PCs are available today. Also, multi-core processors.
Microsoft Window, Linux, Mac OS, and various UNIX operating system can make use of additional processors.
In parallel processing, multiple processors are used in a single system, enabling them to share processing tasks.
21188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) In a massively parallel processor (MPP) system,
many processors are used. Some MPP systems utilize
thousands of processors simultaneously.
IBM Blue Gene/L
22188 110 Computer Programming : Chapter 1.2 – Computer Systems
Memory Memory is the computer’s electronic scratch pad.
Program are loaded into and run from memory. Data used by program is also loaded into memory for fast access -- but only temporarily.
Most common type of memory is called Random Access Memory (RAM).
The most common measurement unit for describing a computer’s memory is the byte. Kilobytes (kB) = 1,024 bytes Megabytes (MB) = 1,024 x 1,024 bytes Gigabytes (GB) = 1,024 x 1,024 x 1,024 bytes
23188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) The CPU has no capability to store large sets of
data or entire programs permanently. The CPU has only small space of register.
The CPU needs million of bytes of space where it can hold programs and the data being manipulated while they are being used. This area is called memory.
Memory is an electronic chip. The memory may be soldered on a mainboard or on a small circuit board attached to a mainboard.
There are two types of built-in memory: Volatile and Non-Volatile.
24188 110 Computer Programming : Chapter 1.2 – Computer Systems
ROM ROM is non-volatile memory chips. Putting data
into this kinds of memory is called “burning-in the data”, and need special tools.
The data in these chips can only be read and used -- it cannot be changed -- so the memory is called Read-Only Memory (ROM).
25188 110 Computer Programming : Chapter 1.2 – Computer Systems
RAM Memory which is its data can be changed is
called random access memory(RAM). When talking about computer memory, we usually
mean the volatile RAM. Physically, RAM consists of some chips on a
small circuit board.
26188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
RAM
27188 110 Computer Programming : Chapter 1.2 – Computer Systems
Current RAM Technologies Synchronous Dynamic RAM (SDRAM)
Synchronize memory bus clock with front side bus (FSB) clock.
Double Data-Rate Synchronous DRAM (DDR SDRAM or just DDR) Operate both rising and falling edge of the clock. DDR2 doubles FSB clock. DDR3 quadruples FSB clock.
28188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Memory chips usually grouped together on small
circuit boards called Single In-Line Memory Modules (SIMMs) Dual In-Line Memory Modules (DIMMs) Small Outline DIMMs (SO-DIMMs)
29188 110 Computer Programming : Chapter 1.2 – Computer Systems
The Bus The term bus refers to the electrical paths
between the components of a computer. Actually, the bus is a group of parallel wires.
The motherboard includes an address bus and a data bus. The address bus leads from the CPU to memory
(RAM and ROM). The data bus connects the CPU to memory as well
as all the storage, input/output, and communication devices.
30188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
31188 110 Computer Programming : Chapter 1.2 – Computer Systems
Accessing Data in the Memory The CPU stored and retrieves each piece of data
using a memory address. Memory address is a number indicates a
location of data on the memory chips. Memory addresses start at zero and go up to one
less than the number of bytes of memory in the computer.
32188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Requests for data are sent from the CPU to RAM along the
address bus. The request consists of a memory address. The data comes back to the CPU via the data bus.
33188 110 Computer Programming : Chapter 1.2 – Computer Systems
Cache Memory Cache memory is
similar to RAM, except that it is extremely fast compared to normal memory.
The cache speeds up processing by storing frequently used data or instruction in its high-speed memory.
34188 110 Computer Programming : Chapter 1.2 – Computer Systems
Extending the Processor's Power to Other Devices
Ports Printer (parallel) ports Communication (serial) ports USB ports
Expansion Slots and Boards Display cards Sound cards Network interface cards
35188 110 Computer Programming : Chapter 1.2 – Computer Systems
Ports External devices - such as those used for input
and output - are connected to the system by ports on the back of the computer.
PCs feature a number of built-in ports, which are ready to accept devices such as a printer, mouse, keyboard, phone line, microphone, speakers, and others.
Most computers come with a serial port and a parallel port.
36188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
PS/2 mouse
PS/2 keyboard
Parallel port
Serial port
USB port
RJ45 socket
Audio jack
37188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
VGA D-SUB
DVI
HDMI
Firewire port
eSATA
38188 110 Computer Programming : Chapter 1.2 – Computer Systems
Serial Ports Transmits one bit of data at a time
39188 110 Computer Programming : Chapter 1.2 – Computer Systems
Parallel Ports Transmit one byte of data at a time
40188 110 Computer Programming : Chapter 1.2 – Computer Systems
Universal Serial Bus (USB)
USB is a serial bus standard to interface devices.
Designed to allow many peripherals to be connected using a single port.
USB port
Serial port
Parallel port
41188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Allowing devices to be connected and
disconnected without rebooting the computer. Provide power supply for low-consumption
devices. Allowing many devices to be used without
specific device drivers to be installed. Data rate
Low speed: 1.5 Mbps (USB 1.1 & 2.0) Full speed: 12 Mbps (USB 1.1 & 2.0) Hi-speed: 480 Mbps (USB 2.0) Super-speed: 4.8 Gbps (USB 3.0)
42188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
43188 110 Computer Programming : Chapter 1.2 – Computer Systems
Expansion Slots and Cards If the PC does not have a port for an external
device, you can install an expansion card into one of the empty expansion slots.
A card provides the correct port for the new device, and connects the device to the CPU by way of the computer's expansion buses. Peripheral Component Interconnect (PCI) bus
Standard 32/64-bit I/O bus. Accelerated Graphics Port (AGP) bus.
A faster bus for 3D video card.
44188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)
PCIe x16 slot
Modern PCs are now using PCI Express (PCI-E or PCIe).
PCI slot
PCIe x1 slot
45188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Most common expansion cards
Sound card
Video card
Network Interface Card
46188 110 Computer Programming : Chapter 1.2 – Computer Systems
Input and Output Devices Input devices accept data and instructions from
user
47188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Output devices return processed data back to the
user
48188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.) Some types of hardware can act as both input
and output devices, e.g., touchscreen. The most common types of devices that can
perform both input and output, however, are communication devices, which connect one computer to another -- a process known as networking.
Modem
Network Interface Card
49188 110 Computer Programming : Chapter 1.2 – Computer Systems
Storage Devices Storage is a device to hold the data files and the
program files. The three distinctions between storage and
memory: More room in storage than in memory. Contents are retained in storage when the computer is
turned off, whereas the contents in memory disappear. Storage is much cheaper than memory.
The most common storage medium is the magnetic disk. Floppy disk ~ obsoleted by flash drive Hard disk
50188 110 Computer Programming : Chapter 1.2 – Computer Systems
(cont'd.)