Advanced Computer Architectures HB 49 Vincenzo De Florio

Advanced Computer Architectures – HB 49 – Vincenzo De Florio K. U. Leuven / ESAT / ELECTA

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 2 Advanced Computer Architectures • The domain of A. C. A. groups technological and design solutions that allow to provide, today, a better answer to the set of design goals • Better = joint & improved • Which design goals ?

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 4 Advanced Computer Architectures • Design goals of ACA include • • • Performance • Price • Dependability • Safety • Real-timeliness • Application • specific tailoring • Power consumption Size Standard compliancy Scalability Security Embedding issues Scheduling

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 5 Advanced Computer Architectures: aims & contents • Introducing the basic concepts behind ACA • Discussing the path that has brought to current technological and design solutions • Current computer design problems, techniques, solutions • Advanced solutions – domain specific, parallelisms, trends… • AI-specific ACA

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 6 Advanced Computer Architectures: Goals of the course • Give insight in the structure of modern computer systems • Understand current trends in the field of computer design • Teach how to consider the best match between an (AI) problem and a computer architecture • Enable to use architectural knowledge to optimise a service’s q Execution speed q Timeliness q Dependability q. . .

© V. De Florio KULeuven 2002 Basic Concepts Course books • Mandatory: q None. • References: Computer Design Computer Architectures For AI Computer Architectures In Practice 7 q Computer Architectures: A Quantitive Approach (2 nd edition) David A. Patterson, John L. Hennessy Morgan Kaufmann Publishers, 1996, ISBN 155860 -329 -8 ð Third edition is available, though currently the course focusses on 2 nd q Advanced Computer Architectures: A design space approach Dezsö Sima, Terence Fountain, Péter Kacsuk, Addison-Wesley, 1997, ISBN 0 -201 -42291 -3

© V. De Florio KULeuven 2002 Powerpoint slides Basic Concepts Slides can be fetched from http: //www. esat. kuleuven. ac. be/~deflorio/aca Computer Design Slides are going to be updated during the course Computer Architectures For AI Computer Architectures In Practice 8

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 9 Exercises and laboratory sessions • Under rethinking • How to make use of a parallel architecture. . . • . . . to reach a higher performance / dependability /. . . • . . . using C and a message passing system. . . • on a cluster of workstations.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 10 Exam • Oral with written preparation of 2 hours approx. • Closed book! • Possible questions, e. g. q Given a specific AI problem and a set of design goals, sketch a computer architecture that matches them. Justify your choice. q Given a sketch of a computer architecture, comment on the pros and cons of it from different viewpoints (performance, dependability, match with certain classes of AI problems…) q Reply to some questions q Solve some exercises q See example on web page

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 11 Course contents Basic Concepts • Computer Design • Computer Architectures for AI • Computer Architectures in Practice

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 12 Basic Concepts • Computer history • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 13 Basic Concepts • Computer history q Generation q Generation -1: The early days (…-1642) 0: Mechanical (1642 -1945) 1: Vacuum tubes (1945 -1955) 2: Discrete transistors (1955 -1965) 3: Integrated circuits (1965 -1980) 4: VLSI (1980 -? ) • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 14 Basic Concepts • Computer history þ Generation q Generation q Generation -1: The early days (…-1642) 0: Mechanical (1642 -1945) 1: Vacuum tubes (1945 -1955) 2: Discrete transistors (1955 -1965) 3: Integrated circuits (1965 -1980) 4: VLSI (1980 -? ) • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 15 Generation -1: The early days (…-1642) • Calculation was a need since the early days for transactions and maintaining inventories • Early man counted by means of matching one set of objects with another set (stones and sheep). The operations of addition and subtraction were simply the operations of adding or subtracting groups of objects to the sack of counting stones

© V. De Florio KULeuven 2002 Generation -1: The early days (…-1642) Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 16 = have the same cardinality = same number of elements = represent the same number!

