advanced computer architectures – hb49 –

101
Advanced Computer Advanced Computer Architectures Architectures HB49 HB49 Vincenzo De Florio K.U.Leuven / ESAT / ELECTA

Upload: bedros

Post on 20-Jan-2016

48 views

Category:

Documents


0 download

DESCRIPTION

Advanced Computer Architectures – HB49 –. Vincenzo De Florio K.U.Leuven / ESAT / ELECTA. 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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Advanced Computer Architectures –  HB49  –

Advanced Computer Advanced Computer ArchitecturesArchitectures

– – HB49 HB49 ––

Vincenzo De FlorioK.U.Leuven / ESAT / ELECTA

Page 2: Advanced Computer Architectures –  HB49  –

1/2

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Advanced Computer ArchitecturesAdvanced 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 ?

Page 3: Advanced Computer Architectures –  HB49  –

1/4

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

• Design goals of ACA include

• Performance • Power consumption• Price • Size• Dependability • Standard compliancy• Safety • Scalability• Real-timeliness • Security• Application-

specific tailoring• Embedding issues

Advanced Computer ArchitecturesAdvanced Computer Architectures

• Scheduling

Page 4: Advanced Computer Architectures –  HB49  –

1/5

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Advanced Computer Advanced Computer Architectures: aims & contentsArchitectures: 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

Page 5: Advanced Computer Architectures –  HB49  –

1/6

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Advanced Computer Architectures: Advanced Computer Architectures: Goals of the courseGoals 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 Execution speed Timeliness Dependability ...

Page 6: Advanced Computer Architectures –  HB49  –

1/7

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Course booksCourse books

• Mandatory: None.

• References: Computer Architectures: A Quantitive Approach

(2nd edition)David A. Patterson, John L. HennessyMorgan Kaufmann Publishers, 1996, ISBN 1-55860-329-8

Third edition is available, though currently the course focusses on 2nd

Advanced Computer Architectures: A design space approach

Dezsö Sima, Terence Fountain, Péter Kacsuk, Addison-Wesley, 1997, ISBN 0-201-42291-3

Page 7: Advanced Computer Architectures –  HB49  –

1/8

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Powerpoint slidesPowerpoint slides

Slides can be fetched fromhttp://www.esat.kuleuven.ac.be/~deflorio/aca

Slides are going to be updated during the course

Page 8: Advanced Computer Architectures –  HB49  –

1/9

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Exercises and laboratory sessionsExercises and laboratory sessions

• 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.

• Under rethinking

Page 9: Advanced Computer Architectures –  HB49  –

1/10

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

ExamExam

• Oral with written preparation of 2 hours approx.

• Closed book!• Possible questions, e.g.

Given a specific AI problem and a set of design goals, sketch a computer architecture that matches them. Justify your choice.

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…)

Reply to some questions Solve some exercises See example on web page

Page 10: Advanced Computer Architectures –  HB49  –

1/11

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Course contentsCourse contents

Basic Concepts• Computer Design• Computer Architectures for AI• Computer Architectures in Practice

Page 11: Advanced Computer Architectures –  HB49  –

1/12

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history• Virtual machines

Page 12: Advanced Computer Architectures –  HB49  –

1/13

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history Generation -1: The early days (…-1642) Generation 0: Mechanical (1642-1945) Generation 1: Vacuum tubes (1945-1955) Generation 2: Discrete transistors (1955-1965) Generation 3: Integrated circuits (1965-1980) Generation 4: VLSI (1980-?)

• Virtual machines

Page 13: Advanced Computer Architectures –  HB49  –

1/14

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history Generation -1: The early days (…-1642) Generation 0: Mechanical (1642-1945) Generation 1: Vacuum tubes (1945-1955) Generation 2: Discrete transistors (1955-1965) Generation 3: Integrated circuits (1965-1980) Generation 4: VLSI (1980-?)

• Virtual machines

Page 14: Advanced Computer Architectures –  HB49  –

1/15

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-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

