Components of a Computer
Download
Report
Transcript Components of a Computer
COMPUTER ARCHITECTURE &
OPERATIONS I
Instructor: Yaohang Li
Review
Last Class
Syllabus
Moore’s Law
Classes of Computers
Decimal, Binary, Octal, Hexadecimal Representations
This Class
Program and Computer
Compiler, Assembler, and Linker
Components of a Computer
Next Class
Computer Performance
Understanding Computer Performance
Algorithm
Programming language, compiler, architecture
Determine number of machine instructions executed
per operation
Processor and memory system
Determines number of operations executed
Determine how fast instructions are executed
I/O system (including OS)
Determines how fast I/O operations are executed
Application software
Written in high-level language
System software
Compiler: translates High Level
Language 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
§1.2 Below Your Program
Below Your Program
Levels of Program Code
High-level language
Assembly language
Level of abstraction closer
to problem domain
Provides for productivity
and portability
Symbolic representation of
instructions
Hardware representation
Binary digits (bits)
Encoded instructions and
data
Compiler
Function of Compiler
Convert programs in high-level language to
programs in assembly language
Example: C Compiler
C program
Assembly Program
Assembler
Assembler
Translates assembly language into binary
instructions
Assembly Language
Use symbols instead of 0’s and 1’s
More readable
Binary Instructions
MIPS binary code for summing 0 to 100 square
Linker
Separate Compilation
Allows a program to be split into pieces that
are stored in different files
Each file contains a logically related collection
of subroutines and data structures that form a
module
Can be compiled separately
Can be reused
Linker
Merge Modules together
Functions of a Linker
Tasks of a Linker
Search the program libraries to find library
routines used by the program
Determine the memory locations that code
from each module will occupy and
relocates its instructions by adjusting
absolute references
Resolves references among modules
Matching references
Relationship Among Compiler,
Assembler, and Linker
Example: gcc compiler
Compile a simple program
gcc –v test.c
The BIG Picture
Same components for
all kinds of computer
Desktop, server,
embedded
Input/output includes
User-interface devices
Storage devices
Display, keyboard, mouse
Hard disk, CD/DVD, flash
Network adapters
For communicating with
other computers
§1.3 Under the Covers
Components of a Computer
Anatomy of a Computer
Output
device
Network
cable
Input
device
Input
device
Anatomy of a Mouse
Optical mouse
LED illuminates
desktop
Small low-res camera
Basic image processor
Looks for x, y
movement
Buttons & wheel
Supersedes roller-ball
mechanical mouse
Through the Looking Glass
LCD screen: picture elements (pixels)
Mirrors content of frame buffer memory
Opening the Box
Inside the Processor (CPU)
Datapath: performs operations on data
Control: sequences datapath, memory, ...
Cache memory
Small fast SRAM memory for immediate
access to data
Inside the Processor
AMD Barcelona: 4 processor cores
Abstractions
The BIG Picture
Abstraction helps us deal with complexity
Instruction set architecture (ISA)
The hardware/software interface
Application binary interface
Hide lower-level detail
The ISA plus system software interface
Implementation
The details underlying and interface
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)
Networks
Communication and resource sharing
Local area network (LAN): Ethernet
Within a building
Wide area network (WAN: the Internet)
Wireless network: WiFi, Bluetooth
Technology Trends
Electronics
technology
continues to evolve
Increased capacity
and performance
Reduced cost
DRAM capacity
Summary
Performance of a Computer
Compiler
Assembler
Linker
Components of a Computer
What I want you to do
Review Chapter 1