© V. De Florio KULeuven 2002 Basic Concepts Generation -1: The early days (…-1642) A B B Computer Design Computer Architectures For AI Computer Architectures In Practice Representation of number “ 2” Representation of number “ 1” Representation of number “ 3” Procedure: put the contents of sack A into sack B Result: sack B now contains … Call this manual procedure: “addition of integer numbers” 17

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Generation -1: The early days (…-1642) Key aspect: • manipulating shells, one can manipulate numbers… • and perform simple computations (additions, subtractions…) Computer Architectures For AI Computer Architectures In Practice 18 • Very simple, error-prone computations • Taking the time needed by objects manipulation (quite slow)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 19 Generation -1: The early days (…-1642) • Early counting tables, named abaci, not only formalized this counting method but also introduced the concept of positional notation that we use today.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 20 Generation -1: The early days (…-1642) • Only much later, counting became an abstract process and numbers were represented by strings of written characters called digits. • New manual procedures could be applied on these strings • This allowed for computing on … papyrus. 111 – 010 = 101 • A little more complex computations • Still manual, though a little faster to execute • Still error prone

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 21 Generation -1: The early days (…-1642) • In the twelfth century Muhammad ibn Musa Al'Khowarizmi developed the concept of a written process to be followed to achieve some goal, and published this in a book: hence the word algorithm

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 22 Generation -1: The early days (…-1642) • For many years, “The” problem was: • How to perform q. A given algorithm q. In a mechanical (non-manual) way, q. Possibly faster than a man could do, q. Possibly with less mistakes? • For even more years computing just meant “being able to perform arithmetical operations”

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 23 Generation -1: The early days (…-1642) • Codex Madrid - Leonardo Da Vinci (1500) q Drawing of a mechanical calculator. . .

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 24 Basic Concepts • Computer history q Generation þ Generation q Generation -1: The early days (…-1642) 0: Mechanical (1642 -1945) 1: Vacuum tubes (1945 -1955) 2: Discrete transistors (1955 -1965) 3: Integrated circuits (1965 -1980) 4: VLSI (1980 -? ) • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 25 Generation 0: Mechanical (1642 -1945) • Blaise Pascal, son of a tax collector, created in 1642 an adding machine with automatic carries from one position to the next • Addition was achieved by the underlying gears turning as each digit was dialed in, the cumulative total being displayed in a window above the "keyboard”: mechanical, fixed (hardwired) algorithm

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 26 Generation 0: Mechanical (1642 -1945) • An algorithm (actually, a single one!) was computable q. Mechanically (with minimal intervention of the user) q. Slightly faster than a man could do, q. With less mistakes • Computing º “being able to perform arithmetical operations” • Numbers were represented onto quadrants (positional notation)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 27 Generation 0: Mechanical (1642 -1945) • Joseph-Marie Jacquard invented in 1801 an automatic loom using punched cards for the control of the patterns in the fabrics

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 28 Generation 0: Mechanical (1642 -1945) • The machine performed according to a fixed scheme • The output was a function of a “program” written onto punched cards • Algorithms in software: First example of a general purpose machine (for looming ; -) • Mechanical, faster, less mistakes • Allowed to create very complex fabrics at low cost • Unfortunately, Jacquard’s genial invention was regarded as threatening jobs in the cloth trade…

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 29 Generation 0: Mechanical (1642 -1945) • Charles Babbage recognized in 1822 that most navigation tables contained lots of errors leading to the loss of ships. • He applied to the British Government for assistance, and received the first government grant for computer research

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 30 Generation 0: Mechanical (1642 -1945)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 31 Generation 0: Mechanical (1642 -1945) • “I wish these calculations had been executed by steam. ” • Babbage designs the Difference Engine to compute, quickly and reliably, the entries in navigation tables • An application-specific hard-coded machine

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 33 Generation 0: Mechanical (1642 -1945) • Despite the grant from the British government, Babbage never actually built up its machine • From 1832 he devoted all his energies and all his money to a more ambitious machine… • Several years later, the Swedish Georg Scheutz, on the basis of Babbage’s publications, built a Difference Engine

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Generation 0: Mechanical (1642 -1945) • “The science of mathematics is becoming too large in its parts to be fully dominated by human intellect. The time is approaching when its entire executable part shall be appointed to the unfailing power of mechanism. ” (Babbage’s letter to the king of Sweden, 1856) Computer Architectures For AI Computer Architectures In Practice 34

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 35 Generation 0: Mechanical (1642 -1945) • Scheutz machine: completed in 1853 • Gold medal, Paris Exposition, 1855 • Sold to the Dudley Observatory in 1856 q Not without consequences! q …director at Dudley got fired! • Two sources: • http: //cdl. library. cornell. edu/cgibin/moa-cgi? notisid=ABS 18210002&byte=17574886 • Also available in http: //www. esat. kuleuven. ac. be/ ~deflorio/aca/Ma. B*. gif

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 36 Generation 0: Mechanical (1642 -1945) "The Swedish Calculating Machine [. . ] Our readers will, of course, understand that the machine is not self-acting. It does not give logarithms, for example, merely for saying, `Good machine, we want logarithms. ’ It must be fed both with manual power and with calculation. The seed must be according with the harvest wanted; men do not grow figs or thistles, even in a calculating machine. But the return is greater than in most harvests; a very little calculation makes the machine do an enormous quantity of result by help of barrel -organ exercise. ” “Calculating by Machinery”, The Manufacturer and Builder, Vol. 2, No. 8, pp. 225 -227, Aug. 1870.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 37 Generation 0: Mechanical (1642 -1945) “This machine […] solves equations of 4 th and even greater degree; operates in any numerical system […] The scientists, boosting their computation capabilities as a miracle of natural law, will be soon taken over by a simple machine that, under the nearly blind guidance of a common man and by means of custom movement, is going to dig the infinite outer space with a security and depth way greater than that of scientists. Any man able to formulate a problem and having at his disposal Mr. Scheutzs’ machine will have no need for Archimedes’, Newtons, or Laplaces […] This quasi-intelligent machine not only computes in a few seconds what normally would require hours; it also prints the obtained results, adding the advantages of a neat calligraphy to those of computations with no chance for errors. ” (Brisse, 1875, on the Scheutz machine)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 38 Generation 0: Mechanical (1642 -1945) • Babbage’s new machine was the so-called Analytical Engine • This new machine is indeed the first “computer” as we intend it today • A programmable device whose structure resembles the one of modern computers • Despite he spent most of his money and energies on the development of the new machine, Babbage was not able to succeed ¾ for the same reason, eg, Leonardo could not actually realize many of his designs: technology was not enough mature yet

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 39 Generation 0: Mechanical (1642 -1945) • Structure of the Analytical Engine q Input organs (to input data and code!) q Output organs • The Store, where data and code are stored • The Mill (arithmetical unit), to execute arithmetical operations • The Control Unit, to impose a given sequence to the operations • Uses punched cards • 1 addition in 3’’, 1 mul/div in 2’ to 4’

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 40 Generation 0: Mechanical (1642 -1945) • A fully compliant A. E. was built in 1989 -91 making use of the original Babbage’s designs

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 41 Generation 0: Mechanical (1642 -1945) • Ada Augusta King, Countess of Lovelace, may be considered as “the first programmer: ” She wrote the first programs for Babbage’s Analytical Engine

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 43 Generation 0: Mechanical (1642 -1945) • “The limits of arithmetic[al computations] had been overcome the same moment the [Jacquard’s] idea of using cards had come to light, and the Analytical Machine has actually nothing in common with the “calculating machines”. Having allowed machinery to mutually combine strings of general symbols [opcodes] in series of unlimited variety and length [the software programs], a logic link [a homomorphism] is established between material actions and those abstract mental processes that pertain to the most abstract branch of mathematical sciences. ” Ada Lovelace, 1842

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 44 Interlude • That is q No more simple arithmetical operations q No more single, predefined (set of) computations q No more manual or semi-manual use q No more the human error rate q No more the human computing speed q “Strings of general symbols arranged into series of unlimited variety and length. ” q. A noteworthy example: DNA

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 45 Generation 0: Mechanical (1642 -1945) • “[…] So a new, vast and powerful language has been developed […] such that humanity will benefit from practical applications becoming faster and more precise than it was possible so far. • To our knowledge, no machine like the Analytical Engine exists or has ever been imagined as a practical endeavor, the same way nobody could ever imagine a thinking machine. ” (cited reference)