Page 15: Advanced Computer Architectures –  HB49  –

1/16

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-1642)

= have the same cardinality= same number of elements= represent the same number!

Page 16: Advanced Computer Architectures –  HB49  –

1/17

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-1642)

Call this manual procedure: “addition of integer numbers”

Representation of number “2”

A

Representation of number “1”

B

Procedure: put the contents of sack A into sack BResult: sack B now contains …

Representation of number “3”

B

Page 17: Advanced Computer Architectures –  HB49  –

1/18

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-1642)

Key aspect: • manipulating shells, one can manipulate numbers…• and perform simple computations (additions, subtractions…)

• Very simple, error-prone computations• Taking the time needed by objects manipulation (quite slow)

Page 18: Advanced Computer Architectures –  HB49  –

1/19

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-1642)

• Early counting tables, named abaci, not only formalized this counting method but also introduced the concept of positional notation that we use today.

Page 19: Advanced Computer Architectures –  HB49  –

1/20

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-1642)

111 –010 =

101

• 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.

• A little more complex computations• Still manual, though a little faster to execute• Still error prone

Page 20: Advanced Computer Architectures –  HB49  –

1/21

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-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

Page 21: Advanced Computer Architectures –  HB49  –

1/22

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-1642)

• For many years, “The” problem was:• How to perform

A given algorithm In a mechanical (non-manual) way,Possibly faster than a man could do,Possibly with less mistakes?

• For even more years computing just meant “being able to perform arithmetical operations”

Page 22: Advanced Computer Architectures –  HB49  –

1/23

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation -1: The early daysGeneration -1: The early days(…-1642)(…-1642)

• Codex Madrid - Leonardo Da Vinci (1500) Drawing of a mechanical calculator...

Page 23: Advanced Computer Architectures –  HB49  –

1/24

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history Generation -1: The early days (…-1642) Generation 0: Mechanical (1642-1945) Generation 1: Vacuum tubes (1945-1955) Generation 2: Discrete transistors (1955-1965) Generation 3: Integrated circuits (1965-1980) Generation 4: VLSI (1980-?)

• Virtual machines

Page 24: Advanced Computer Architectures –  HB49  –

1/25

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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

Page 25: Advanced Computer Architectures –  HB49  –

1/26

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

• An algorithm (actually, a single one!) was computable Mechanically (with minimal intervention of

the user)Slightly faster than a man could do,With less mistakes

• Computing “being able to perform arithmetical operations”

• Numbers were represented onto quadrants (positional notation)

Page 26: Advanced Computer Architectures –  HB49  –

1/27

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

• Joseph-Marie Jacquard invented in 1801 an automatic loom using punched cards for the control of the patterns in the fabrics

Page 27: Advanced Computer Architectures –  HB49  –

1/28

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

• The machine performed according to a fixed scheme

• The output was a function of a “program” written onto punched cards

• Mechanical, faster, less mistakes• Allowed to create very complex fabrics at low

cost

• Algorithms in software: First example of a general purpose machine (for looming ;-)

• Unfortunately, Jacquard’s genial invention was regarded as threatening jobs in the cloth trade…

Page 28: Advanced Computer Architectures –  HB49  –

1/29

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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

Page 29: Advanced Computer Architectures –  HB49  –

1/30

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

Page 30: Advanced Computer Architectures –  HB49  –

1/31

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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

Page 31: Advanced Computer Architectures –  HB49  –

1/33

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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

Page 32: Advanced Computer Architectures –  HB49  –

1/34

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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)

Page 33: Advanced Computer Architectures –  HB49  –

1/35

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

• Scheutz machine: completed in 1853• Gold medal, Paris Exposition, 1855• Sold to the Dudley Observatory in 1856

Not without consequences! …director at Dudley got fired!

• Two sources:• http://cdl.library.cornell.edu/cgi-bin/moa/

moa-cgi?notisid=ABS1821-0002&byte=17574886

• Also available inhttp://www.esat.kuleuven.ac.be/~deflorio/aca/MaB*.gif

