CA01-2014a

advertisement
COMPUTER
ARCHITECTURE AND
ORGANIZATION
Chapter 1
Computer
Abstractions
& Technologies
Introduction
• Computers are a product of the incredibly
dynamic industry of information technology
whose yield is around 10% of GDP in USA
• If transportation technology had advanced
as the information technology did, today
we would have been able to travel from
New York to London
– in less then a second, and
– it would cost a few dollars
3
Computer revolution
• Examples
– Computers in automobiles
– Cell phones
– Human genome project
– World Wide Web
– Search enigines
4
Classes of computer devices
• Desktop computer
– Designed to be used by an individual
• Server
– Used for program execution for many users;
often simultaneously and accessed via
network
– widest range of cost and capabilities
• Supercomputer
– Highest performance and cost; configured as
servers and usually cost millions of dollars.
5
Supercomputers / sizes
• terabyte
– originally 1,099,511,627,776 (240) bytes, although some communication systems and
storage systems predefined it as
1,000,000,000,000 (1012) bytes.
• petabyte
– depending on condition, 1000 or 1024
terabytes
6
Classes of computer devices
• Datacenter
– eBay & Google
– A room or building used for electricity
management, cooling and network requirements
of a large number of servers.
• Embedded computer
– inside another device, used for the execution of
a specific program or a collection
– widest range of applications and performances
7
Embedded computers
• Examples
– microprocessors in cars,
– computers in cell phones,
– computers in videogames,
– computers in TVs,
– processors in digital cameras,
– processors in music devices,
– a network of processors that control a modern
airplane or a cargo ship
8
Domination of embedded computers
9
What we will learn...
• Acronyms
– BIOS, CPU, DIMM, DRAM, PCIE, SATA,
many others..
• Acronyms
– Example: RAM (Random Access Memory)
– CPU (Central Processing Unit).
10
Understanding Performance
• Algorithm
– Determines number of operations executed
• Programming language, compiler,
architecture
– Determine number of machine instructions
executed per operation
• Processor and memory system
– Determine how fast instructions are executed
• I/O system (including OS)
– Determines how fast I/O operations are
executed
11
Below Your Program
• Application software
– Written in high-level language
• System software
– Compiler: translates HLL code
to machine code
– Operating System: service
code
• Handling input/output
• Managing memory and storage
• Scheduling tasks & sharing
resources
• Hardware
– Processor, memory, I/O
controllers
Below your program
• Software levels are organized primarily in
a hierarchical fashion, with applications
being the outermost ring and a variety of
systems software sitting between the
hardware and applications software.
• Two types of system software take central
place in every computer system today:
– the operating system, and
– the compiler
13
Operating system
• The operating system interfaces between
a user’s program and the hardware and
pro- vides a variety of services and
supervisory functions:
– Handling basic input and output operations;
– Allocating storage and memory;
– Providing for protected sharing of the
computer among multiple applications using it
simultaneously
• Linux, MacOS, and Windows
14
Compilers
• Compilers perform another vital function:
– translation of a program written in a high-level
language, such as C, C++, Java, or Visual
Basic into instructions that the hardware can
execute
• The translation of a high-level language
program in to hardware instructions is
complex.
15
To the Language of Hardware
• The easiest signals for computers to
understand are on and off
• Binary digit, also called bit. One of the
two numbers in base 2 (0 or 1) which are
information.
• Instruction A command that the computer
understands and executes.
• Example: 1000110010100000 tells the
computer to add two numbers
16
Assembler
• The first programmers communicated to computers in
binary numbers, but this was so tedious that they quickly
invented new notations that were closer to the way
humans think
• Assembler is a program that translates a
symbolic version of an instruction into the
binary version
• Assembly language, the symbolic
language for the machine instructions
• Machine language, the binary language
that the machine understands
17
Assembly command
• the command
add A,B
an assembler would translate to
1000110010100000
• This instruction tells the computer to add
the two numbers A and B.
18
Programming Languages
• High-level programming languages
– A portable language, such as C, C++, Java,
Visual Basic, consists of words and algebraic
notations that can be translated by the
compiler into assembly language
19
Levels of Program Code
• High-level language
– Level of abstraction
closer to problem
domain
– Provides for productivity
and portability
• Assembly language
– Textual representation
of instructions
• Hardware
representation
– Binary digits (bits)
– Encoded instructions
and data
20
Programming Languages
• the statement
A+B
a compiler would translate to assembly
add A,B
• Languages designed according to their
intended use:
– Fortran, created for scientific computation,
– Cobol, for business data processing,
– Lisp, for symbol manipulation.
21
Advantages of programming
languages
• they allow the programmer to think in a
much more natural way, using human
language and algebraic notation
• improved programmer productivity
• programming languages allow
programs to be independent of the
computer on which they were
developed
22
Components of a Computer
The BIG Picture
• Same components for
all kinds of computer
– Desktop, server,
embedded
• Input/output includes
– User-interface devices
• Display, keyboard,
mouse
– Storage devices
• Hard disk, CD/DVD, flash
– Network adapters
• For communicating with
other computers
The Big Picture
• The processor receives instructions and
data from memory
• The input devices write data into memory,
the output devices read data from memory
• Control sends the signals that determine
the operations of the datapath, memory,
input, and output
24
Anatomy of a Computer
Output
device
Network
cable
Input
device
Input
device
25
Devices
• Input Device
– A mechanism through which the
computer is fed information (mouse,
keyboard etc.)
• Output device
– A mechanism that conveys the result of a
computation to a user or another
computer.
• Some devices provide both input and output
to the computer (networks, disks etc.)
26
Anatomy of a Mouse
• Optical mouse
– LED illuminates
desktop
– Small low-res
camera
– Basic image
processor
• Looks for x, y
movement
– Buttons & wheel
• Supersedes rollerball mechanical
mouse
Screen
• Liquid Crystal Displays (LCDs)
– includes rod-shaped molecules in a liquid that
form a twisting helix that bends light entering
the display, from either a light source behind
the display or less often from reflected light
• Active matrix display - A liquid crystal
display using a transistor to control the
transmission of light at each individual
pixel
• Pixels, represented as a matrix of bits,
called a bit map
28
Through the Looking Glass
• LCD screen: picture elements (pixels)
– Mirrors content of frame buffer memory
29
Opening the Box
30
Inside the Box
• Motherboard
– A plastic board containing packages of integrated
circuits or chips, including processor, cache,
memory, and connectors for I/O devices such as
networks and disks.
• Integrated Circuit
– Also called a chip. A device combining dozens to
millions of transistors.
• Memory
– The storage area in which programs are kept
when they are running and that contains the data
needed by the running programs.
31
Memory
32
Memory
• Dynamic Random Access Memory
(DRAM)
– Memory built as an integrated circuit; it
provides random access to any location
• Dual Inline Memory Module (DIMM)
– A small board that contains DRAM chips on
both sides. (SIMMs have DRAMs on only one
side.)
33
Processor
• Central Processing Unit (CPU)
– the active part of the board, following the
instructions of a program to the letter. It adds
numbers, tests numbers, signals I/O devices
to activate, and so on
– Datapath- the component of the processor
that performs arithmetic operations
– Controller-The component of the processor
that commands the datapath, memory, and
I/O devices according to the instructions of the
programs
34
AMD Barcelona Microprocessor
35
Inside the Processor
• Inside the processor is another type of
memory—cache memory
• Cache memory
– small, fast memory that acts as a buffer for a
slower, larger memory
– Consists of SRAM
• Static Random Access Memory (SRAM)
– Also memory built as an integrated circuit, but
faster and less dense than DRAM
36
Abstraction
• A model that renders lower-level details of
computer systems temporarily invisible to
facilitate design of sophisticated systems.
• Instruction set architecture
– Also called architecture. An abstract interface
between the hardware and the lowest-level
software that encompasses all the information
necessary to write a machine language
program
37
ABI
• Applicative Binary Interface (ABI)
– The user portion of the instruction set plus the
operating system interfaces used by
application programmers.
• An instruction set architecture allows
computer designers to talk about functions
independently from the hardware that
performs them
38
The Big Picture
• Both hardware and software consist of
hierarchical layers, with each lower layer
hiding details from the level above
• This principle of abstraction is the way
both hardware designers and software
designers cope with the complexity of
computer systems
• One key interface between the levels of
abstraction is the instruction set
architecture—the interface between the
hardware and low-level software.
39
Data Storage
• Volatile memory
– Storage, such as DRAM, that retains data only
if it is receiving power
• Non- volatile memory
– A form of memory that retains data even in the
absence of a power source
• Main memory
– Also called primary memory. Memory used
to hold programs while they are running;
typically consists of DRAM in today’s
computers.
40
Data Storage
• Secondary memory- Non volatile memory
used to store programs and data between
runs; typically consists of magnetic disks in
today’s computers.
• Magnetic disk. Also called hard disk. A form
of nonvolatile secondary memory composed
of rotating platters coated with a magnetic
recording material.
• Flash memory - A nonvolatile semiconductor
memory. It is cheaper and slower than DRAM
41
A Safe Place for Data
• Volatile main memory
– Loses instructions and data when power off
• Non-volatile secondary memory
– Magnetic disk
– Flash memory
– Optical disk (CDROM, DVD)
Magnetic Disk
43
Flash Disks
• Flash memory, however, is a serious
challenger. Has about the same
bandwidth, but latency is 100 to 1000
times faster
• It is more expensive, but the price
difference keeps getting smaller
• Flash memory bits wear out after 100,000
to 1,000,000 writes. Thus, file systems
must keep track of the number of writes
and have a strategy to avoid wearing out
storage
44
Removable Memory
• Optical Disks,
– CD, DVD constitute the most common form of
removable storage. The Blu- Ray (BD) optical
disk standard is the heir-apparent to DVD
• Portable Memory Cards
– Flash-based removable memory cards
typically attach to a USB connection and are
often used to transfer files.
• Magnetic tape provides only slow serial
access and has been used to back up
disks
45
Communication/Advantages
• Information is exchanged between
computers at high speeds
• Resource sharing
– Rather than each computer having its own I/O
devices, devices can be shared by computers
on the network
• Nonlocal access
– By connecting computers over long distances,
users need not be near the computer they are
using.
46
Network
• Ethernet Network
• Local Area Network (LAN)
– A network designed to carry data within a
geographically confined area, typically within
a single building
• Wide Area Network (WAN)
– A network extended over hundreds of
kilometers that can span a continent
• The backbone of the Internet, which
supports the World Wide Web
47
Networks
• Communication and resource sharing
• Local area network (LAN): Ethernet
– Within a building
• Wide area network (WAN: the
Internet
• Wireless network: WiFi, Bluetooth
48
Wireless Network
• The ability to make a radio in the same
low-cost semiconductor technology
(CMOS) used for memory and
microprocessors enabled a significant
improvement in price, leading to an
explosion in deployment
• 802.11, allow for transmission rates from 1
to nearly 100 million bits per second
• All users in an immediate area share the
airwaves
49
Technology Trends
• Electronics technology continues to evolve
– Increased capacity and performance
– Reduced cost
Year
Technology
1951
Vacuum tube
1965
Transistor
1975
Integrated circuit (IC)
1995
Very large scale IC (VLSI)
2005
Ultra large scale IC
Relative performance/cost
1
35
900
2,400,000
6,200,000,000
50
Integrated Circuit
• Transistor An on/off switch controlled by
an electric signal
• The integrated circuit (IC) combined
dozens to hundreds of transistors into a
single chip
• Very Large Scale of Integration - VLSI,
hundreds to millions of transistors
51
Level of Integration
• Moore’s Law
– The transistor capacity doubles every 18-24
months.
– Gordon Moore,
one of Intel’s founders in the ’60’s
52
Growth of DRAM capacity
The DRAM industry quadrupled capacity almost every three
years, a 60% increase per year, for 20 years. In recent years,
the growth rate has slowed down, and is somewhat closer to
doubling every two to three years.
53
Learning material for this lecture
• Computer Organization & Design,
Hennessy & Patterson, 4th ed. 2007
Chapter 1.1 until 1.3 (included)
54
Preparation for next lecture:
• Computer Organization & Design,
Hennessy & Patterson, 4th ed. 2007
From Chapter 1.4 until Chapter 2
55
Download