Computer Operations

Download Report

Transcript Computer Operations

Computer Operations
Part 2
Many, Many Simple Operations
• Computers have small instr. set
– Decoder may only recognize 100 instr
– About 20 kinds of operations
– All other operations must be reduced to these
Cycling the Fetch/Execute Cycle
• ADD is average complexity instr.
• CPUs execute many such instr / sec
– MIPS
– FLOPS, GFLOPS, TFLOPS
The Computer Clock
• CPUs are instruction execution engines,
synchronized by clock
• Clock speed measured in ticks / sec (Hz)
• Clock cycles are short
– 2 GHz => cycle time of 0.5 ns
Standard Prefixes
One Cycle per Clock Tick
• Perspective
– Light travels about 1 ft / ns
• CPUs try to start an instr. on each clock
tick
One Cycle per Clock Tick
• CPUs use pipelining
– Overlap instr. execution
– Laundry analogy
Schematic Fetch/Execute Cycle
A COMPUTER’S VIEW OF
SOFTWARE
Computer’s View of Software
• Executable program
– Binary object file
– Sequence of 4-byte groups (words)
• Can be millions of words long
Computer’s View of Software
• CPU executes program by
• copying binary instructions into RAM
• interpreting them using Fetch/Execute Cycle
Assembly language
• CPU only “speaks” machine language
(executes binary object files)
• Near impossible to write binary code
– What to do?
– Need higher-level language and translation
• Assembly => object code
– E.g.: ADD 15, 21, 19 => 010011100…001
Assembly language
• Assembly language uses letters and #s
1. Computer scans assembly code
2. Looks up words in table to convert to binary
3. Converts #s to binary
4. Assembles binary pieces into object file
Programming Languages
• Most programs written in High-level
programming language
• Translated (compiled) to assembly
• Assembled to binary
JavaScript Fragment
Operating Systems
• Operating system (OS)
– Manages resources
• Most popular OS’s?
– Microsoft Windows
– Apple's Mac OS X
– Unix / Linux
Operating Systems
• Sits atop h/w
– Apps
– OS
– Hardware
• Responsible for
– Booting
– Process, memory, file, and device
management
Programming
• Programmers utilize s/w stack
• Software stack
– Layers of software of increasing complexity
– Higher-level abstractions toward top
Integrated Circuits (ICs)
• IC
– “Chip”
– Electrical components integrated into silicon
– Smaller = faster
• Speed of light
Photolithography
• Photolithography: process of making IC
1. Si wafer covered with light-sensitive photoresist and patterned
mask
2. Exposed to uv light which causes open areas to harden
(unexposed areas are washed away leaving pattern)
4. Hot gases etch original layer
5. When remaining photoresist is removed, the pattern from mask
remains
Making a CPU
• Intel: From Sand to Silicon – the Making of
a Chip
• http://newsroom.intel.com/docs/DOC2476#
How Semiconductor Technology
Works
• Silicon is semiconductor
• Making chip entails controlling conductivity
How Semiconductor Technology
Works
• Searching for red AND giant
9-25
On-Again, Off-Again
• Two switches can compute logical AND
• Other combinations of switches in ALU perform
– AND
– OR
– NOT
– etc.
Transistors
• Transistor
– Controllable switch
– Key component in IC
Big Picture: Running App
• Start with information-processing task
– Task is performed by a program
– Program consists of instr.
– Instr. were written in high-level language, but
have been compiled and assembled into
binary code
– CPU uses Fetch/Execute cycle to run instr.
Summary
• Computer
– CPU
• ALU
• CU
– Memory
– Storage
– I/O
• Fetch/Execute Cycle
Summary
• Machine instructions
• Programming languages
• Software stack
• Integrated circuits
Quiz 
• What part of the CPU is responsible for
arithmetic and logical operations?
• Memory is a sequence of cells, each of
which can hold 1 ___________.
• The last stage of the Fetch/Execute cycle
is ____________.