Page 34: Advanced Computer Architectures –  HB49  –

1/36

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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.

Page 35: Advanced Computer Architectures –  HB49  –

1/37

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

“This machine […] solves equations of 4th 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)

Page 36: Advanced Computer Architectures –  HB49  –

1/38

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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

Page 37: Advanced Computer Architectures –  HB49  –

1/39

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

• Structure of the Analytical Engine Input organs (to input data and code!) 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’

Page 38: Advanced Computer Architectures –  HB49  –

1/40

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

• A fully compliant A.E. was built in 1989-91 making use of the original Babbage’s designs

Page 39: Advanced Computer Architectures –  HB49  –

1/41

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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

Page 40: Advanced Computer Architectures –  HB49  –

1/43

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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

Page 41: Advanced Computer Architectures –  HB49  –

1/44

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

InterludeInterlude

• That is No more simple arithmetical operations No more single, predefined (set of) computations No more manual or semi-manual use No more the human error rate No more the human computing speed

“Strings of general symbols arranged into series of unlimited variety and length.” A noteworthy example: DNA

Page 42: Advanced Computer Architectures –  HB49  –

1/45

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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)

Page 43: Advanced Computer Architectures –  HB49  –

1/46

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

• Analytical Engine Java Applet Simulator: http://www.fourmilab.ch/babbage/applet.html

• Analytical Engine Command-line Emulator: http://www.fourmilab.ch/babbage/cmdline.html

• Excerpts from Babbage’s autobiography http://www.fourmilab.ch/babbage/contents.html

Page 44: Advanced Computer Architectures –  HB49  –

1/47

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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”)

Page 45: Advanced Computer Architectures –  HB49  –

1/48

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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.

Page 46: Advanced Computer Architectures –  HB49  –

1/49

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(1642-1945)

Page 47: Advanced Computer Architectures –  HB49  –

1/50

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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)

Page 48: Advanced Computer Architectures –  HB49  –

1/51

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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.

Page 49: Advanced Computer Architectures –  HB49  –

1/52

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 0: MechanicalGeneration 0: Mechanical(1642-1945)(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.

Lab book!!

Numbered pagesfor USA patents

Page 50: Advanced Computer Architectures –  HB49  –

1/53

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history Generation -1: The early days (…-1642) Generation 0: Mechanical (1642-1945) Generation 1: Vacuum tubes (1945-1955) Generation 2: Discrete transistors (1955-1965) Generation 3: Integrated circuits (1965-1980) Generation 4: VLSI (1980-?)

• Virtual machines

Page 51: Advanced Computer Architectures –  HB49  –

1/54

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 1: Vacuum tubes(1945-1955)(1945-1955)

• Work on ENIAC was started in 1943 by John Mauchly (left) and J. Presper Eckert

Page 52: Advanced Computer Architectures –  HB49  –

1/55

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 1: Vacuum tubes

• 18000 vacuum tubes, 1500 relays, 30 ton, 140 kW, 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)

Page 53: Advanced Computer Architectures –  HB49  –

1/56

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 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

Page 54: Advanced Computer Architectures –  HB49  –

1/57

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 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

Page 55: Advanced Computer Architectures –  HB49  –

1/58

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 1: Vacuum tubes

• In 1948, the first stored program machine was operational at the University of Manchester: the Manchester Mark I http://www.computer50.org/mark1/MM1.html

Page 56: Advanced Computer Architectures –  HB49  –

1/59

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 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

Page 57: Advanced Computer Architectures –  HB49  –

1/60

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 1: Vacuum tubes

• A magnetic core, storing 256 bits

Page 58: Advanced Computer Architectures –  HB49  –

1/61

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

InterludeInterlude

• 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 as1/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]

Page 59: Advanced Computer Architectures –  HB49  –

1/62

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

InterludeInterlude

- 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!

Page 60: Advanced Computer Architectures –  HB49  –

1/63

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 1: Vacuum tubes

• John von Neumann in 1952 with his new machine