© V. De Florio KULeuven 2002 Basic Concepts Generation 0: Mechanical (1642 -1945) • Analytical Engine Java Applet Simulator: q http: //www. fourmilab. ch/babbage/applet. html • Analytical Engine Command-line Emulator: Computer Design q http: //www. fourmilab. ch/babbage/cmdline. html • Excerpts from Babbage’s autobiography q http: //www. fourmilab. ch/babbage/contents. html Computer Architectures For AI Computer Architectures In Practice 46

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 47 Generation 0: Mechanical (1642 -1945) • 1936: Alan M. Turing defines a model of universal computability with his “Turing Machine” • A simple machine: complexity required to compute any function is all in its software • ‘‘The importance of the universal machine is clear. We do not need to have an infinity of different machines doing different jobs. A single one will suffice. The engineering problem of producing various machines for various jobs is replaced by the office work of programming the universal machine to do these jobs. ’’ (Turing, “Intelligent Machinery”)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 48 Generation 0: Mechanical (1642 -1945) • The increasing population in the US, and the demands of Congress to ask more questions in each census, was making the processing of the data a longer and longer process. • It was anticipated that the 1890 census data would not have been processed before the 1900 census was due – unless something was done to improve the processing methodology. • Herman Hollerith won the competition for the delivery of data processing equipment to assist in the processing of the data from the 1890 US Census • The company he founded, Hollerith Tabulating Company, eventually became one of the three that composed the Calculating-Tabulating-Recording (C -T-R) company in 1914, eventually renamed as IBM in 1924.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 49 Generation 0: Mechanical (1642 -1945)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 50 Generation 0: Mechanical (1642 -1945) • Konrad Zuse, in Berlin, Germany, developed in 1935 his Z-1 computer in his parent's living room, a relay computer, using binary arithmetic. • Instruction cycle time: 6 seconds (0. 17 Hz)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 51 Generation 0: Mechanical (1642 -1945) • The first large scale, automatic, general purpose, electromechanical calculator was the Harvard Mark I (AKA IBM Automatic Sequence Control Calculator [ASCC]) conceived by Howard Aiken in the late 1930’s • The ASCC was not a stored program machine but instead was driven by a paper tape containing the instructions.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Generation 0: Mechanical (1642 -1945) • Grace Murray Hopper found the first computer bug beaten to death in the jaws of a relay. She glued it into the logbook of the computer and thereafter when the machine stopped (frequently) she told Howard Aiken that they were "debugging" the computer. Numbered pages for USA patents Computer Architectures In Practice Lab book!! 52

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 53 Basic Concepts • Computer history q Generation þ Generation q Generation -1: The early days (…-1642) 0: Mechanical (1642 -1945) 1: Vacuum tubes (1945 -1955) 2: Discrete transistors (1955 -1965) 3: Integrated circuits (1965 -1980) 4: VLSI (1980 -? ) • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 54 Generation 1: Vacuum tubes (1945 -1955) • Work on ENIAC was started in 1943 by John Mauchly (left) and J. Presper Eckert

