SlideShare a Scribd company logo
History of Computing http://www.vigneras.name/pierre Dr. Pierre Vignéras  This work is licensed under a Creative Commons Attribution-Share Alike 2.0 France. See http://creativecommons.org/licenses/by-sa/2.0/fr/   for details
Text Books Books Reference Book: New Perspectives On Computer Concepts Parsons and Oja National Book Foundation The Web:  http://wikipedia.org C- How to program (Third Edition) Introduction C++ and Java Deitel & Deitel Prentice Hall
No entry after the first 10 minutes
No exit before the end of the class
Unannounced Quiz Weekly, at the beginning of a class
Fixed timing (you may suffer if you arrive late)
Spread Out (do it quickly to save your time)
Papers that are not strictly  in front of you  will be considered as done
Cheaters will get '-1' mark
Your head should be in front of your paper! Class, Quiz & Exam Rules Rules
Grading Policy Quiz: 20 %
Mid: 30 %
Final: 50 %
A final average below 50/100 will be assigned a failed mark: F. Grading Policy
Outline (Important points) Basics Numeral basis
Bits & Bytes
computer components Hardware History Von Neumann Architecture
Moore's Law
Theory History Godel Theorem
Turing Machine, Lambda Calculus & Boolean Algebra
Algorithms (pseudo-code, flowcharts)
Computability and Complexity Theory Language History Compilation vs Interpretation
Type System
Type checking (static vs dynamic, weak vs strong) Outline (Important points)
Operating System History Definitions & Compositions
Eras (Unix, Apple, IBM PC, Mac, Windows)
Open Source (GNU, Linux) Network History Internet, Web, Search Engine
Network Layers (OSI, TCP/IP)
Network Topology Outline (Important points)
Outline
Computer: definition (http://en.wikipedia.org/wiki/Computer) Origin Person who performed numerical calculations, often with the aid of a mechanical calculating device Today Machine for manipulating  data  according to a  list of instructions  known as a  program . Various sort Supercomputer, Mainframe, Servers
Personal Computers, Laptop
PDA, Cellular Phones, Smart cards I. Basics
Vocabulary (http://en.wikipedia.org/wiki/Digital http://en.wikipedia.org/wiki/Bit) Digital = discrete Comes from digits (Latin origin = fingers) Analogue  = continuous (real life)
Bit = 1 binary digit  Can have either the value 1 or 0
Used to represent (almost) everything
Physical representation:  1 == electricity is present
0 == no electricity  A byte is a collection of 8 bits Unit for storage capacity I. Basics
Numeral Bases I. Basics
Personal Computer Architecture Screen
Motherboard
Processor (CPU)
Memory (RAM)
Extension Cards
Power Supply
Optical disk drive (CD/DVD)
Hard Disk Drive (HDD)
Keyboard
Mouse I. Basics
Memory (http://en.wikipedia.org/wiki/Random_Access_Memory) Random Access Memory (Main memory) Erased when computer is shut down
A list of cells Each cell is assigned an address (a number) and can store a fixed amount of informations (8, 16, 32 or 64 bits) Memory can contains instructions or data The cell addressed  #1234  contains “0101”
“0101” may means:  the number 5 in decimal,
the character 'F',
the instruction: “increase the value of the next cell by one”
The first and third “property” are TRUE, others are FALSE,
Anything else... I. Basics
Central Processing Unit  (Processor) (http://en.wikipedia.org/wiki/CPU) Reads instructions from the memory, executes them and writes the result in the memory Operations possible addition, subtraction, multiplication, division
comparisons, string manipulations, ... Driven by a  timer  Frequency = Number of ticks (cycle) per second
Performance = Instructions Per Cycle * Frequency AMD Athlon XP ~ 2.5 IPC
Intel PIV  ~ 2 IPC
At same clock speed, AMD Athlon performs better than Intel PIV Connected with other devices by several bus I. Basics
Input/Output Devices Hard drives Store permanently data Programs and data (documents) Network cards (Ethernet card) Used to connect several computers CD/DVD drives Read-only storage devices (music, video, data) Video Card (3D specialized hardware) Driven by the CPU to transmit data on screen(s)
Contains a Graphic processor (GPU)
Needs its own memory I. Basics
The 2006 market CPUs (future trends is multi-core) Intel: PIV (~ 3.8 GHz), Core Duo (~ 2 GHz)
AMD: Athlon 64, Opteron (~ 2 Ghz) Memory: [512 – 1512] MB
Hard Drives: [60 – 800 ] GB
Network Cards:  Ethernet: 1 Gb/s
Wireless (Wi-Fi): ~ 54 Mb/s Video Cards: ~ 256 MB, 400 MHz
Screens:  CRT 17' & 19'; TFT 15' & 17' (trend) I. Basics
Internet (http://en.wikipedia.org/wiki/Internet) Worldwide, publicly accessible network of  interconnected computer networks  that transmit data using the IP protocol (language)
World Wide Web (WWW): collection of interconnected documents, linked by  Hyperlinks  and URLs
accessible via the Internet, as are many other services
www != Internet
You need a  client application  (called a web browser) URL: protocol://address[:port]/ressource http://images.google.com/preferences  (www)
fish://192.168.1.1/documents (SSH) I. Basics
Searching on the web Search Engines Google: http:// www.google.pk
Yahoo:  http://www.yahoo.com How does it work? During the night, a  robot  scans the web and indexes web pages making pairs [word, {URLs}]
When you enter a keyword, the search engine look in its table for a matching [word, {URLs}]
It then present the set of {URLs} Internet does not provide true informations Anyone can write what he wants! I. Basics
E-Mail Works over the Internet like the normal (slow) mail system (also called snail)
You need a  client application  Can be a web browser (webmail)
Can be a dedicated mail reader You should follow the netiquette (Internet Etiquette) Catch-all term for the conventions of politeness
See:   http://tools.ietf.org/html/rfc1855  - RFC1855 (standard)   http://www.penmachine.com/techie/emailtrouble_2003-07.html  (short)  I. Basics
Outline
Parallel Worlds Theory Models
Languages
Complexity
Computability
Cryptography Engineering Hardware Processors, Hard drives, Memory, ... Software Design, Operating Systems, Project Management, ... Edsger Dijkstra: " Computer science is no more about computers than astronomy is about telescopes.” Using a computer does not make one a computer scientist! II. History
http://www.eingang.org/Lecture/ II. History
Counting From the very beginning, men started off by counting on their digits for various reasons Sharing food items fairly
Religion & ceremonies according to time
etc. Many possibilities (base):  10, 16, 12, 6, ...
Some attempts to create counting machines  Help counting up to big numbers
Abacus (China), Pascaline (Blaise Pascal, 1642), The Difference Engine (Charles Babbage, 1812) II. History/Hardware
Cards 1890: Herman Hollerith presents Punched Cards & Tabulating Machine
For U.S. Census Bureau
Used until the highly controversial United States presidential election of 2000
Tabulating Machine is a great success: creation of IBM by Herman Hollerith Limited to tabulation II. History/Hardware
Cards (http://en.wikipedia.org/wiki/Punch_card) II. History/Hardware
Cards (http://en.wikipedia.org/wiki/Punch_card) II. History/Hardware
Binary Representation In 1941, Konrad Zuse creates the Z3
Uses binary system II. History/Hardware
Engineering Improvements Mark I (IBM, 1930-1959) Fully automatic  machine
Four operations on 23 decimals numbers
Subroutines (logarithm & trigonometric functions)
3 to 5 seconds per multiplication
In use at Harvard until 1959 ENIAC (Mauchly and Eckert, 1946-1955) 10 decimal-digits words
“Wire your own“ instruction technique II. History/Hardware
John Von Neumann (http://en.wikipedia.org/wiki/Von_Neumann_Architecture) Data and Program can be stored in the same space The machine itself can alter either its program or its internal data Conditional goto's to other point in the code
Often used subroutines can be stored in memory
First machine appears in 1947 (EDVAC & UNIVAC) Still the overall architecture of computers today! II. History/Hardware
Von Neumann Architecture II. History/Hardware
Major engineering advances Transistors (Shockley, Bardeen, Walter; 1947) Freedom from vacuum tubes, which were extremely bulky Integrated Circuits (Kilby, 1959) Aka “chip”
collection of tiny transistors which are connected together
only connections were needed to other electronic components Machines becomes smaller and more economical to build and maintain. II. History/Hardware
Moore's Law (http://en.wikipedia.org/wiki/Moore's_law) 1965: Moore, a co-founder of Intel. The complexity of integrated circuits doubles every 24 months
Quoted as “[...] doubles every  18 months ”! Empirical Observations and prediction goal for an entire industry. Moore's law means an average performance improvement in the industry as a whole of over 1% a week. A new product that is expected to take three years to develop and is just two or three months late is 10 to 15% slower, bulkier, or lower in storage capacity! II. History/Hardware
Moore's law II. History/Hardware
Moore's Law effect II. History/Hardware
Moore's Law limitation 2006 state of the art IBM published a paper for a 30 nm technology April 2005 Gordon Moore stated in an interview that the law may not hold valid for too long, since transistors may reach the limits of miniaturization at atomic levels 2003: Kurzweil conjecture Moore's Law of Integrated Circuits was not the first, but the fifth paradigm to provide accelerating price-performance.
New type of technology will replace current integrated-circuit technology, and that Moore's Law will hold true long after 2020.  II. History/Hardware
General Moore's Law II. History/Hardware
2006 Trends (http://en.wikipedia.org/wiki/Multicore_CPU) Major misunderstanding: Performance is not equivalent to clock speed !
Moore's law is not about doubling performance anyway! Doubling the number of transistors: Put two CPUs on the same silicon die: dual-core The future is multi-core systems Intel, AMD, IBM, Sun are focusing on this
No need for a new CPU design: less risk Major issue at the software level How to deal with concurrency?
II. History
The Godel Theorem (1931) (http://en.wikipedia.org/wiki/Gödel's_incompleteness_theorems) In some cases, it is possible to prove something and its contrary (inconsistency).
Some mathematical truth are impossible to prove (incompleteness) Idea: “Any French is a  lier  has said by a French”
Sketch of the proof:  suppose a program 'P' can tell if a proposition is TRUE or FALSE without error.
Proposition: “The program 'P' does not reply TRUE to this proposition”. Can the program reply TRUE or FALSE? Neither!
And what about us? Is the proposition TRUE? Yes! II. History/Theory
Alan Turing Machine (1936) (http://en.wikipedia.org/wiki/Turing_machine) Infinite tape (divided into adjacent cells) Each cell contains a symbol from some finite alphabet: {a, ..., z}; {0,...,9}; {0,1} Head read/write symbols
move the tape left and right one cell at a time. Table of instructions that tells the machine: what symbol to write
how to move the head
what its new state will be State register that stores the (finite) state of the table.  One special start state  II. History/Theory
Turing Machine  (Abbrev: TM) (http://en.wikipedia.org/wiki/Turing_machine) II. History/Theory
Alan Turing Machine (1936) (http://en.wikipedia.org/wiki/Turing_machine) Stone (1972): fully description requires The alphabet
The input form in which the parameters are presented on the tape
The output form in which answers will be represented on the tape when the Turing machine halts
The initial state of the Turing machine
The machine program II. History/Theory
Turing Machine (http://en.wikipedia.org/wiki/Turing_machine) Example: increment function: inc(x)=x+1 Tape alphabet: {0,1}
Input: A number in base one enclosed by zero 0 10 :0...0 1 0...0  1 10 :0...0 1 10...0 4 10 :0...0 1 11guatda.com/cmx.p110...0 10 10 :0...0 1 11111111guatda.com/cmx.p110...0
Output: written in place of the input (same form) 1,>> 0,1 0,>> 1,<< Starting points Starting state II. History/Theory
Turing Machines Turing Machines can be composed to create more complex ones.
Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<<
Turing Machines Turing Machines can be composed to create more complex ones.
Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<< Only one  initial state! Only one  terminal state! Only one  initial state!
Turing Machines Turing Machines can be composed to create more complex ones.
Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<< Relabel states Make the new  link
Turing Machines and Algorithms A Turing Machine describes a  “mechanical procedure”   Sort of  recipe
Each step is  simple  and  well defined  so it can be followed by any human using a paper and a pencil Very complex procedures can be described using Turing machines Addition, multiplication, ... (anything?) A Turing machine provides an easy to understand abstraction of how computers (humans or machines) are actually working
Turing Machines are the actual formalisation of what is called  algorithms II. History/Theory
Algorithms (http://en.wikipedia.org/wiki/Algorithm) From the famous Arab scientist Al-khwarizmi Solving problems in an ordered step-by-step sequence An algorithm is a  finite set   of   well-defined instructions  for accomplishing some task which,  given an initial state , will  terminate in a defined end-state . Order of computation is usually critical to the functioning of the algorithm.
Instructions are usually listed explicitly starting 'from the top' and going 'down to the bottom': this is what is formally called the  flow of control . II. History/Theory
Algorithm Representations A Turing Machine is  one representation  of an algorithm
Other representations include: Natural language (too verbose and ambiguous)
pseudo code (no standard) derived from programming languages flowcharts  (too verbose) schematic representation of a process
derived from Turing Machines representation programming languages (too detailed) So which one to choose? It depends! All of them but for different situations II. History/Theory
Algorithm Example: largest number Natural Language Input: an unsorted list of numbers
Output: the index (rank) of the largest number in the list Assume the first item is largest.
Look at each of the remaining items in the list and if it is larger than the largest item so far, make a note of its rank.
The last noted rank is the one of the largest element in the list when the process is complete. Complexity: requires N comparisons where N is the size of the list II. History/Theory
max  =  0 for  ( all  i  such that  0<i<|L|)  { if  ( L max < L i ) max  =  i } PRINT  L m ax   Loop Condition Assignment Output Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory Made of statements
Four basic constructions:  assignements,
conditions
Loops
input/output An  expression  is something  that evaluate to a value
3 + 4 * 2 is an expression
PRINT “Hello” is not.
max  =  0 for  ( all  i  such that  0<i<|L|)  { if  ( L max < L i ) max  =  i } PRINT  L m ax   Loop Condition Assignment Output Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory Assignment :   left_value  =  right_value left_value  represents the content of a RAM cell '=' means: “ store  the value of the  expression  right_value  in  left_value ” Not a 'true statement' neither an equation to solve!!
Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max  =  0 for  ( all  i  such that  0<i<|L|)  { if  ( L max < L i ) max  =  i } PRINT  L m ax   Loop Condition Assignment Output II. History/Theory Condition : two forms If   (boolean expression)   expression_if_true If  (boolean expression)  { expression_if_true }else{ expression_if_false }
Boolean Algebra (http://en.wikipedia.org/wiki/Boolean_algebra) Name in  honour  of George Boole (1825-1864)
Inventor of the Boolean Algebra Consider a set A, supplied with two binary operations  ∧  (called AND),  ∨  (called OR), a unary operation  ¬  (called NOT) and two elements 0 (called zero) and 1 (called one), such that, for all elements a, b and c of set A, the following axioms hold: II. History/Theory a ∨ (b ∨ c) = (a ∨ b) ∨ c   associativity  a ∧ (b ∧ c)  = (a ∧ b) ∧ c a ∨ b    = b ∨ a   commutativity a ∧ b  = b ∧ a  a ∨ (a ∧ b) = a   absorption a ∧ (a ∨ b)  = a a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)   distributivity a ∧ (b ∨ c)  = (a ∧ b) ∨ (a ∧ c) a ∨¬ a    = 1   complements a ∧¬ a    = 0
Boolean Algebra and Logic From that axioms, one can prove some theorem such as: a  ∨  0 = a;  a  ∧  1 = a; a  ∨  1 = 1; a  ∧  0 = 0
Interpretation: 0 means “FALSE”, 1 means “TRUE”
A statement 'a' and its contrary cannot both be true:  a ∧¬ a = 0 Truth values can be represented as binary numbers or as voltage levels in logic circuits many practical applications in electrical engineering and CS, as well as in  maths  logic. II. History/Theory
Boolean Expressions In computer science, a boolean expression evaluates only to either TRUE or FALSE  Representation of truth values may differ from one language to another C: FALSE = 0, TRUE =  ! FALSE
Java: TRUE= true , FALSE= false
LISP: FALSE= '(), TRUE= NOT FALSE, ... A boolean expression can be almost anything... II. History/Theory 3>5 2<3 1 ≤ 1 F T T 1 ≤ 1  AND 2<3 2<3 OR 3>5 NOT 1 ≤ 1 T T F “bye”  ==  “boa” “by” < “bye” NOT “by” F T ? Symbol for  comparison in C Symbol for  NOT in C
Boolean Operators Table II. History/Theory
Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory PRINT “Hello” If (person has a PhD) PRINT “Dr.” PRINT name PRINT “Hello” If (person is a male) { PRINT “Mr.” }else{ PRINT “Mrs.” } PRINT name Execution for Dr.Pierre: “Hello Dr. Pierre” Execution for Mrs. Bhutto “Hello Mrs. Bhutto” Indentation and  brackets are  very   important!
Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max  =  0 for  ( all  i  such that  0<i<|L|)  { if  ( L max < L i ) max  =  i } PRINT   m ax  Loop Condition Assignment Output II. History/Theory Loop : many forms For   (variable in “a  finite  set of values”)  expression While  (boolean expression) expression Do  {  expression  }  while  (boolean expression)  In all forms, you have a  stop condition

More Related Content

PDF
File000173
PPTX
Computer fundamentals
PDF
File000129
PPTX
Introduction to computer system
PPT
Evidence Seizure Level One
PDF
File000127
PDF
File000122
File000173
Computer fundamentals
File000129
Introduction to computer system
Evidence Seizure Level One
File000127
File000122

What's hot (11)

DOCX
ACM, Real world everyday applications of computer science. History of Comp...
PDF
Ch2 pc-components-features-and-system-design
PPT
Evidence Seizure Ctin Version Draft
PPT
Lecture two_january_2012
PDF
Arduino - A simple Introduction
PDF
Taking the hard out of hardware
PPTX
DOC
Important keyword to remember
PPT
Computing - Week 1 - Introduction
PPT
Comp wk 1 - introduction
PPT
Chapter 6 effects of ict on society
ACM, Real world everyday applications of computer science. History of Comp...
Ch2 pc-components-features-and-system-design
Evidence Seizure Ctin Version Draft
Lecture two_january_2012
Arduino - A simple Introduction
Taking the hard out of hardware
Important keyword to remember
Computing - Week 1 - Introduction
Comp wk 1 - introduction
Chapter 6 effects of ict on society
Ad

Similar to History of Computing (20)

PPT
PCT Slide1
PPT
Week 1- Introduction to computer fundamental .ppt
PPT
Ch 1 introduction and 2 computer software 1
PPT
Lecture 1
PPTX
copa-i.pptx
PPTX
Architecture presentation
PPTX
Computer summary
PDF
Examples of Planning for Computing in the Primary Sector.pdf
PPTX
ComputerAppBasics MBA students for notes
PPT
Unit 1 one part introduction to computers
PPTX
ICT math 2024 SSC and HSC students of BD
DOCX
Comparison between computers of past and present
PPT
Unit I Foc
PDF
Basic course
PPT
INTRODUCTION TO COMPUTER SYSTEMS ARCHITECTURE1_17 December 2023.ppt
PPT
1 ch Information SecuirtyLectures (112.ppt
PPT
125252.ppt
PDF
Presentation on Computer Basics and architecture.pdf
PPT
Fundamentals of computer system and Programming EC-105
PCT Slide1
Week 1- Introduction to computer fundamental .ppt
Ch 1 introduction and 2 computer software 1
Lecture 1
copa-i.pptx
Architecture presentation
Computer summary
Examples of Planning for Computing in the Primary Sector.pdf
ComputerAppBasics MBA students for notes
Unit 1 one part introduction to computers
ICT math 2024 SSC and HSC students of BD
Comparison between computers of past and present
Unit I Foc
Basic course
INTRODUCTION TO COMPUTER SYSTEMS ARCHITECTURE1_17 December 2023.ppt
1 ch Information SecuirtyLectures (112.ppt
125252.ppt
Presentation on Computer Basics and architecture.pdf
Fundamentals of computer system and Programming EC-105
Ad

Recently uploaded (20)

PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Presentation on HIE in infants and its manifestations
PPTX
Cell Structure & Organelles in detailed.
PPTX
Lesson notes of climatology university.
PPTX
Institutional Correction lecture only . . .
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Final Presentation General Medicine 03-08-2024.pptx
Presentation on HIE in infants and its manifestations
Cell Structure & Organelles in detailed.
Lesson notes of climatology university.
Institutional Correction lecture only . . .
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
VCE English Exam - Section C Student Revision Booklet
O5-L3 Freight Transport Ops (International) V1.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Module 4: Burden of Disease Tutorial Slides S2 2025
Anesthesia in Laparoscopic Surgery in India
human mycosis Human fungal infections are called human mycosis..pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
GDM (1) (1).pptx small presentation for students
Chinmaya Tiranga quiz Grand Finale.pdf
Complications of Minimal Access Surgery at WLH

History of Computing

  • 1. History of Computing http://www.vigneras.name/pierre Dr. Pierre Vignéras This work is licensed under a Creative Commons Attribution-Share Alike 2.0 France. See http://creativecommons.org/licenses/by-sa/2.0/fr/ for details
  • 2. Text Books Books Reference Book: New Perspectives On Computer Concepts Parsons and Oja National Book Foundation The Web: http://wikipedia.org C- How to program (Third Edition) Introduction C++ and Java Deitel & Deitel Prentice Hall
  • 3. No entry after the first 10 minutes
  • 4. No exit before the end of the class
  • 5. Unannounced Quiz Weekly, at the beginning of a class
  • 6. Fixed timing (you may suffer if you arrive late)
  • 7. Spread Out (do it quickly to save your time)
  • 8. Papers that are not strictly in front of you will be considered as done
  • 9. Cheaters will get '-1' mark
  • 10. Your head should be in front of your paper! Class, Quiz & Exam Rules Rules
  • 14. A final average below 50/100 will be assigned a failed mark: F. Grading Policy
  • 15. Outline (Important points) Basics Numeral basis
  • 17. computer components Hardware History Von Neumann Architecture
  • 20. Turing Machine, Lambda Calculus & Boolean Algebra
  • 22. Computability and Complexity Theory Language History Compilation vs Interpretation
  • 24. Type checking (static vs dynamic, weak vs strong) Outline (Important points)
  • 25. Operating System History Definitions & Compositions
  • 26. Eras (Unix, Apple, IBM PC, Mac, Windows)
  • 27. Open Source (GNU, Linux) Network History Internet, Web, Search Engine
  • 29. Network Topology Outline (Important points)
  • 31. Computer: definition (http://en.wikipedia.org/wiki/Computer) Origin Person who performed numerical calculations, often with the aid of a mechanical calculating device Today Machine for manipulating data according to a list of instructions known as a program . Various sort Supercomputer, Mainframe, Servers
  • 33. PDA, Cellular Phones, Smart cards I. Basics
  • 34. Vocabulary (http://en.wikipedia.org/wiki/Digital http://en.wikipedia.org/wiki/Bit) Digital = discrete Comes from digits (Latin origin = fingers) Analogue = continuous (real life)
  • 35. Bit = 1 binary digit Can have either the value 1 or 0
  • 36. Used to represent (almost) everything
  • 37. Physical representation: 1 == electricity is present
  • 38. 0 == no electricity A byte is a collection of 8 bits Unit for storage capacity I. Basics
  • 46. Optical disk drive (CD/DVD)
  • 50. Memory (http://en.wikipedia.org/wiki/Random_Access_Memory) Random Access Memory (Main memory) Erased when computer is shut down
  • 51. A list of cells Each cell is assigned an address (a number) and can store a fixed amount of informations (8, 16, 32 or 64 bits) Memory can contains instructions or data The cell addressed #1234 contains “0101”
  • 52. “0101” may means: the number 5 in decimal,
  • 54. the instruction: “increase the value of the next cell by one”
  • 55. The first and third “property” are TRUE, others are FALSE,
  • 57. Central Processing Unit (Processor) (http://en.wikipedia.org/wiki/CPU) Reads instructions from the memory, executes them and writes the result in the memory Operations possible addition, subtraction, multiplication, division
  • 58. comparisons, string manipulations, ... Driven by a timer Frequency = Number of ticks (cycle) per second
  • 59. Performance = Instructions Per Cycle * Frequency AMD Athlon XP ~ 2.5 IPC
  • 60. Intel PIV ~ 2 IPC
  • 61. At same clock speed, AMD Athlon performs better than Intel PIV Connected with other devices by several bus I. Basics
  • 62. Input/Output Devices Hard drives Store permanently data Programs and data (documents) Network cards (Ethernet card) Used to connect several computers CD/DVD drives Read-only storage devices (music, video, data) Video Card (3D specialized hardware) Driven by the CPU to transmit data on screen(s)
  • 63. Contains a Graphic processor (GPU)
  • 64. Needs its own memory I. Basics
  • 65. The 2006 market CPUs (future trends is multi-core) Intel: PIV (~ 3.8 GHz), Core Duo (~ 2 GHz)
  • 66. AMD: Athlon 64, Opteron (~ 2 Ghz) Memory: [512 – 1512] MB
  • 67. Hard Drives: [60 – 800 ] GB
  • 68. Network Cards: Ethernet: 1 Gb/s
  • 69. Wireless (Wi-Fi): ~ 54 Mb/s Video Cards: ~ 256 MB, 400 MHz
  • 70. Screens: CRT 17' & 19'; TFT 15' & 17' (trend) I. Basics
  • 71. Internet (http://en.wikipedia.org/wiki/Internet) Worldwide, publicly accessible network of interconnected computer networks that transmit data using the IP protocol (language)
  • 72. World Wide Web (WWW): collection of interconnected documents, linked by Hyperlinks and URLs
  • 73. accessible via the Internet, as are many other services
  • 75. You need a client application (called a web browser) URL: protocol://address[:port]/ressource http://images.google.com/preferences (www)
  • 77. Searching on the web Search Engines Google: http:// www.google.pk
  • 78. Yahoo: http://www.yahoo.com How does it work? During the night, a robot scans the web and indexes web pages making pairs [word, {URLs}]
  • 79. When you enter a keyword, the search engine look in its table for a matching [word, {URLs}]
  • 80. It then present the set of {URLs} Internet does not provide true informations Anyone can write what he wants! I. Basics
  • 81. E-Mail Works over the Internet like the normal (slow) mail system (also called snail)
  • 82. You need a client application Can be a web browser (webmail)
  • 83. Can be a dedicated mail reader You should follow the netiquette (Internet Etiquette) Catch-all term for the conventions of politeness
  • 84. See: http://tools.ietf.org/html/rfc1855 - RFC1855 (standard) http://www.penmachine.com/techie/emailtrouble_2003-07.html (short) I. Basics
  • 90. Cryptography Engineering Hardware Processors, Hard drives, Memory, ... Software Design, Operating Systems, Project Management, ... Edsger Dijkstra: &quot; Computer science is no more about computers than astronomy is about telescopes.” Using a computer does not make one a computer scientist! II. History
  • 92. Counting From the very beginning, men started off by counting on their digits for various reasons Sharing food items fairly
  • 93. Religion & ceremonies according to time
  • 94. etc. Many possibilities (base): 10, 16, 12, 6, ...
  • 95. Some attempts to create counting machines Help counting up to big numbers
  • 96. Abacus (China), Pascaline (Blaise Pascal, 1642), The Difference Engine (Charles Babbage, 1812) II. History/Hardware
  • 97. Cards 1890: Herman Hollerith presents Punched Cards & Tabulating Machine
  • 98. For U.S. Census Bureau
  • 99. Used until the highly controversial United States presidential election of 2000
  • 100. Tabulating Machine is a great success: creation of IBM by Herman Hollerith Limited to tabulation II. History/Hardware
  • 103. Binary Representation In 1941, Konrad Zuse creates the Z3
  • 104. Uses binary system II. History/Hardware
  • 105. Engineering Improvements Mark I (IBM, 1930-1959) Fully automatic machine
  • 106. Four operations on 23 decimals numbers
  • 107. Subroutines (logarithm & trigonometric functions)
  • 108. 3 to 5 seconds per multiplication
  • 109. In use at Harvard until 1959 ENIAC (Mauchly and Eckert, 1946-1955) 10 decimal-digits words
  • 110. “Wire your own“ instruction technique II. History/Hardware
  • 111. John Von Neumann (http://en.wikipedia.org/wiki/Von_Neumann_Architecture) Data and Program can be stored in the same space The machine itself can alter either its program or its internal data Conditional goto's to other point in the code
  • 112. Often used subroutines can be stored in memory
  • 113. First machine appears in 1947 (EDVAC & UNIVAC) Still the overall architecture of computers today! II. History/Hardware
  • 114. Von Neumann Architecture II. History/Hardware
  • 115. Major engineering advances Transistors (Shockley, Bardeen, Walter; 1947) Freedom from vacuum tubes, which were extremely bulky Integrated Circuits (Kilby, 1959) Aka “chip”
  • 116. collection of tiny transistors which are connected together
  • 117. only connections were needed to other electronic components Machines becomes smaller and more economical to build and maintain. II. History/Hardware
  • 118. Moore's Law (http://en.wikipedia.org/wiki/Moore's_law) 1965: Moore, a co-founder of Intel. The complexity of integrated circuits doubles every 24 months
  • 119. Quoted as “[...] doubles every 18 months ”! Empirical Observations and prediction goal for an entire industry. Moore's law means an average performance improvement in the industry as a whole of over 1% a week. A new product that is expected to take three years to develop and is just two or three months late is 10 to 15% slower, bulkier, or lower in storage capacity! II. History/Hardware
  • 120. Moore's law II. History/Hardware
  • 121. Moore's Law effect II. History/Hardware
  • 122. Moore's Law limitation 2006 state of the art IBM published a paper for a 30 nm technology April 2005 Gordon Moore stated in an interview that the law may not hold valid for too long, since transistors may reach the limits of miniaturization at atomic levels 2003: Kurzweil conjecture Moore's Law of Integrated Circuits was not the first, but the fifth paradigm to provide accelerating price-performance.
  • 123. New type of technology will replace current integrated-circuit technology, and that Moore's Law will hold true long after 2020. II. History/Hardware
  • 124. General Moore's Law II. History/Hardware
  • 125. 2006 Trends (http://en.wikipedia.org/wiki/Multicore_CPU) Major misunderstanding: Performance is not equivalent to clock speed !
  • 126. Moore's law is not about doubling performance anyway! Doubling the number of transistors: Put two CPUs on the same silicon die: dual-core The future is multi-core systems Intel, AMD, IBM, Sun are focusing on this
  • 127. No need for a new CPU design: less risk Major issue at the software level How to deal with concurrency?
  • 129. The Godel Theorem (1931) (http://en.wikipedia.org/wiki/Gödel's_incompleteness_theorems) In some cases, it is possible to prove something and its contrary (inconsistency).
  • 130. Some mathematical truth are impossible to prove (incompleteness) Idea: “Any French is a lier has said by a French”
  • 131. Sketch of the proof: suppose a program 'P' can tell if a proposition is TRUE or FALSE without error.
  • 132. Proposition: “The program 'P' does not reply TRUE to this proposition”. Can the program reply TRUE or FALSE? Neither!
  • 133. And what about us? Is the proposition TRUE? Yes! II. History/Theory
  • 134. Alan Turing Machine (1936) (http://en.wikipedia.org/wiki/Turing_machine) Infinite tape (divided into adjacent cells) Each cell contains a symbol from some finite alphabet: {a, ..., z}; {0,...,9}; {0,1} Head read/write symbols
  • 135. move the tape left and right one cell at a time. Table of instructions that tells the machine: what symbol to write
  • 136. how to move the head
  • 137. what its new state will be State register that stores the (finite) state of the table. One special start state II. History/Theory
  • 138. Turing Machine (Abbrev: TM) (http://en.wikipedia.org/wiki/Turing_machine) II. History/Theory
  • 139. Alan Turing Machine (1936) (http://en.wikipedia.org/wiki/Turing_machine) Stone (1972): fully description requires The alphabet
  • 140. The input form in which the parameters are presented on the tape
  • 141. The output form in which answers will be represented on the tape when the Turing machine halts
  • 142. The initial state of the Turing machine
  • 143. The machine program II. History/Theory
  • 144. Turing Machine (http://en.wikipedia.org/wiki/Turing_machine) Example: increment function: inc(x)=x+1 Tape alphabet: {0,1}
  • 145. Input: A number in base one enclosed by zero 0 10 :0...0 1 0...0 1 10 :0...0 1 10...0 4 10 :0...0 1 11guatda.com/cmx.p110...0 10 10 :0...0 1 11111111guatda.com/cmx.p110...0
  • 146. Output: written in place of the input (same form) 1,>> 0,1 0,>> 1,<< Starting points Starting state II. History/Theory
  • 147. Turing Machines Turing Machines can be composed to create more complex ones.
  • 148. Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<<
  • 149. Turing Machines Turing Machines can be composed to create more complex ones.
  • 150. Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<< Only one initial state! Only one terminal state! Only one initial state!
  • 151. Turing Machines Turing Machines can be composed to create more complex ones.
  • 152. Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<< Relabel states Make the new link
  • 153. Turing Machines and Algorithms A Turing Machine describes a “mechanical procedure” Sort of recipe
  • 154. Each step is simple and well defined so it can be followed by any human using a paper and a pencil Very complex procedures can be described using Turing machines Addition, multiplication, ... (anything?) A Turing machine provides an easy to understand abstraction of how computers (humans or machines) are actually working
  • 155. Turing Machines are the actual formalisation of what is called algorithms II. History/Theory
  • 156. Algorithms (http://en.wikipedia.org/wiki/Algorithm) From the famous Arab scientist Al-khwarizmi Solving problems in an ordered step-by-step sequence An algorithm is a finite set of well-defined instructions for accomplishing some task which, given an initial state , will terminate in a defined end-state . Order of computation is usually critical to the functioning of the algorithm.
  • 157. Instructions are usually listed explicitly starting 'from the top' and going 'down to the bottom': this is what is formally called the flow of control . II. History/Theory
  • 158. Algorithm Representations A Turing Machine is one representation of an algorithm
  • 159. Other representations include: Natural language (too verbose and ambiguous)
  • 160. pseudo code (no standard) derived from programming languages flowcharts (too verbose) schematic representation of a process
  • 161. derived from Turing Machines representation programming languages (too detailed) So which one to choose? It depends! All of them but for different situations II. History/Theory
  • 162. Algorithm Example: largest number Natural Language Input: an unsorted list of numbers
  • 163. Output: the index (rank) of the largest number in the list Assume the first item is largest.
  • 164. Look at each of the remaining items in the list and if it is larger than the largest item so far, make a note of its rank.
  • 165. The last noted rank is the one of the largest element in the list when the process is complete. Complexity: requires N comparisons where N is the size of the list II. History/Theory
  • 166. max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT L m ax Loop Condition Assignment Output Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory Made of statements
  • 167. Four basic constructions: assignements,
  • 169. Loops
  • 170. input/output An expression is something that evaluate to a value
  • 171. 3 + 4 * 2 is an expression
  • 173. max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT L m ax Loop Condition Assignment Output Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory Assignment : left_value = right_value left_value represents the content of a RAM cell '=' means: “ store the value of the expression right_value in left_value ” Not a 'true statement' neither an equation to solve!!
  • 174. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT L m ax Loop Condition Assignment Output II. History/Theory Condition : two forms If (boolean expression) expression_if_true If (boolean expression) { expression_if_true }else{ expression_if_false }
  • 176. Inventor of the Boolean Algebra Consider a set A, supplied with two binary operations ∧ (called AND), ∨ (called OR), a unary operation ¬ (called NOT) and two elements 0 (called zero) and 1 (called one), such that, for all elements a, b and c of set A, the following axioms hold: II. History/Theory a ∨ (b ∨ c) = (a ∨ b) ∨ c associativity a ∧ (b ∧ c) = (a ∧ b) ∧ c a ∨ b = b ∨ a commutativity a ∧ b = b ∧ a a ∨ (a ∧ b) = a absorption a ∧ (a ∨ b) = a a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) distributivity a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) a ∨¬ a = 1 complements a ∧¬ a = 0
  • 177. Boolean Algebra and Logic From that axioms, one can prove some theorem such as: a ∨ 0 = a; a ∧ 1 = a; a ∨ 1 = 1; a ∧ 0 = 0
  • 178. Interpretation: 0 means “FALSE”, 1 means “TRUE”
  • 179. A statement 'a' and its contrary cannot both be true: a ∧¬ a = 0 Truth values can be represented as binary numbers or as voltage levels in logic circuits many practical applications in electrical engineering and CS, as well as in maths logic. II. History/Theory
  • 180. Boolean Expressions In computer science, a boolean expression evaluates only to either TRUE or FALSE Representation of truth values may differ from one language to another C: FALSE = 0, TRUE = ! FALSE
  • 181. Java: TRUE= true , FALSE= false
  • 182. LISP: FALSE= '(), TRUE= NOT FALSE, ... A boolean expression can be almost anything... II. History/Theory 3>5 2<3 1 ≤ 1 F T T 1 ≤ 1 AND 2<3 2<3 OR 3>5 NOT 1 ≤ 1 T T F “bye” == “boa” “by” < “bye” NOT “by” F T ? Symbol for comparison in C Symbol for NOT in C
  • 183. Boolean Operators Table II. History/Theory
  • 184. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory PRINT “Hello” If (person has a PhD) PRINT “Dr.” PRINT name PRINT “Hello” If (person is a male) { PRINT “Mr.” }else{ PRINT “Mrs.” } PRINT name Execution for Dr.Pierre: “Hello Dr. Pierre” Execution for Mrs. Bhutto “Hello Mrs. Bhutto” Indentation and brackets are very important!
  • 185. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT m ax Loop Condition Assignment Output II. History/Theory Loop : many forms For (variable in “a finite set of values”) expression While (boolean expression) expression Do { expression } while (boolean expression) In all forms, you have a stop condition
  • 186. Count-controlled loop (http://en.wikipedia.org/wiki/Control_flow) The loop is repeated a given number of times Called the “for-loop” in C language (and all its kids) II. History/Theory READ n (from keyboard?) f = 1; for ( all i such that 0< i< n+1) { f = f * i; } Execution for n=4 f = 1*2*3*4 = 24 = 4! Is it smart to compute (n+1) on each loop ? READ n (from keyboard?) f = 1; bound = n+1 for ( all i such that 0< i< bound) { f = f * i; } Input Output?
  • 187. Condition-controlled Loop (http://en.wikipedia.org/wiki/Control_flow) Loop repeats until a given condition change Two versions II. History/Theory READ n; f = 1 while (n > 0) { f = f * n n = n - 1 } “While” Loop Condition checked at the beginning password = “I4m4g33k” do { PRINT “Enter the password:“ READ string } while (string != password); “Do-While” Loop Condition checked at the end
  • 188. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT m ax Loop Condition Assignment Output II. History/Theory Input/Output : many forms Input from keyboard, mice, file, network, parameters Output to screen, file, network, printer, returned values
  • 189. Input/Output: Bad example Avoid interactions II. History/Theory PRINT “Size of the list?” READ size FROM KEYBOARD for ( all i such that 0<i<size) { L i = a random number } max = 0 for (all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT L max ON SCREEN Algorithm Interactions List construction
  • 190. Input/Output: Functions f(x) = 3x+2 g(M) = M' such that if M(x,y), M'(0,y) II. History/Theory Name Input Output Name Input Output Type of Input and Output! Guessed usually! Same thing in Pseudo-code!
  • 191. Input/Output: Good example Use functions (subroutines) II. History/Theory Functions are defined by: name
  • 193. output (max?) Function calls Name Input Output Unrelated variables Variables are only visible inside their enclosing block delimited by brackets
  • 194. max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT m ax Loop Condition Assignment Output Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory Index is returned, not the actual value! Example: 31415 Value Printed is 4
  • 195. Yes No Yes No Algorithm Example: largest number Flowchart (http://en.wikipedia.org/wiki/Flow_chart) II. History/Theory Should be explicit here! index = 0 max = index index < |L| ? L max < L index ? max = index index = index + 1 Start End return max Example: 27182 Largest: 3
  • 196. Flowcharts – Common Symbols Symbol Name Terminal Process Flow-line Decision Input/Output Function Beginning or end of a program Flow of logic Calculation or data manipulation Comparison, Question, Decision that determines alternative paths to be followed Input or Output of data II. History/Theory
  • 197. II. History/Theory Algorithm Example: largest number C-code (http://en.wikibooks.org/wiki/Computer_programming) int largest_index(numbers[] t, int n) { int i = 0; int max = i; for (i = 0; i < n; i++) { if (t[max] < t[i]) max = i; } return max; } Data Type List represented as an array Abbreviations: i++ means i = i +1 Statements end with a semi-colon
  • 198. Back to Turing Machines We have seen that a Turing Machine is one representation of an algorithm There are other ways to represent algorithm
  • 199. A string of characters can represent an algorithm Pseudo code or Programming Language A TM needs an Input to work properly (as any algorithm)
  • 200. So, given a string of characters, can we prove it is the actual representation of a TM?
  • 201. Given a TM and a string, can we prove that the given string represents the given TM? II. History/Theory
  • 202. The Halting Problem (Turing, 1936) Given a TM, say t, and its initial input, say n, can we construct another TM that determines whether t halts on 'n' (the alternative is that t runs forever). halt(t,n) == true if t halts on n, false otherwise.
  • 203. Suppose that such a TM machine exists.
  • 204. Consider: boolean trouble( s ) { if ( halt(s,s) == true ) { loop forever; // Implementation? else { return true; } } String representing an algorithm II. History/Theory
  • 205. Halting Problem (Turing, 1936) trouble() takes the string 's' (representing an algorithm) and gives it to the (supposed existing) function halt() both as the the algorithm to check and as its initial input.
  • 206. Consider the string 't' that represents the algorithm trouble()
  • 207. If trouble(t) halts (it returns true ) halt(t,t) returns false , hence trouble(t) does not halt! If trouble(t) does not halt halt(t,t) returns true , hence trouble(t) does halt! II. History/Theory
  • 208. Halting Problem (Turing, 1936) The Halting Problem is undecidable in the Turing system And also in any other computation model that is equivalent ( Markov algorithms, Lambda calculus, ... ) Many other problems are undecidable Proved by reduction : we don't know if a given problem is decidable or not.
  • 209. we prove that solving this problem is equivalent to solving the HT problem.
  • 210. So it is also undecidable! Informally, such problems cannot be solved in general by computers II. History/Theory
  • 211. Decision Problems (http://en.wikipedia.org/wiki/Decision_problem) A decision problem is a question in some formal system with a yes-or-no answer.
  • 212. Problems with more complex answers are called function problems.
  • 213. The problem itself is distinct from the methods used to solve it, called algorithms.
  • 214. A decision problem which can be solved by some algorithm is called decidable .
  • 215. Example: &quot;Given two numbers x and y, does x evenly divide y?&quot;. II. History/Theory
  • 216. Computability Theory (http://en.wikipedia.org/wiki/Recursion_theory http://en.wikipedia.org/wiki/Computability_theory_(computer_science)) Which problems are computationally solvable using different models of computation.
  • 217. Do not deal with how efficiently a problem can be solved, rather than whether it is solvable at all The amount of resources is not take into account Formal models of computation have been defined TM is only one of them Classification of unsolvable problems Turing degree (degree of unsolvability) II. History/Theory
  • 218. Church's Lambda Calculus (1936) (http://en.wikipedia.org/wiki/Lambda_calculus) Formal system designed to investigate function definition, function application, and recursion.
  • 219. Every expression stands for a function with a single argument f(x) = x + 2 -->  x. x+2 f(1)=3 --> (  x. x+2) 1=1+2=3
  • 220. g(x,y)=x-y -->  x. ( y . x-y)=  x y . x-y; g(3,2)=1--> (  x y . x-y)) 3 2 = ( y . 3-y) 2 = 3-2 = 1
  • 221. g(f(1),f(0)) = f(1)-f(0) = (1+2)-(0+2) = 3+2 = 5 --> (  x y . x-y) ((  x. x+2) 1) ((  x. x+2) 0) Returns a number Returns a function II. History/Theory
  • 222. Church's Lambda Calculus (1936) (http://en.wikipedia.org/wiki/Lambda_calculus) (  xy. x - y) 7 2; (  y. 7 - y) 2 and 7 - 2 are equivalent
  • 223. This equivalence of lambda expressions can not be decided by an algorithm in general
  • 224. Consider: (  x. x x) (  x. x x) --> No reduction!
  • 225. Logic and predicates TRUE :=  xy. x, FALSE :=  xy. y AND :=  pq. p q FALSE, OR :=  pq. p TRUE q NOT :=  p. p FALSE TRUE, IFTHENELSE :=  pxy. p x y II. History/Theory
  • 226. Basis of Programming Languages Turing Machine leads to usual representation of algorithms expressed in an iterative way, in sequences of well defined steps  -calculus leads to another way of expressing algorithms expressed using only functions
  • 227. Use recursivity extensively Same expressive power than Turing Machine Proven! II. History/Theory
  • 228. II. History/Theory Functionnal language Example (http://en.wikibooks.org/wiki/Computer_programming) (defun f (n) (if (< n 2) 1 (* n (f (- n 1))) ) ) Only functions Prefix notation Recursive call Inferred!
  • 229. Church-Turing Thesis (http://en.wikipedia.org/wiki/Church-Turing_thesis) hypothesis about the nature of computers digital computer
  • 230. human with a pencil and a paper following a set of rules. claims that any calculation that is possible can be performed by an algorithm running on a computer, provided that sufficient time and storage space are available. may be regarded as a physical law or as a definition, as it has not been mathematically proven. II. History/Theory
  • 231. The Art of Computer Programming (http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming) Monograph written by Donald. E. Knuth Started in 1962
  • 232. 2006: 7 Volumes ! Considered by the American Scientist as one of the best twelve physical-science monographs of the 21 th century
  • 233. Computer science community regards it as the first and still the best comprehensive treatment of its subject.
  • 234. Bill Gates: &quot;If you think you're a really good programmer... read (Knuth's) book...You should ... send me a resume if you can read the whole thing.&quot; II. History/Theory
  • 235. Gives solutions to common programming problems found in computer sciences Data structures, sorting, searching, lexical analysis, graphs, ... Complexity analysis of each solution is also described Example: number of steps required to sort a list Algorithms are written in pseudo-assembly language called MIX May be hard to understand Accessible algorithms textbooks use high-level languages II. History/Theory The Art of Computer Programming
  • 236. Complexity Theory (http://en.wikipedia.org/wiki/Computational_complexity_theory) Study the resources, or cost , of the computation required to solve a given computational problem.
  • 237. Cost is measured in terms of abstract parameters such as time and space computational resources . Time: number of steps required
  • 238. Space: quantity of information storage required
  • 239. A Complexity Class is the set of all of the problems which can be solved using a certain amount of a certain computational resource. II. History/Theory
  • 241. Alternative algorithm may require less time but more space (or vice versa) to solve a given problem.
  • 242. Parallel processors can also be considered. &quot;parallelizable time&quot; and &quot;non-parallelizable time&quot; ( i.e. s equential time ) are considered.
  • 243. Sequential time gives a limit to how far the computation can be parallelized. Some steps must be done sequentially because they depend on the results of previous steps. II. History/Theory
  • 244. Practical Complexities II. History/Theory
  • 245. Practical Complexities II. History/Theory
  • 246. Complexities Consequences www.top500.org : best computers in the world
  • 247. 2006: next generation will be beyond PetaFLOPS/s 10 ^12 instructions per second! For a problem of “size” 100 Algorithm in n 2 instructions requires 100*100 = 10,000 instructions, less than 1 second
  • 248. Algorithm in 2 n requires 2 100 instructions
  • 249. 2 100 > 10 ^30 instructions, more than 400 millions of years of computation!! II. History/Theory
  • 250. Example: Travelling Salesman Problem (TSP) Given: a set of cities,
  • 251. the distance between them Find the cheapest round-trip route that visits each city exactly once and then returns to the starting city II. History/Theory
  • 252. Polynomial Complexity Class: P (http://en.wikipedia.org/wiki/P_(complexity)) P is the set of decision problems that can be solved by a TM in polynomial time. Intuitively, set of problems which can be effectively solved in the worst cases Examples: Greatest Common Divider,
  • 254. “is a number prime” (proven in 2002) Majority of problems in P are “practically feasibles” Rare are the ones that needs n 10000 steps! II. History/Theory
  • 255. Non-deterministic Polynomial Complexity Class: NP (http://en.wikipedia.org/wiki/NP_(complexity)) The complexity class NP is the set of decision problems that can be &quot; verified &quot; by a TM in polynomial time They may not be solved by a TM in polynomial time but the answer should be checkable efficiently (in polynomial time) Examples: Integer factorization
  • 256. Decision version of the TSP (is there a route with cost < x?)
  • 257. Subset-sum problem (is there any subset of {-2, -3, 15, 14, 7, -10} that sum to zero? II. History/Theory
  • 258. P vs NP (http://en.wikipedia.org/wiki/Complexity_classes_P_and_NP) P: the set of “easy to solve” problems
  • 259. NP: the set of “easy to check” problems
  • 260. P ⊆ NP Easy to solve problem are also easy to check!
  • 261. Is the reverse true: is P ⊇ NP, hence is P == NP? Is an easy to check problem, easy to solve? Concept of NP-completeness NP-complete problems are the most difficult problems in NP II. History/Theory
  • 262. NP-Complete Problems (http://en.wikipedia.org/wiki/NP-complete) A decision problem C is NP-C if: it is in NP and it is NP-hard (every other problem in NP is reducible in polynomial time to it)
  • 263. A reduction is a transformation of one problem into another problem. Intuitively, if problem A is reducible to problem B, a solution to B gives a solution to A. Thus solving A cannot be harder than solving B (we write A ≤ B) TSP is NP-Complete So any instance of any problem in NP can be transformed mechanically into an instance of the TSP problem in polynomial time!! II. History/Theory
  • 264. Consequences If one find a polynomial algorithm that solves TSP, then polynomial algorithms can be provided for any other problems in NP II. History/Theory
  • 265. List of NP-C Problems (http://en.wikipedia.org/wiki/List_of_NP-complete_problems) First NP-C by Cook in 1971 The boolean satisfiability problem (very complex proof)
  • 266. Proof by reduction was then used to show than many other problems are NP-C (more than 3000 are known to be NP-C problems)!
  • 267. TSP is just one of them Many important problems are NP-C Mathematics, Physics, Computer Sciences, Biology, Finance, ... II. History/Theory
  • 268. The big question: is P == NP ? Not a single fast algorithm for any of the known NP-C problem is known
  • 269. Hence, we don't know if P==NP Unsolved question in theoretical computer science.
  • 270. One of the most important unsolved problems in all mathematics.
  • 271. The Clay Mathematics Institute has offered a USD 1,000,000 prize for a correct solution.
  • 272. 2002: poll of 100 researchers: 61 no, 9 yes, 22 unsure, 8 impossible to prove or disprove! II. History/Theory
  • 273. Theory of Computation (http://en.wikipedia.org/wiki/Theory_of_comp) Two major fields
  • 274. Computability theory (Turing, Church, Bool) Is a given problem computable? Complexity Theory (Knuth et al. ) How much ressources (instructions, storage) are required to compute a solution for a given problem?
  • 275. Some problems are theorically computable but seems practically unfeasible (take centuries even with the tomorrow best machine available). Example: Factorisation of big prime numbers (crypto)
  • 276. Still not proven today! II. History/Theory
  • 278. Programming Languages (http://en.wikipedia.org/wiki/Programming_languages) Writing program in the machine language – called assembly language -- is painful and error prone
  • 279. Define languages that are more or less human friendly Use a syntax , a grammar and define the semantic Translate human-friendly languages into machine language Compilation: translate entirely, then execute
  • 280. Interpretation: translate partially, then execute (repeat until the end of the program) II. History/Languages
  • 281. Compilation vs Interpretation (http://en.wikipedia.org/wiki/Interpreted_language http://en.wikipedia.org/wiki/Compiled_language) Source file Executable file II. History/Languages Operating System X=20; while(X > 0) { PRINT X; X := X-1; } 011001010110110110100101011010101011001100110010101011011001010100011000001110101010101001 Compiler Interpretor X=20->0110 While->1010 Executable file running
  • 282. Compilation vs Interpretation (http://en.wikipedia.org/wiki/Interpreted_language http://en.wikipedia.org/wiki/Compiled_language) In theory, any language can be interpreted or compiled (implementation problem)
  • 283. In practice, language designers make choices that ease either interpretation or compilation Static variable type declaration (i.e. number, characters) Compilation Pros: speed, error checking
  • 284. Cons: complexity, long edit-run cycles Interpretation Pros: short edit-run cycles, flexibility
  • 285. Cons: slow, lack of checks II. History/Languages
  • 286. Mixed mode Compile source code into a bytecode Perform all required checks
  • 287. Bytecode is independent of any real hardware architecture Interpret the bytecode A bytecode interpreter is required on each hardware you want to run your (compiled) program on Write once, run anywhere This is called transportability: only the bytecode is needed to execute a program, neither the source nor the machine dependant code. II. History/Languages
  • 288. Programming Paradigms ( http://en.wikipedia.org/wiki/Programming_paradigm) Logic Programming Define assertions to find a goal
  • 289. Based (roughly) on the Boolean Algebra Imperative languages List of statements that change a program state
  • 290. Based on the Turing Machine model Functional languages Sequence of stateless function evaluations
  • 291. Based on the Church  -calculus II. History/Languages
  • 292. Type System (http://en.wikipedia.org/wiki/Type_system) Anything in a computer is represented by 0&1 How to distinguish 11 10 (eleven), 11 2 (three), and “11” the string of two characters '1' and '1'?
  • 293. A type give a meaning to a collection of bits inform programs and programmers how they should treat a given collection of bits.
  • 294. hardware makes no distinction between memory addresses, instruction code, characters, integers and floating-point numbers. II. History/Languages
  • 295. Type Functions Safety “Hello World”/3 is meaningless Documentation “ Integer x = 24; ” versus “ Age x = 24; ” Abstraction e.g: “ String ” represents an abstract data type
  • 296. The underlying implementation (typically) uses an array of characters
  • 297. Functions can be defined on String without any knowledge of their actual representation Substring(String s, String p), Match(String s, String p), getChar(Index i), ... II. History/Languages
  • 298. Type Checking Verify and enforce the constraints of types
  • 299. Static type checking At compile time Dynamic type checking At runtime II. History/Languages
  • 300. Static vs Dynamic Static Pros Reliability
  • 302. Documentation Static Cons More things to write
  • 303. Illusion that the code is safe
  • 304. Longer Edit-Compile-Test-Debug cycle Dynamic Pros Rapid prototyping
  • 306. Generic constructions (eval function over anything)
  • 307. Metaprogramming easy Dynamic Cons Runtime speed II. History/Languages
  • 308. Strong vs Weak Typing II. History/Languages
  • 309. Primitive Types ( http://en.wikipedia.org/wiki/Primitive_type ) Basic building block Any other data type is a composition of primitive types
  • 310. Integer, booleans, characters, floating point numbers
  • 311. Reference An abstract value refering to another object's possibly a much larger one. Operations on primitive types are usually mapped to direct machine instruction Fastest operation available II. History/Languages
  • 312. Primitive Type Representation in C (Int, Bool & Char) Integer: binary notation on 32 bits Signed [-2 31 , 2 31 -1] & unsigned [0,2 32 -1] Boolean: FALSE == 0, TRUE == !FALSE
  • 313. Character: encoding in ASCII (1 byte) 33 non-printable characters (ENTER, DELETE, ...) Control characters 95 printable characters inluding space !&quot;#$%&'()*+,-./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz{|}~ II. History/Languages
  • 315. Extensions to 255 values Spanish, French, ... Unicode is a better encoding 16 bits, 65536 values
  • 316. Any language in the world!
  • 317. Supported by new OS and languages II. History/Languages
  • 318. Real numbers and other-than-decimal bases How to represent 0.1 in base 2? 320.14 = 3.10²+2.10 1 +0.10 0 +1.10 -1 +4.10 -2
  • 319. so, in a base b, we have (a n ...a 1 a 0 .c 1 c 2 ...) b = a n .b n +...+a 1 .b 1 +a 0 .b 0 +c 1 .b -1 +c 2 .b -2 +...
  • 320. (0.1) 10 =(1) 10 /(10) 10 =(1) 2 /(1010) 2 =(0.000110011001100 ....) 2 =(0.00220022...) 3 =(0.01212...) 4 ...
  • 321. (1/3) 10 =(0.33...) 10 =(0.1) 3 p =(11.0010010000111111011010101...) 2 II. History/Languages
  • 322. The IEEE 754 standard Float: 32 bits, double: 64 bits II. History/Languages Mantissa is normalized : always a '1' before the comma (hidden bit) 0.0000111010x2 0 0.000000111010x2 2 1.111010x2 -5 all represent the same number! Exponent is biased: only positive values [-127,128]=[0,255]-127
  • 323. IEEE 754 Standard Example Consider only 5 bits (1,2,2) biased is 1 All Positive Numbers II. History/Languages 2 1 3 4 5 6 7 0 1.5 1.25 1.75 2.5 3.5 0.875 0.5 0.75 0.625 -0.5
  • 324. No representation for 0 (zero) Reserve 0 00 00 and 1 00 00 for (+0 & -0) (symetric)
  • 325. We lose +0.5 and -0.5 IEEE 754 Standard Example Problems & Solutions II. History/Languages 2 1 3 4 5 6 7 1.5 1.25 1.75 2.5 3.5 0.875 0 0.75 0.625 -0.625
  • 326. Big hole around 0 Reserve 'e=0' for denormalized number The hidden bit is '0' in this case: 0.2 0 +(m) 0 00 01 = 0.2 0 +0.2 -1 +1.2 -2 =0.25 0 00 10 = 0.2 0 +1.2 -1 +0.2 -2 =0.5 0 00 11 = 0.2 0 +1.2 -1 +1.2 -2 =0.75 IEEE 754 Standard Example Problems & Solutions II. History/Languages 2 1 3 4 5 6 7 1.5 1.25 1.75 2.5 3.5 0 0.75 0.5 -0.25 -0.5 0.25 -0.75
  • 327. Define meaning for infinite and indefinite Reserve e=3 for that purpose IEEE 754 Standard Example Problems & Solutions II. History/Languages 2 1 3 1.5 1.25 1.75 2.5 3.5 0 0.75 0.5 -0.25 -0.5 0.25 -0.75
  • 328. Even if we cannot represent all integers (infinite), we can represent correctly a small interval With real numbers, it is not possible!! Between two reals, you can always find a new one!
  • 329. So we can only represent a subset of rationals ( ℚ ) Computing with floating points is very time consuming Specific hardware for that purpose (integrated FPU)
  • 330. Floating Point Operations/second (Flops) is a standard metric of processor performance.
  • 331. 2006: IBM Blue Gene: 65536 Dual-Processor (PowerPC ) 360 TeraFLOPS! Problems with the representation of real numbers II. History/Languages
  • 332. Primitive Type Representation in C (pointers) References are implemented as pointers Pair (a,t) where:
  • 333. a : is an integer representing a RAM cell address
  • 334. t : is a type that gives the interpretation of the memory cells that starts from address a t is mandatory , how can you know how to interpret the data at the given address 'a' otherwise? II. History/Languages
  • 335. 'int* p': declares a reference (a pointer) called p on an 'int' value 'p' holds a number (a positive integer called a word) '&v' is the address of the variable v in the RAM It is a number (a positive integer called a word) *p holds the value contained in the cell at address 'p' Primitive Type Representation in C (pointers) II. History/Languages
  • 336. char c = 'A'; char* pc = &c; *(pc+1)='C'; *((int *) (pc)) = 'D'; &pc &c *pc = 'B'; Using Pointers (in C) '&' == &quot;address of&quot; II. History/Languages 65 ? ? ? &c 66 67 ? ? &c 65 ? ? ? 0 0 0 68 &c 66 ? ? ? &c
  • 337. Pointers Manipulation The pointer concept is a very efficient mechanism to manipulate directly the memory Almost everything is possible Used for system programming
  • 338. Also responsible for the vast majority of bugs New trend is to forbid the use of pointers (Java, C#) In C, arrays, functions and strings are de facto pointers char * s = &quot;Hello World&quot;;
  • 339. char[] c = s; *(c+1) = '3'; printf(s); --> H3llo World II. History/Languages
  • 340. Important Languages 1954 – FORTRAN (imp., comp., static, strong) Designed for scientist
  • 341. Versions for Parallel Machine 1958 – LISP (func., inter & comp, dyn, strong) Based on - calculus
  • 342. Used in Artificial Intelligence 1959 – COBOL (irrelevant, comp, static, strong) For Business
  • 343. Still widely used but no more learnt II. History/Languages
  • 344. Important Languages 1964 – BASIC (imp, inter. & comp, static, weak) For beginner 1970 – Pascal (imp, comp, static, strong) Structured programming 1972 – C (imp, comp, static, weak) System programming
  • 345. UNIX Systems (and Linux) are written in C
  • 346. Gnome is written in C 1972 – Smalltalk (imp, mixed, dynamic, strong) Object Oriented (OO) Programming II. History/Languages
  • 347. Important Languages 1972 – Prolog (logic, inter, dynamic, strong) Based on Boolean Algebra
  • 348. Natural language processing 1978 – SQL (irrelevant, inter, dynamic, strong) Database oriented languages (Query) 1983 – Ada (imp, comp, static, strong) Embedded and real-time systems
  • 349. Ariane space launcher II. History/Languages
  • 350. Important Languages 1983 – C++ (imp, comp, static, ~strong) Patchwork of C ;-)
  • 351. Claim to be an OO Language ;-)
  • 352. Widely used because of Microsoft adoption
  • 353. Windows (95, 98, NT, XP) is written in C++
  • 354. KDE is also written in C++ 1985 – Eiffel (imp, comp, static, strong) True OO Language!
  • 355. Design by contract (software quality) II. History/Languages
  • 356. Important Languages 1987 – Perl (imp, inter, dynamic, weak) Easy & Widely used by web designers 1995 – Java (imp, mixed, static & dyn, strong) “ write once, run anywhere” language
  • 357. Widely used (smartcards to supercomputers)
  • 358. Object Oriented 2000 – C# (imp, mixed, static & dyn, strong) Microsoft defence against Java
  • 359. Similar to Java on many aspects II. History/Languages
  • 360. Language Trends Ruby Multi-paradigm programming language Concurrency and distribution E: java based
  • 361. C : microsoft based And many others... II. History/Languages
  • 363. Objectives Theories provide strong fondations to: Express algorithms (TM,  -calculus, ...)
  • 364. To analyse them (Computability/Complexity) Languages have been defined to help in the writing of programs (hence algorithms)
  • 365. Even if not required, a computer system usually has an operating system. II. History/OS
  • 366. OS definition No widely admitted definition
  • 367. Fact: a computer is made of several parts devices (keyboard, hard drive, memory, CPU, ...)
  • 368. programming them is a very complex task the OS provides an abstract view of the real machine that is much simpler to program Data on an hard drive is seen as an organized collection of files instead of a collection of bits their management should be optimal the OS handles all different resources for the user If three print jobs are simultaneously submitted on the same printer, they should be queued II. History/OS
  • 369. OS composition kernel (strictly equal to OS) handles resources and provides the abstract “easy to program” machine shell interaction with the user through command line
  • 370. Syntax: command -option parameter e.g: mail -u [email_address] “Mail example” Applications for System Administration Managing user accounts
  • 372. Managing devices II. History/OS
  • 373. OS composition Graphical User Interface is not (and should not) be part of an OS code complexity
  • 374. security GUI provides a user-friendly way of using a computer
  • 375. Some OS neither have a shell nor a GUI Embedded devices (satellite, smart cards, ...) II. History/OS
  • 376. pre-Multics systems 1950: computers were giant personal computers Only one user at a given time 1960: Batch systems Users submit their job to the operator (cards)
  • 377. Operator groups jobs into batch and enter them for execution
  • 378. Most of the time, the CPU is idle waiting for some input (user, disk, network, ...) 1962: Time sharing (CTSS at the MIT) When the CPU is idle for one job/user, execute/resume another one II. History/OS
  • 379. Market evolution: Multics 1964: Success of CTSS leads to Multics By the MIT, Bell Labs and General Electric
  • 380. Very advanced operating system Hundreds of users on a pre-Pentium machine (Intel 386)!
  • 381. Hardware components could be added at runtime (even CPU) Not a success anyway: too much in advance! ;-(
  • 382. Many ideas of current operating systems comes from it!
  • 383. Highly influential! 1970: Unix comes out from Ken Thompson Worked at Bell on Multics before Bell pulled out
  • 384. He developed a smaller Multics version called Unics, that should do only one thing, but do it well. II. History/OS
  • 385. Market evolution: the Unix fashion 1974: Research paper by Ritchie & Thompson Describe the Unix system (re)-written in the C language
  • 386. Received the prestigious ACM Turing Award
  • 387. Many universities asked for a copy of Unix Unix: widely adopted Availability of the source code: modifications by any one to fit the needs
  • 388. USENIX Conferences --> lots of enhancements 80's: The Portability Chaos Many Unix existed (and still exist), some are incompatibles --> POSIX (Portable Operating System)
  • 389. Commercial failure for IBM, Sun, Bell, ... and Microsoft! II. History/OS
  • 390. Unix Wars II. History/OS
  • 391. The Home Computer Era (http://en.wikipedia.org/wiki/History_of_computing_hardware_(1960s-present)) 1973: Xerox Alto mini-computer first mouse and GUI concept 1975: MITS Altair 8800 first home computer Great success: 10,000 shipped
  • 392. Paul Allen and Bill Gates developed a BASIC interpreter for the Altair, and then formed Microsoft.
  • 393. CP/M-80 is the OS developed by Digital Research 1977: Apple II phenomenon Steve Jobs founded Apple Computer.
  • 394. Color graphics, open architecture, floppy disk drive II. History/OS
  • 395. The IBM Personal Computer Era (http://en.wikipedia.org/wiki/History_of_computing_hardware_(1960s-present)) Many other concurrent Commodore, Atari, Amiga, ...
  • 396. Closed architecture --> disappeared 1981: IBM PC model IBM replied to Apple
  • 398. Uses Intel 8088 processor
  • 399. OS: MS-DOS provided by Microsoft MS-DOS is based on QDOS, a CP/M compatible OS which Microsoft had obtained the copyrights.
  • 400. Digital Research refused to provide CP/M to IBM in 1980 II. History/OS
  • 401. The Mac Era (http://en.wikipedia.org/wiki/History_of_computing_hardware_(1960s-present) http://en.wikipedia.org/wiki/Apple_Computer) 1981: Xerox Star Bit-mapped display, windows-based GUI, icons, folders, mouse, Ethernet networking, file servers, print servers and e-mail. 1984: Apple Macintosh First mass-marketed microcomputer with a GUI
  • 402. Standard for the personal computer for years Until 1990 in the IBM PC world Gaming is the big market
  • 403. It requires power --> faster CPU, bigger RAM, ... II. History/OS
  • 404. The Microsoft Era (http://en.wikipedia.org/wiki/Microsoft_Windows http://en.wikipedia.org/wiki/Windows_NT) 1990: Windows 3.0 by Microsoft First GUI in the IBM PC world
  • 405. On top of MS-DOS (highly limited) 1995: Windows 95, 1998: Windows 98 Still based on MS-DOS
  • 406. End of Apple domination until 1998 with the iMac series by Steve Jobs 1993: Windows NT 3.1 Fully 32-bits OS written from scratch
  • 407. Uses concepts derived from DEC VAX OS 2001: Windows XP, is in fact NT v 5.1 II. History/OS
  • 408. The Open Source Revolution (http://en.wikipedia.org/wiki/GNU) 1983: Richard Stallman quit its job at MIT Refused to work in a closed environment
  • 409. Creates the GNU project: a free operating system Free as in free speech: free to study and modify the code as it was in the 60's and 70's 1985: RS creates the Free Software Foundation
  • 410. 1989: Creation of the GNU Public Licence Basically, you can redistribute (even a modified version of) a GPL software but with its code
  • 412. You can sell a GPL software (Redhat, Suse, ...) II. History/OS
  • 413. The GNU Project (http://en.wikipedia.org/wiki/GNU) GNU means Gnu's Not UNIX (recursive) Should be UNIX compatible anyway
  • 414. GNU Hurd will be the name of the kernel 1990: GNU System almost complete Compiler: GNU C Compiler
  • 416. All other parts (shell, libraries, GUI, ...)
  • 417. A lot have been done but, the kernel (Hurd) is the only piece that is missing... II. History/OS
  • 418. The Linux Kernel (http://en.wikipedia.org/wiki/Linux_kernel) August 1991: Linus Torvalds posts in Internet “ I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. [...] I'd like any feedback [...]. ”
  • 419. He wrote a kernel, using all the GNU tools
  • 420. A kernel was the only thing that GNU was lacking to become operational Evolution: 1991: v 0.01 (10,239 lines of code)
  • 421. 2006: v 2.6.16.11 (6,981,110 lines of code) Big support from IBM, HP, ... II. History/OS
  • 422. GNU/Linux Distributions (http://en.wikipedia.org/wiki/Comparison_of_Linux_distributions http://en.wikipedia.org/wiki/Linux) Distribution: GNU + linux kernel + tools for system administration Installing the system
  • 424. Configuring softwares Many flavors User friendly: Fedora, Mandrake, Suse, Ubuntu
  • 427. Source based: Gentoo II. History/OS
  • 428. Other open source UNIX projects BSD based (Open source) FreeBSD (Optimized for x86)
  • 430. OpenBSD (Security) Sun Solaris (Open Source) For SPARC and x86
  • 431. Designed for the industry (stable, ...) And many others... II. History/OS
  • 432. Open Source Equivalences (http://en.wikipedia.org/wiki/List_of_open_source_software_packages) GUI: Windows (Microsoft), Darwin (Mac OS X) KDE, GNOME, CDE, Enlightenment, ... Web Browsers: IE (Microsoft), Safari (Mac OS X) Firefox (available on Windows), Konqueror Email: Outlook (Microsoft) Evolution, Kmail Office Suite: MS Office (Microsoft) OpenOffice (available on Windows), KOffice Image Manipulation: Photoshop (Adobe) The Gimp etc... II. History/OS
  • 433. File System (http://en.wikipedia.org/wiki/File_system) Method for storing and organizing compuer files and the data they contain Easy to find, and access Usually use an underlying storage device Hard Drive
  • 434. CD-ROM
  • 435. USB Stick Not required Network connection
  • 436. Any informations (/proc on Linux) II. History/OS
  • 437. File System Files & Directories A directory (folder) is a mapping between a file name and the actual file (data)
  • 438. Directory structure can be: Flat: all files into one folder
  • 439. Hierarchical: folder can contain files and folders Attributes Permissions (owner, groups, others in UNIX)
  • 440. Creation, Modification date Extended Attributes Icons, Author, ... II. History/OS
  • 441. File System Files & Directories In console mode, '.' means the current directory
  • 442. '..' means the parent directory MS-DOS comes from CP/M which comes from UNIX hence the similarities Hierarchical File System
  • 443. Shell and command (cp, mv, ...) Unfortunately Bill Gates also wanted to mark its differences Hence drive letters (A:, B:, C:, ...)
  • 444. Hence the '\' vs '/' as a path separator Problems nowadays when building applications for both world! II. History/OS
  • 445. File System Issue Example: External Fragmentation (http://en.wikipedia.org/wiki/Fragmentation_(computer)) Remove C,E After many operations (Create, Remove): Leads to performance problem: reading the red file requires 4 movements. Hard Drives are 1,000,000 times slower than CPU! II. History/OS A B C D F E A B D F Create: G = G 1 G 2 + A B G 1 D F G 2
  • 446. File System Issue Example: External Fragmentation (http://en.wikipedia.org/wiki/Fragmentation_(computer)) Solutions: Windows (FAT, NTFS): defragment Run a software that reorganize files in a contiguous manner.
  • 447. 30 % of available free space is recommanded for the defragmentation process (source: Microsoft) UNIX: keep external fragmentation below a given treshold (~5, 10 %) When file system operations are performed, it uses a smart algorithm.
  • 448. Works very well when the free space available is above 20% II. History/OS
  • 449. Other OS Issues Process Scheduling Ensuring fairness, performance, throughput, interactivity, all at the same time!
  • 450. Dealing with multi-CPU, multi-cores, multi-threads, ... Memory Management Preventing fragmentation
  • 451. Efficiency (cache, ...) And also... Security, stability, reliability, usability, ... II. History/OS
  • 453. Networking Needs Now we have: Computer Hardware
  • 454. Theory to describe algorithms
  • 455. Languages to write algorithms
  • 456. Operating Systems to manage resources to make the use of hardware user and programmer friendly Problem at the beginning: few computers were available;
  • 457. Lots of researchers widespread How to share the access to costly computers? II. History/Network
  • 458. Computer Networking Definition Scientific (research) and engineering discipline concerned with communication between computer systems.
  • 459. Involve at least two devices Usually, at least one is a computer.
  • 460. Devices can be separated by: a few meters (e.g. via Bluetooth)
  • 461. or thousands of kilometers (e.g. via the Internet). Computer networking is sometimes considered a sub-discipline of Telecommunication II. History/Network
  • 462. Pre-ARPANet Era Before 1940, carrying instructions between calculation machines and early computers was done by human users.
  • 463. 1940 George Stibitz used a teletype machine to send instructions from Dartmouth College in New Hampshire to his Complex Number Calculator in New York
  • 464. 1960-1970 Kleinrock, Baran and Davies had independently conceptualized and developed network systems consisting of datagrams or packets that could be used in a packet switching network between computer systems. II. History/Network
  • 465. ARPANet (http://en.wikipedia.org/wiki/ARPANET) Advanced Research Projects Agency Network United States Department of Defense 1962, J.C.R. Licklider was hired by the ARPA and developed the &quot;Intergalactic Network&quot; working group His ideas contained almost everything that the Internet is today.
  • 466. Special type of computers will take care of the packet switching on the behalf of end-users one (big mainframe at that time) II. History/Network
  • 467. ARPANet 1969: connection using 50 kbit/s circuits. University of California at Los Angeles,
  • 469. University of California at Santa Barbara,
  • 470. University of Utah Development centred around Request For Comment (RFC) still used today.
  • 471. In the World, other technology X.25 in Europe, DataPac in Canada, FidoNet, ...
  • 472. and others... II. History/Network
  • 474. Birth of Internet (http://en.wikipedia.org/wiki/History_of_the_Internet) Many different networks leads to problem in communication
  • 475. Internet is the Esperanto of Communication between Computers Reduce the role of network to the bare minimum
  • 476. Joining any network together whatever their characteristics are RFCs 791 (IP), 792 (ICMP) and 793 (TCP) defines the Internet Published in 1982 (First draft in 1974) 1983: TCP/IP becomes the only approved protocol on ARPANET II. History/Network
  • 477. Internet for Everyone? ARPA's business was funding R&D US Government Funded
  • 478. Unrelated commercial use was strictly forbidden Connections to Military sites and Universities
  • 479. Some companies either helped in research project or provided services (e.g.: HP)
  • 480. They asked for connections and they had!
  • 481. Difficulties to define “commercial use” 1983, the U.S. military portion of the ARPANET was broken off as a separate network: MILNET
  • 482. 1989: first dial-up ISP (world.std.com) Controversy in Universities! II. History/Network
  • 483. The Growth of Internet The Exponential Growth started thanks to the WWW II. History/Network
  • 484. The World Wide Web (http://en.wikipedia.org/wiki/History_of_the_World_Wide_Web) Until the 90's, finding and accessing documents available on the Internet was a real pain
  • 485. 1991: Tim Berners-Lee from the CERN Labs developed a network-based implementation of the hypertext concept “ The WorldWideWeb (WWW) project aims to allow links to be made to any information anywhere. [...] The WWW project was started to allow high energy physicists to share data, news, and documentation. We are very interested in spreading the web to other areas, and having gateway servers for other data. Collaborators welcome!” II. History/Network
  • 486. Web Browsers War (http://en.wikipedia.org/wiki/Browser_wars) 1992: Mosaic (Andreessen & Bina, UIUC Students) First Modern (Graphical) Web Browser available for the mass market (Windows, UNIX) for free
  • 487. A Revolution! 1994: Anderseen & Clark created Netscape Company & Browser name
  • 488. 80% used in 1996 1995: Microsoft released IE v1.0 Part of Windows 95+ (quite late!) The war then started! II. History/Network
  • 489. Web Browsers War (http://en.wikipedia.org/wiki/Browser_wars) II. History/Network
  • 490. Netscape vs Microsoft (http://en.wikipedia.org/wiki/Browser_wars) Adding features took precedence over bug fixing! Derivation from standards “Best Viewed with XX” Campaign! Unfair: Microsoft released their browser packaged with their OS IE is not the first source of income for Microsoft, it is for Netscape
  • 491. Even if until IE v4.0, Netscape was by far superior, Microsoft was enlarging its market share automatically after each OS installation! II. History/Network
  • 492. Netscape vs Microsoft (http://en.wikipedia.org/wiki/Browser_wars) Netscape business model was to sell server software
  • 493. Microsoft decided to provide for “free” IIS (Web Server) with server version of Windows
  • 494. Microsoft created licensing agreements: With computer manufacturers requiring them to provide desktop icons for IE
  • 495. With AOL to base AOL's primary interface on IE rather than Netscape Microsoft imposed Apple to provide IE as the default browser on the Mac for five years II. History/Network
  • 496. First Browser War Winner: Microsoft 1998: End of Netscape Purchased by AOL afterwards. Lack of challengers == Lack of inventions 2001: IE v6.0 (small improvement over IE v5.5)
  • 497. 2006: IE v7.0 (reason: the success of Firefox) When Netscape died in 1998, its source code was released with an Open-Source licence This product was renamed Mozilla
  • 498. 2002: Mozilla v1.0 rewritten from scratch Very popular in the Open-Source Community 2003: AOL refused to support any longer Mozilla II. History/Network
  • 499. Second Browser War From Mozilla v1.0 many other products have been created 2004: Firefox v1.0 is released by the Mozilla foundation (light-weight cross-platform version of Mozilla) June 2004, major security hole in IE Security companies and US-CERT recommend Firefox 2005: IE usage share dropped down to 85% It was 95% in 2003. The war continue... II. History/Network
  • 500. Searching on the Web (http://en.wikipedia.org/wiki/Search_engine) 1993: Lycos
  • 501. 1994: WebCrawler First full text www search engine 1995: Yahoo & Altavista Leader since 2001 2001: Google Minimal interface
  • 503. Revolution: results become ordered by their relevance! 2004: MSN Search II. History/Network
  • 504. Google vs Microsoft Linux may not be the Microsoft killer But may be a UNIX killer! ;-) Google is providing many web-enabled desktop services Search, Mail, Forums, Word, SpreadSheet, ... Concurrent to MS Office product
  • 505. The OS does not really matter! Having a good web browser is important!
  • 506. Google is founding the Mozilla Foundation that is developing Firefox (on both Windows and UNIX) To be followed... II. History/Network
  • 507. Vocabulary Internet: the giant Wide Area Network (WAN) of networks that uses the TCP/IP protocol for communication
  • 508. Intranet: a Local Area Network (LAN) that is using TCP/IP but that is not necessarily connected to the Internet e.g: GIKI Intranet Extranet: An Intranet that is extended outside of a company (usually over encryption on top of Internet) Ethernet: “hardware” link (TCP/IP is on top) II. History/Network
  • 509. Internet “Killer Applications” Email was used before the Internet, it actually helps the development of Internet!
  • 511. FTP: File Transfer Protocol
  • 514. P2P: User to User Data Exchange
  • 515. Web 2.0 (everything runs on the server) Word Processor, Spreadsheet, Mail Reader, ...
  • 516. Google is the leader (Microsoft Challenger?) II. History/Network
  • 517. Network OSI Model (http://en.wikipedia.org/wiki/OSI_model) A networking system is divided into layers.
  • 518. Within each layer, one or more entities implement its functionality.
  • 519. Each entity interacts directly only with the layer immediately beneath it, and provides facilities for use by the layer above it.
  • 520. Protocols enable an entity in one host to interact with a corresponding entity at the same layer in a remote host. II. History/Network
  • 521. Network OSI Model X.25 follows the OSI Model
  • 522. Internet (TCP/IP) does not!! II. History/Network
  • 523. OSI & TCP/IP II. History/Network
  • 524. Layers at work Abstraction: Communication from process to process Implementation: Communication from layer to layer II. History/Network
  • 525. Layers at work Example: UDP Application Layer Transport Layer Network Layer Link Layer II. History/Network UDP Data UDP Header IP Data IP Header Frame Header Frame Trailer Frame Data
  • 526. Internet Topology (2003-11-23) II. History/Network
  • 528. Trends Asymmetric DSL: download >> upload
  • 531. Mobility, Topology, ... Multimedia VoIP -- Voice Over IP (Skype) Peer to Peer Performance Link Layer for Wan (ATM, ...) II. History/Network
  • 532. IPv6, the future IPv6 (Xerox) adopted by IETF in 1994 IPv4 address: 32 bits (4.3 billions),
  • 533. IPv6 address: 128 bits (5×10 28 for each 6.5 billion people)
  • 534. Many features (e.g: autoconfiguration, security) Support on Linux started in 1996! 2001 fully supported Windows Vista will support it by default...
  • 535. Adopted by China and India Facing problems with their population
  • 536. Taking the leadership?! II. History/Network
  • 538. History of Computer Sciences Everything started with counting
  • 539. Hardware has been designed to help
  • 540. Theory were needed to understand hardware
  • 541. Languages were required to ease the commanding of hardware
  • 542. Operating Systems were designed to manage hardware and to make it appears a single unit
  • 543. Networking was set up to share the access to costly hardware. III. Conclusion
  • 544. Other CS Fields include Software Engineering Project Management, ... Artificial Intelligence Neural Network, ... Multimedia Image Processing, ... Simulation & Modelling
  • 545. Distributed Systems Web Services, ... Parallel Programming Cluster, Grid Computing, ... III. Conclusion

Editor's Notes

  • #14: 0101: first bit: you like CS101 second bit: you know CS101 third bit: you want to know CS101 four bit: you will repeat CS101