Page 61: Advanced Computer Architectures –  HB49  –

1/64

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 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”

Page 62: Advanced Computer Architectures –  HB49  –

1/65

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 1: Vacuum tubesGeneration 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

Page 63: Advanced Computer Architectures –  HB49  –

1/66

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history Generation -1: The early days (…-1642) Generation 0: Mechanical (1642-1945) Generation 1: Vacuum tubes (1945-1955) Generation 2: Discrete transistors (1955-1965) Generation 3: Integrated circuits (1965-1980) Generation 4: VLSI (1980-?)

• Virtual machines

Page 64: Advanced Computer Architectures –  HB49  –

1/67

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 2: Discrete transistors Generation 2: Discrete transistors (1955-1965)(1955-1965)

• William Shockley, John Bardeen, and Walter Brattain invent in 1947 the "transfer resistance" device, later to be known as the transistor

Page 65: Advanced Computer Architectures –  HB49  –

1/68

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 2: Discrete transistors Generation 2: Discrete transistors (1955-1965)(1955-1965)

• In 1955, IBM unveiled its IBM704, 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 kFlops, clock: 300 kHz)

Page 66: Advanced Computer Architectures –  HB49  –

1/69

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history Generation -1: The early days (…-1642) Generation 0: Mechanical (1642-1945) Generation 1: Vacuum tubes (1945-1955) Generation 2: Discrete transistors (1955-1965) Generation 3: Integrated circuits (1965-1980) Generation 4: VLSI (1980-?)

• Virtual machines

Page 67: Advanced Computer Architectures –  HB49  –