© V. De Florio KULeuven 2002 Generation 1: Vacuum tubes Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice • • • 55 18000 vacuum tubes, 1500 relays, 30 ton, 140 k. W, 20 registers of 10 decimal digits Programmed via 6000 multi-choice switches and tons of wires “In the future computers will weigh at most 1. 5 ton” (Popular Mechanics, 1949)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 56 Generation 1: Vacuum tubes • A report on the ENIAC activity gives an idea of how dependable computers were in 1947: • “Power line fluctuations and power failures made continuous operation directly off transformer mains an impossibility […] down times were long; error-free running periods were short […] After many considerable improvements, still trouble-free operating time remained at about 100 hours a week during the last 6 years of the ENIAC's use. ” • I. e. , an availability of about 60%! Martin Weik, "The ENIAC Story", ORDNANCE – The Journal of the American Ordnance Association, Jan-Feb. 1961, available at URL http: //ftp. arl. mil/~mike/comphist/eniac-story. html

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 57 Generation 1: Vacuum tubes • In 1946, John von Neumann realized the stored program machine: the program was not anymore stored in switches and wires or on punched paper, but in program memory • He designed a computer architecture consisting of a controller, an ALU with accumulator and a program/data memory, and used binary arithmetics instead of decimal arithmetics • Today’s computers still have this von Neumann architecture (that actually derives from Babbage’s, Zuse’s etc) • He lay the foundation for the “von Neumann bottleneck”, i. e. the bottleneck between the memory and the rest of the computer; all newer designs have been focussing on removing this bottleneck

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 58 Generation 1: Vacuum tubes • In 1948, the first stored program machine was operational at the University of Manchester: the Manchester Mark I http: //www. computer 50. org/mark 1/MM 1. html

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 59 Generation 1: Vacuum tubes • In 1951, the Whirlwind computer was the first to employ magnetic core memories, a principle that is popping up recently again (MRAM), but then in integrated form

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 60 Generation 1: Vacuum tubes • A magnetic core, storing 256 bits

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 61 Interlude • Yet another data representation • Numbers are now represented in a magnetic core • How good are these representations w. r. t. the “old ones”, e. g. , on paper? + They are good for faster processing, though… - …can only be used to represent a small (actually, finite!) set of numbers - Rational numbers, such as 1/3 = 0. 3333…. Î R-Q, can be easily expressed on paper, but cannot be captured by standard computer data types! 1/3 Î [0. 3… 33, 0. 3… 34]

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 62 Interlude - Due to physical properties of the representation, magnetic contents may be damaged or lost! Þ Each representation brings in some pros and some cons. Þ An important design choice!

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 63 Generation 1: Vacuum tubes • John von Neumann in 1952 with his new machine

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 64 Generation 1: Vacuum tubes • Grace Hopper took up the concept of reusable software in her 1952 paper entitled "The Education of a Computer", (Proc. ACM Conference, reprinted Annals of the History of Computing Vol. 9, No. 3 -4, pp. 271 -281) in which she described the techniques by which a computer could be used to compile pre-written code segments to be assembled into programs in correspondence with codes written in a high level language -- thus describing the concept of a compiler, and the general concept of language translation. • Similar to Turing’s “tables”

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 65 Generation 1: Vacuum tubes • In 1954, John Backus of IBM developed a programming language that allow(ed)|(s) users to express their problems in commonly understood mathematical formulae: FORTRAN • The first FORTRAN compiler consisted of 2000 punched cards (2000 lines of – undocumented – code) • Still most scientific programs are written in FORTRAN

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 66 Basic Concepts • Computer history q Generation þ Generation q Generation -1: The early days (…-1642) 0: Mechanical (1642 -1945) 1: Vacuum tubes (1945 -1955) 2: Discrete transistors (1955 -1965) 3: Integrated circuits (1965 -1980) 4: VLSI (1980 -? ) • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 67 Generation 2: Discrete transistors (1955 -1965) • William Shockley, John Bardeen, and Walter Brattain invent in 1947 the "transfer resistance" device, later to be known as the transistor

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 68 Generation 2: Discrete transistors (1955 -1965) • In 1955, IBM unveiled its IBM 704, a mainframe computer using discrete transistors, connected to several dumb terminals • The idea of central computer centers with distributed data input and output was born • First machine with floating point logic (5 k. Flops, clock: 300 k. Hz)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 69 Basic Concepts • Computer history q Generation þ Generation q Generation -1: The early days (…-1642) 0: Mechanical (1642 -1945) 1: Vacuum tubes (1945 -1955) 2: Discrete transistors (1955 -1965) 3: Integrated circuits (1965 -1980) 4: VLSI (1980 -? ) • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 70 Generation 3: Integrated circuits (1965 -1980) • In 1958, Jack St. Clair Kilby of Texas Instruments (Nobel prize physics, 2000) conceived and proved his idea of integrating one transistor with resistors and capacitors on a single semiconductor chip (size: half paper clip), which is a monolithic IC: a phase shift oscillator.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 71 Generation 3: Integrated circuits (1965 -1980) • In 1961, Fernando Corbató, MIT, produced CTSS (Compatible Time Sharing System) for the IBM 7090/94, the first effective time-sharing system and hence the first real operating system • In Great Britain the Atlas computer at the University of Manchester became operational (1962); it is the first machine to use virtual memory and paging (see later on); its instruction execution was pipelined (see later), and it contained separate fixed- and floating-point arithmetic units, capable of approximately 200 k. FLOPS.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 72 Generation 3: Integrated circuits (1965 -1980) • On April 7, 1964 IBM announced its System/360, the first IBM family of compatible machines.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 73 Generation 3: Integrated circuits (1965 -1980) • While some companies were developing bigger and faster machines, Digital Equipment Corporation introduced the PDP-8 in 1965, the first TRUE minicomputer. • The PDP-8 had a minuscule instruction set and a primitive micro-language, and excellent interface capability. Thus the PDP-8 became used extensively as a process control system

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 74

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 75 Basic Concepts • Computer history q Generation q Generation þ Generation -1: The early days (…-1642) 0: Mechanical (1642 -1945) 1: Vacuum tubes (1945 -1955) 2: Discrete transistors (1955 -1965) 3: Integrated circuits (1965 -1980) 4: VLSI (1980 -? ) • Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 76 Generation 4: VLSI (1980 -? ) • In 1971, Ted Hoff produced the Intel 4004 in response to the request from a Japanese company (Busicom) to create a chip for a calculator. It is the first microprocessor, i. e. the first processor-on -a-chip (2400 TOR)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 77 Generation 4: VLSI (1980 -? ) • Developers Edward Roberts, William Yates and Jim Bybee spent 1973 -1974 to develop the MITS Altair 8800, the first personal computer. • Priced $375, it contained 256 bytes of memory, had no keyboard, no display, and no auxiliary storage device. • Later, Bill Gates and Paul Allen wrote their first product for the Altair – a BASIC compiler

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 78 Generation 4: VLSI (1980 -? ) • IBM entered the field in 1981 with the IBM "PC”, equipped with the DOS operating system, developed under an agreement that gave Microsoft all the profits in exchange for the development costs having been borne by Microsoft. • Disregarding CP/M that had been the choice for earlier machines, IBM chose to go in a radically different direction, on the marketing assumption (that turned out to be correct) that the purchasers of the PC were a different breed than those who were prepared to build their own system from a kit.

