340 likes | 492 Vues
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.
E N D
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
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
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 • Computer scans assembly code • Looks up words in table to convert to binary • Converts #s to binary • Assembles binary pieces into object file
Programming Languages • Most programs written in High-level programming language • Translated (compiled) to assembly • Assembled to binary
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 • Si wafer covered with light-sensitive photoresistand patterned mask • Exposed to uv light which causes open areas to harden (unexposed areas are washed away leaving pattern) • Hot gases etch original layer • 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/DOC-2476#
How Semiconductor Technology Works • Silicon is semiconductor • Making chip entails controlling conductivity
How Semiconductor Technology Works Searching for red AND giant
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 ____________.