1/70

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 3: Integrated circuits Generation 3: Integrated circuits (1965-1980)(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.

Page 68: Advanced Computer Architectures –  HB49  –

1/71

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 3: Integrated circuits Generation 3: Integrated circuits (1965-1980)(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 kFLOPS.

Page 69: Advanced Computer Architectures –  HB49  –

1/72

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 3: Integrated circuits Generation 3: Integrated circuits (1965-1980)(1965-1980)

• On April 7, 1964 IBM announced its System/360, the first IBM family of compatible machines.

Page 70: Advanced Computer Architectures –  HB49  –

1/73

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 3: Integrated circuits Generation 3: Integrated circuits (1965-1980)(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

Page 71: Advanced Computer Architectures –  HB49  –

1/74

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Page 72: Advanced Computer Architectures –  HB49  –

1/75

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Basic ConceptsBasic Concepts

• Computer history Generation -1: The early days (…-1642) Generation 0: Mechanical (1642-1945) Generation 1: Vacuum tubes (1945-1955) Generation 2: Discrete transistors (1955-1965) Generation 3: Integrated circuits (1965-1980) Generation 4: VLSI (1980-?)

• Virtual machines

Page 73: Advanced Computer Architectures –  HB49  –

1/76

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 4: VLSI (1980-?)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)

Page 74: Advanced Computer Architectures –  HB49  –

1/77

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 4: VLSI (1980-?)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

Page 75: Advanced Computer Architectures –  HB49  –

1/78

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 4: VLSI (1980-?)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.

Page 76: Advanced Computer Architectures –  HB49  –

1/79

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 4: VLSI (1980-?)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

First mouse

Page 77: Advanced Computer Architectures –  HB49  –

1/80

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 4: VLSI (1980-?)Generation 4: VLSI (1980-?)

• In 1986, the Cray-XMP supercomputer with 4 processors reached a peak performance of 840 MFlops. It was water-cooled.

Page 78: Advanced Computer Architectures –  HB49  –

1/81

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Generation 4: VLSI (1980-?)Generation 4: VLSI (1980-?)

• The same performance has been reached in a PC by a single chip, the Pentium III, in Q1 2000

Page 79: Advanced Computer Architectures –  HB49  –

1/82

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Summarizing: Computing Era:Summarizing: Computing Era:A series of “revolutions”A series of “revolutions”

19th Century - 40ies: MECHANICAL“I wish these calculations had been executed by

steam” (Babbage) (40ies-50ies): 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) (50ies-60ies): Concept of compiler, high level language,

virtual machines. Fortran. MAINFRAMES. Punched cards and primitive terminals

(60ies-70ies): OS, Virtual Memory, Pipelining. MINICOMPUTERS. DEC PDP8. Terminal, keyboard, display

(80ies): PERSONAL COMPUTING. XEROX Alto. Windows, mice, icons. VLSI. The C. RISC. OBJECT-ORIENTATION

(90ies-current): The web. Global awareness (Y2K). The “WIRELESS REVOLUTION”. Hand-held devices. MOBILE PROGRAMS. Battery-awareness…

Page 80: Advanced Computer Architectures –  HB49  –

1/83

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Interlude – Interlude – the key actors in the playthe key actors in the play

• Structure of the Analytical Engine Input organs (to input

data and code!) 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

Data path

Controller

Controlsignals

Statussignals

Datainputs

Dataoutputs

Controlinputs

Controloutputs

Programmemory

AddressInstruction

• Structure of Structure of microprocessorsmicroprocessors

Page 81: Advanced Computer Architectures –  HB49  –

1/84

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Virtual machinesVirtual machines

• Computer historyVirtual machines

Page 82: Advanced Computer Architectures –  HB49  –

1/85

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• Reminder: basic structure of a microprocessor

Data path

Controller

Controlsignals

Statussignals

Datainputs

Dataoutputs

Controlinputs

Controloutputs

Programmemory

AddressInstruction

Page 83: Advanced Computer Architectures –  HB49  –

1/86

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• Operation: The controller receives an instruction in binary form

from its program memory 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

In each state, the controller sends control signals to the components of the data path

Page 84: Advanced Computer Architectures –  HB49  –

1/87

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• How powerful do we choose an instruction? The richer the instruction, the more difficult the

controller becomes The poorer the instruction, the more difficult and

tedious the art of programming becomes We hence want a rich programming language at

the same time with having simple instructions

Page 85: Advanced Computer Architectures –  HB49  –

1/88

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• Solution: Multiple layers of virtual machines

• Example Programmer writes in Java, which is considered the

machine language of a very rich virtual machine (the Java Virtual Machine or Java VM)

The Java VM knows how to deal with complex DTs, recursion, functions, loops, …

This is translated in machine language for the physical machine, which could be a RISC with 20 simple instructions

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, …)

Page 86: Advanced Computer Architectures –  HB49  –

1/89

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• Translation: Compilation

Start with source code in high level languageBefore 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 languageThe source in the high level language is not needed at

execution time anymore Interpretation

Start with source code in high level languageDuring 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

Page 87: Advanced Computer Architectures –  HB49  –

1/90

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• The translator itself consists of lower level instructions

• Examples Compilation

Pascal, C, Fortran, Cobol machine languageJava Java byte code

InterpretationBasic machine languageJava byte code machine languagePerl, Python, PHP3 (scripting languages) machine

languagemachine language micro-program instructions (see

next slide)micro-program instructions state transitions

Page 88: Advanced Computer Architectures –  HB49  –

1/92

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

Digital logic: state transitions of next state FSM

Level 0

Micro-programLevel 1

Conventional machine(HEX code)

Level 2

Assembly language(mnemonics, variables, labels)

Level 3

Intermediate machine independent language (JAVA byte code)

Level 4

Application specific language(Java)

Level 5

Interpretation

Interpretation

Interpretation

Compilation

Compilation (assembler)

Page 89: Advanced Computer Architectures –  HB49  –

1/93

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

An exampleAn example

• Ariel: a language to specify Error recovery actions to be executed when some

events occur Example:

when task 10 is found in error restart task 10 wakeup task 11

• This is done outside the user application

Page 90: Advanced Computer Architectures –  HB49  –

1/94

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

An exampleAn example

• Ariel: application specific language (deals with error recovery)

• Error recovery = set of guarded actionsg : a1 … aN ,