© V. De Florio KULeuven 2002 Basic Concepts Generation 4: VLSI (1980 -? ) • In 1984, Xerox PARC (Palo Alto Research Center) presented the Alto, a desktop workstation with a novel user interface: windows, icons, mouse Computer Design Computer Architectures For AI Computer Architectures In Practice 79 First mouse

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 80 Generation 4: VLSI (1980 -? ) • In 1986, the Cray-XMP supercomputer with 4 processors reached a peak performance of 840 MFlops. It was water-cooled.

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 81 Generation 4: VLSI (1980 -? ) • The same performance has been reached in a PC by a single chip, the Pentium III, in Q 1 2000

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 82 Summarizing: Computing Era: A series of “revolutions” q 19 th Century - 40 ies: MECHANICAL ð “I wish these calculations had been executed by steam” (Babbage) q (40 ies-50 ies): New meaning for the word “computer”. VACUUM TUBES. ENIAC, 30 tons. ð “In the future computers will weigh at most 1. 5 ton” (Popular Mechanics, 1949) q (50 ies-60 ies): Concept of compiler, high level language, virtual machines. Fortran. MAINFRAMES. Punched cards and primitive terminals q (60 ies-70 ies): OS, Virtual Memory, Pipelining. MINICOMPUTERS. DEC PDP 8. Terminal, keyboard, display q (80 ies): PERSONAL COMPUTING. XEROX Alto. Windows, mice, icons. VLSI. The m. C. RISC. OBJECTORIENTATION q (90 ies-current): The web. Global awareness (Y 2 K). The “WIRELESS REVOLUTION”. Hand-held devices. MOBILE PROGRAMS. Battery-awareness…

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 83 Interlude – the key actors in the play • Structure of the Analytical Engine q Input organs (to input data and code!) q Output organs Data inputs Data path Data output Control Status • The Store, where data signals and code are stored Control Contro • The Mill (arithmetical inputs output unit), to execute Controller arithmetical operations Instruction Address • The Control Unit, to impose a given Program sequence to the memory operations • Structure of microprocessors

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 84 Virtual machines • Computer history Virtual machines

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice The concept of virtual machines • Reminder: basic structure of a microprocessor Data inputs Control signals Control inputs Data path Controller Instruction Status signals Control outputs Address Program memory 85 Data outputs

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 86 The concept of virtual machines • Operation: q The controller receives an instruction in binary form from its program memory q For each instruction, it traverses a state diagram where each transition is determined by bits of the instruction and status signals from the data path q In each state, the controller sends control signals to the components of the data path

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 87 The concept of virtual machines • How powerful do we choose an instruction? q The richer the instruction, the more difficult the controller becomes q The poorer the instruction, the more difficult and tedious the art of programming becomes q We hence want a rich programming language at the same time with having simple instructions

