Little Endian
Total Page:16
File Type:pdf, Size:1020Kb
CM0144 – An Introduction Professor David Walker [email protected] http://users.cs.cf.ac.uk/David.W.Walker/ARCHOPASS/ Course Structure 44 lectures over 1 semester 3 Main Parts: Architecture (11 lectures): DW Walker Operating Systems (22 lectures): Y Huang Assembly Language (11 lectures): M Daley Assessment Coursework (40%) Class tests (every 2 weeks from week 3 on Monday at 11am): 25% Assembly language exercises: 15% Exam (60%) 2/4/2005 CMO144 David Walker 2 Recommended Texts “Computer Systems Architecture” Rob Williams, Pearson Higher Education 2000, ISBN 0201648598. “Operating Systems” Deitel, Deitel, and Choffnes, Pearson Higher Education 2004, ISBN 0131246968. Online reading list is at: http://www.readinglists.co.uk/rsl/student/sviewlist.dfp?id=13102 2/4/2005 CMO144 David Walker 3 Thought For The Day “... the cost of hardware has halved every year whilst its complexity has, on average, quadrupled every three years ... the increase in complexity and decrease in cost are both of the order of one million since the mid 1960s. Equivalent progress in, for example, the motor industry, would have provided us with luxury cars requiring only half a gallon of petrol for life, having sufficient thrust to go into orbit, and a price tag of about twenty pence.” (Professor Stonham, 1987, “Digital Logic Design”) 2/4/2005 CMO144 David Walker 4 What is a Digital Computer? An electronic machine which solves problems by carrying out a sequence of instructions The instructions are its program, and are usually very simple: Add two numbers Check to see if something is zero Copy data from A to B 2/4/2005 CMO144 David Walker 5 The Central Problem We want to use a computer to do useful things, but it can only process simple instructions The aim of this course is to explain how we do this In essence, we design a new set of instructions which are more convenient for us to use, but which are built from those which machine understands 2/4/2005 CMO144 David Walker 6 Multilevel Machines Problem-Oriented Language Translation (Compiler) Assembly Language Translation (Assembler) Operating System Partial Interpretation (OS) Instruction Set Architecture Interpretation (Microprogram) Microarchitecture Hardware Increasing Digital Logic Abstraction 2/4/2005 CMO144 David Walker 7 Multilevel Machines (cont.) As we progress upward, the programming model becomes more abstract Higher levels tend to be translated, lower ones interpreted Application programmers particularly interested in the top two levels 2/4/2005 CMO144 David Walker 8 Digital Logic Level Digital circuits constructed from logic gates Each gate computes a simple function based on a small number of digital inputs Clusters of logic gates are combined to make registers, control circuits and other computational devices 2/4/2005 CMO144 David Walker 9 Microarchitecture Level Consists of: Local memory (8 to 32 registers) Arithmetic Logic Unit (ALU) ALU is connected to the registers by the data path The data path operates by sending data from the registers to the ALU, and storing the result back in some register 2/4/2005 CMO144 David Walker 10 Instruction Set Architecture (ISA) Level Description of the machine’s instruction set An instruction may be carried out in hardware (direct execution), or software (interpretation by microprogram) Many different types of instruction and instruction sets 2/4/2005 CMO144 David Walker 11 Operating System Level Extends the ISA level with extra functions for: Memory management Process control Interprocess communication Concurrent program execution We’ll see more later… 2/4/2005 CMO144 David Walker 12 Assembly Language Level This is really just a human- readable form of one of the underlying languages Based on the ISA level Programs in assembler need to be translated into machine language before execution Again, more coming later… 2/4/2005 CMO144 David Walker 13 Hardware = Software The levels are really just an abstraction to help us understand a complex system Boundary between hardware and software is fuzzy: We can emulate hardware in software What goes where depends on speed, cost, reliability and expected usage 2/4/2005 CMO144 David Walker 14 The Computer Zoo Type Price Application Disposable 1 Greeting cards Embedded 10 Watches, videos Game 100 Playstation etc. Personal 1K Desktop PC Server 10K Network File Server Collection of 100K Departmental cluster Workstations Mainframe 1M Transaction Processing Supercomputer 10M Weather Prediction 2/4/2005 CMO144 David Walker 15 Summary Computers are designed as a series of levels, each built upon the last Computer architecture is the study of those parts of the computer which are visible to the programmer Hardware and software are equivalent Computers are everywhere Knowing how computers work makes programming a lot easier 2/4/2005 CMO144 David Walker 16 Milestones in Computer Architecture A brief history of computing 4 Generations of Innovation Agents of change in computing Sample Computer Families Pentium II UltraSPARC II picoJava II 2/4/2005 CMO144 David Walker 17 Generation 0: Mechanical Computers Mechanical calculators built from cogs and gears 1642: Blaise Pascal (+,-) 1670’s: Leibniz (+,-,x,/) 1834: Charles Babbage Difference Engine (+,-) Analytical Engine (General Purpose) Store (1000 x 50 digit-registers) Mill (Computational Unit) Input and Output via punched cards But never fully completed 2/4/2005 CMO144 David Walker 18 The Analytical Engine 2/4/2005 CMO144 David Walker 19 Generation 0.5: Electromagnetic Computers Various relay-based calculators: 1936: Konrad Zuse (the Z1) 1940’s: John Atanasoff (had binary arithmetic, but it was never completed) 1940’s: George Stibbitz (working prototype) 1944: Howard Aiken (Mark I) Babbage’s design, but used relays: A store of 72 words with 23 digits Instruction time of 6 seconds Input and output using paper tape 2/4/2005 CMO144 David Walker 20 The Mark I 2/4/2005 CMO144 David Walker 21 Generation 1: Vacuum Tubes Faster and cheaper than relays 1943: COLOSSUS. The world’s first electronic digital computer 1946: ENIAC. 20x10 digit memory 1949: EDSAC. First stored program computer The “von Neumann machine” 2/4/2005 CMO144 David Walker 22 The von Neumann Machine Memory Control Arithmetic Unit Logic Unit Accumulator Input Output 2/4/2005 CMO144 David Walker 23 Generation 2: Transistors Faster, cheaper, more reliable Vacuum tubes obsolete by 1950’s 1961: PDP-1, first minicomputer 1963: Burroughs B5000, special features for software 1964: CDC 6600, first scientific supercomputer 1965: PDP-8, the Omibus 2/4/2005 CMO144 David Walker 24 The PDP-8 Omibus Console Paper Other CPU Memory Terminal Tape I/O IO Omibus 2/4/2005 CMO144 David Walker 25 Generation 3: Integrated Circuits Allowed dozens of transistors to be put on one chip Faster, cheaper, smaller… 1964: IBM System/360, the first computer family 1970: PDP-11, 16-bit successor to the PDP-8 (another family) Hugely popular with Universities 2/4/2005 CMO144 David Walker 26 Generation 4: Very Large Scale Integration Millions of transistors per chip Faster, smaller, cheaper… The era of the personal computer 1974: Intel 8080 (sold as a kit) 1981: IBM PC Built from standard parts Technical specs available -> clones MSDOS, OS/2, Microsoft… 2/4/2005 CMO144 David Walker 27 Smaller, Faster & Cheaper The trend is for smaller computers, which run faster and cost less Q: Why has this happened? A: Money At least three factors involved: Moore’s Law Nathan’s First Law of Software Virtuous Economic Circle 2/4/2005 CMO144 David Walker 28 Moore’s Law Transistors 64 M 100 M 16 M 10 M 4M 1M 1M 256 K 64 K 100 K 4K 10 K 1K 16 K 1970 1975 1980 1985 1990 1995 2000 2/4/2005 CMO144 David Walker 29 Nathan’s 1st Law of Software “Software is a gas. It expands to fill the container holding it” (Nathan Myhrvold, Microsoft) Example: Word processors 1980 = 10-100K (Wordstar) 1990 = 100K-10Mb (Wordperfect 5.1) 2000 = 10Mb-100Mb (MS Office 2K) 2/4/2005 CMO144 David Walker 30 Virtuous Economic Circle New Technology Better, Cheaper More Competition Products Money New Companies New Applications New Markets 2/4/2005 CMO144 David Walker 31 The Evolution of the Pentium II Chip Date MHz Transitors Memory 4004 1971 0.108 2300 640 b 8008 1972 0.108 3500 16 Kb 8080 1974 2 6000 64 Kb 8086 1978 5-10 29000 1 Mb 8088 1979 5-8 29000 1 Mb 80286 1982 8-12 134000 16 Mb 80386 1985 16-33 275000 1 Gb 80486 1989 25-100 1.2M 4 Gb Pentium 1993 60-233 3.1M 4 Gb Pentium Pro 1995 150-200 5.5M 4 Gb Pentium II 1997 233-400 7.5M 4 Gb 2/4/2005 CMO144 David Walker 32 The UltraSPARC II Scalable Processor Architecture Reduced Instruction Set (RISC) Special instructions specially designed to handle multimedia (like MMX) 64-bit architecture for high-end computing Up to 2 Tb of main memory 2/4/2005 CMO144 David Walker 33 The picoJava II A Java Virtual Machine (JVM) realised in hardware Intended for use in embedded systems Needs to be very cheap Very easy to change the functionality of a device whilst in operation Mobile phone could download a fax-viewer picoJava II is not a real chip, but the basis of a computer family: Sun microJava 701 2/4/2005 CMO144 David Walker 34 Summary General trend towards faster, cheaper, smaller and more reliable computers Moore’s Law Progress in the computer-industry is self-catalysing Virtuous Circle We will study the architecture of the Pentium, the ultraSPARC and the JVM 2/4/2005 CMO144 David Walker 35 Next Lecture: Processors Previous Lecture: We learnt about: Milestones in computer architecture Where it all began What caused it all to happen Where it might go next 2/4/2005