g’ : b1 … bN’ ,

...• Refer to nodes, tasks, groups of tasks• Guards: Faulty? Running? Rebooted? Isolated?

Transient?• Actions: Isolate! Start! Reboot! Enable! Send! ...

Page 91: Advanced Computer Architectures –  HB49  –

1/95

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

An example: Ariel: Basic ideasAn example: Ariel: Basic ideas

DBUser applicationRecovery

application

Error

DetectionStore

Recovery startsQuery

Skip/executeactions

Result

Recovery endsOK

Page 92: Advanced Computer Architectures –  HB49  –

1/96

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

An example: Ariel: Basic ideasAn example: Ariel: Basic ideas

• Error recovery is coded in a special language Recovery language

• Recovery language is translated into an intermediate, machine independent code Recovery-code (r-code)

• Management of error recovery: Run-time interpretation of the r-code

Page 93: Advanced Computer Architectures –  HB49  –

1/97

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

An example: an Ariel scriptAn 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

# 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

Page 94: Advanced Computer Architectures –  HB49  –

1/98

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

IF [ PHASE (T{VOTER1}) == {HAS_FAILED} AND PHASE (T2) == {OK} ] THEN STOP T{VOTER1} SEND {WAKEUP} T{SPARE} SEND {VOTER1} T{SPARE} SEND {SPARE} T{VOTER2} SEND {SPARE} T{VOTER3} FI IF [ KILLED N1 ] # if node 1 is down... THEN SEND 1000 T2 # send code "1000" to task 2 FI IF [ KILLED N2 ] # if node 2 is down... THEN SEND 1000 T1 # send code "1000" to task 1 FI

An example: an Ariel scriptAn example: an Ariel script

Page 95: Advanced Computer Architectures –  HB49  –

1/99

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

bash-2.02$ art -s -i .ariel

Ariel translator, v2.0f 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.

Press any key to finish processing...

An example: an Ariel scriptAn example: an Ariel script

Intermediate-level language

Page 96: Advanced Computer Architectures –  HB49  –

1/100

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

An example of An example of intermediate languageintermediate language

Art translated Ariel strategy file: . . . .ariel

into rcode object file : . . . . . . . . . . . .rcode

line rcode opn1 opn2

-------------------------------------------------------------------

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)

Page 97: Advanced Computer Architectures –  HB49  –

1/101

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

An example of An example of intermediate languageintermediate language

line rcode opn1 opn2

-------------------------------------------------------------------

. . . . . . . . . . . .

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

R-code translation of…

IF [ KILLED N2 ] # if node 2 is down...

THEN

SEND 1000 T1 # send code "1000" to task T1

FI

…thisArielfragment

Page 98: Advanced Computer Architectures –  HB49  –

1/102

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

Ariel and r-code: global viewAriel and r-code: global view

Page 99: Advanced Computer Architectures –  HB49  –

1/103

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• Decisions to be taken during computer design Richness of the digital logic

How large is the transistor budgetHow much of the budget do we spend on the

controller as opposed to the data path and the on-chip memories (typically 10%)

Distance between two consecutive virtual machinesLarge distance makes it difficult for a translator to

employ all features offered by the lower level

Page 100: Advanced Computer Architectures –  HB49  –

1/104

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• History of virtual machines before 1950: 2 levels:

digital logicconventional machine

1950: 3 levels:digital logicmicro-programconventional machine

1952: 4 levelsdigital logicmicro-programconventional machineassembly language

Page 101: Advanced Computer Architectures –  HB49  –

1/105

© V. De FlorioKULeuven 2002

BasicConcepts

ComputerDesign

ComputerArchitecturesIn Practice

ComputerArchitecturesFor AI

The concept of virtual machinesThe concept of virtual machines

• History of virtual machines 1955: 5 levels

digital logicmicro-programconventional machineassembly languageapplication specific language

1965 ?: 6 levelsdigital logicmicro-programconventional machineassembly languageintermediate machine independent languageapplication specific language