© V. De Florio KULeuven 2002 Basic Concepts The concept of virtual machines • Solution: q Multiple layers of virtual machines • Example Computer Design Computer Architectures For AI Computer Architectures In Practice 88 q Programmer writes in Java, which is considered the machine language of a very rich virtual machine (the Java Virtual Machine or Java VM) q The Java VM knows how to deal with complex DTs, recursion, functions, loops, … q This is translated in machine language for the physical machine, which could be a RISC with 20 simple instructions q The translation process should try to use the possibilities of the physical machine as good as possible (e. g. single cycle multiple bit shift on a barrel shifter, shift for a multiplication by a power of 2, …)

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 89 The concept of virtual machines • Translation: q Compilation ð Start with source code in high level language ð Before execution of the application starts: translate the source code to a lower level language (i. e. the machine language of a poorer virtual or physical machine) ð Execute the lower level language ð The source in the high level language is not needed at execution time anymore q Interpretation ð Start with source code in high level language ð During execution of the application: ü read one high level instruction ü translate it into a sequence of lower level instructions ü execute the lower level instructions ð The source is required during execution

© V. De Florio KULeuven 2002 Basic Concepts Computer Design The concept of virtual machines • The translator itself consists of lower level instructions • Examples q Compilation ð Pascal, C, Fortran, Cobol machine language ð Java byte code q Interpretation Computer Architectures For AI Computer Architectures In Practice 90 ð Basic machine language ð Java byte code machine language ð Perl, Python, PHP 3 (scripting languages) machine language ð machine language micro-program instructions (see next slide) ð micro-program instructions state transitions

© V. De Florio KULeuven 2002 Basic Concepts The concept of virtual machines Level 5 Compilation Level 4 Computer Design Computer Architectures In Practice Assembly language (mnemonics, variables, labels) Compilation (assembler) Level 2 Conventional machine (HEX code) Interpretation Level 1 Level 0 92 Intermediate machine independent language (JAVA byte code) Interpretation Level 3 Computer Architectures For AI Application specific language (Java) Micro-program Interpretation Digital logic: state transitions of next state FSM

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 93 An example • Ariel: a language to specify q Error recovery actions to be executed when some events occur q Example: when task 10 is found in error restart task 10 wakeup task 11 • This is done outside the user application

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 94 An example • Ariel: application specific language (deals with error recovery) • Error recovery = set of guarded actions g : a 1 … a. N , g’ : b 1 … b. N’ , . . . • Refer to nodes, tasks, groups of tasks • Guards: Þ Faulty? Running? Rebooted? Isolated? Transient? • Actions: Þ Isolate! Start! Reboot! Enable! Send!. . .

© V. De Florio KULeuven 2002 An example: Ariel: Basic ideas Basic Concepts User application Computer Design Error Detection Computer Architectures For AI Store Recovery starts Query Result Computer Architectures In Practice OK 95 DB Recovery application Skip/execute actions Recovery ends

© V. De Florio KULeuven 2002 Basic Concepts An example: Ariel: Basic ideas • Error recovery is coded in a special language q Recovery language Computer Design • Recovery language is translated into an intermediate, machine independent code q Recovery-code (r-code) Computer Architectures For AI Computer Architectures In Practice 96 • Management of error recovery: q Run-time interpretation of the r-code

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 97 An example: an Ariel script #. ariel # specification of a strategy in the Ariel recovery language # include files # defines are importable from include files via #include statements INCLUDE "my_definitions. h" INCLUDE ". . /BACKBONE. H" # definitions start with the 'DEFINE' keyword, followed # by an integer, an interval, or a list, followed # by the equal sign and a role, that may be # ASSISTANT(s) or MANAGER NPROCS = 2 Define 1 = MANAGER Define 2 = ASSISTANT

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 98 An example: an Ariel script IF [ PHASE (T{VOTER 1}) == {HAS_FAILED} AND PHASE (T 2) == {OK} ] THEN STOP T{VOTER 1} SEND {WAKEUP} T{SPARE} SEND {VOTER 1} T{SPARE} SEND {SPARE} T{VOTER 2} SEND {SPARE} T{VOTER 3} FI IF [ KILLED N 1 ] # if node 1 is down. . . THEN SEND 1000 T 2 # send code "1000" to task 2 FI IF [ KILLED N 2 ] # if node 2 is down. . . THEN SEND 1000 T 1 # send code "1000" to task 1 FI

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 99 An example: an Ariel script bash-2. 02$ art -s -i. ariel Ariel translator, v 2. 0 f 03 -Mar-2000, (c) K. U. Leuven 1998, 1999, 2000. Parsing file. ariel. . . done (158 lines in 0. 030000 CPU secs, or 5266. 667 lines per CPU sec. ) Output written in file. rcode. Intermediate-level Press any key to finish processing. . . language

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 100 An example of intermediate language Art translated Ariel strategy file: . . ariel into rcode object file : . . . rcode line rcode opn 1 opn 2 ---------------------------------00000 SET_ROLE 1 Manager 00001 SET_ROLE 2 Assistant 00002 SET_DEFAULT_ACTION 666 00003 IF 00004 STORE_PHASE. . . Thread 0 00005. . . COMPARE == 9999 00006 STORE_PHASE. . . Thread 2 00007. . . COMPARE == 1 00008 AND 00009 FALSE 10 00010 KILL Thread @line(4)

An example of intermediate language © V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice line rcode opn 1 opn 2 ---------------------------------. . . 00029 IF 00030 PUSH. . . 0 00031. . . KILLED Node 2 00032 FALSE 3 00033 PUSH. . . 1000 00034. . . SEND Thread 1 00035 FI 00036 ANEW_OA_OBJECTS 1 00037 STOP IF [ KILLED N 2 ] # if node 2 is down. . . …this Ariel fragment THEN SEND 1000 T 1 # send code "1000" to task T 1 FI 101 R-code translation of …

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 102 Ariel and r-code: global view

© V. De Florio KULeuven 2002 Basic Concepts The concept of virtual machines • Decisions to be taken during computer design q Richness of the digital logic Computer Design Computer Architectures For AI Computer Architectures In Practice 103 ð How large is the transistor budget ð How much of the budget do we spend on the controller as opposed to the data path and the onchip memories (typically 10%) q Distance between two consecutive virtual machines ð Large distance makes it difficult for a translator to employ all features offered by the lower level

© V. De Florio KULeuven 2002 Basic Concepts The concept of virtual machines • History of virtual machines q before 1950: 2 levels: ð digital logic ð conventional machine Computer Design q 1950: 3 levels: Computer Architectures For AI q 1952: 4 levels Computer Architectures In Practice 104 ð digital logic ð micro-program ð conventional machine ð assembly language

© V. De Florio KULeuven 2002 Basic Concepts Computer Design Computer Architectures For AI Computer Architectures In Practice 105 The concept of virtual machines • History of virtual machines q 1955: 5 levels ð digital logic ð micro-program ð conventional machine ð assembly language ð application specific language q 1965 ? : 6 levels ð digital logic ð micro-program ð conventional machine ð assembly language ð intermediate machine independent language ð application specific language
- Slides: 101