SlideShare uma empresa Scribd logo
1 de 85
Baixar para ler offline
VIRTUAL
     MACHINES
FITC Amsterdam 2013 | Joa Ebert | 02/19/2013
JOA EBERT
   @joa
Agenda
WHAT is a virtual machine?
WHY do we need them?
HOW do they work?
WHERE are the issues?
WHAT
is a virtual machine?
„A machine is a
tool that consists
of one or more
parts, and uses
energy to achieve
a particular goal.“
             WIKIPEDIA
„A virtual machine (VM)
is a simulation of a machine
(abstract or real) that is
usually different from the
target machine (where it is
being simulated on).“ WIKIPEDIA
Programmers really love
to make it complicated ...
SYSTEM    PROCESS
VIRTUAL   VIRTUAL
CODE
       EXECUTION




  MEMORY       MULTI
MANAGEMENT   THREADING
WHY
do we need them?
PLATFORM AGNOSTIC
PROFILING AND
DEBUGGING IN
PRODUCTION
SANDBOXING
AND SECURITY
OPTIMIZATION
EXISTING
PROGRAMS
RUN FASTER WHEN
THE VM GETS
FASTER.
MORE SPACE FOR
INNOVATION.
HOW
do they work?
CODE
EXECUTION
FEEDBACK ABOUT
        TYPES AND HOT
        SPOTS

           NATIVE
   VM       CODE
                      RUNTIME

CODE
        INTERPRETER
HIDDEN
CLASSES
function Person(age, gender) {
  this.age = age
  this.gender = gender
}

var joa = new Person(26, „male“)
Person




function Person(age, gender) {
  this.age = age
  this.gender = gender
}

var joa = new Person(26, „male“)
age


              Person         Person

   26                         age




function Person(age, gender) {
  this.age = age
  this.gender = gender
}

var joa = new Person(26, „male“)
age            gender


              Person         Person            Person

   26                         age               age

0x80f54644                                     gender




function Person(age, gender) {
  this.age = age
  this.gender = gender
}

var joa = new Person(26, „male“)
POLYMORPHIC
INLINE
CACHES
function isAdult(person) {
  return person.age() > 17
}
POLYMORPHIC
INLINE
CACHES
function isAdult(person) {
  return person.age() > 17
}
isAdult   lookup   Person::age
...                return this.age
age()
...
isAdult   Person::age
...       if not Person
age()       lookup()
...
          return this.age
isAdult   PIC stub         Person::age
...       if Person        if not Person
age()      Person::age()    lookup()
...       else if Robot
           Robot::age()    return this.age
          else
           lookup()
isAdult   PIC stub
...       if Person
age()     return this.age
...       else if Robot
           Robot::age()
          else
           lookup()
SPECULATIVE
OPTIMIZATIONS
STATIC   DYNAMIC
TYPING    TYPING
def using[I <: { def close() }, O](stream: I)(f: I ⇒ O): O =
  try {
    f(stream)
  } finally {
    stream.close()
  }



STRUCTURAL TYPING
mem ber thos e PICs?
                              Re

def using[I <: { def close() }, O](stream: I)(f: I ⇒ O): O =
  try {
    f(stream)
  } finally {
    stream.close()
  }



STRUCTURAL TYPING
while(true) {
    computeTheAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything();
}




             DEOPTIMIZATION
                AND OSR
DEBUG   RELEASE
oracle.com/us/technologies/java/java7-renaissance-vm-428200.pdf
GARBAGE
COLLECTION
CONSERVATIVE   PRECISE
0x00 0x00 0x00 0x10 0x00 0x00 0x00 0x00
0x80 0x00 0x00 0x01 0x80 0x00 0x00 0x04
0xde 0xad 0xbe 0xef 0x00 0x10 0x00 0x00

              MEMORY
0x00000010 0x00000000
    0x80000001 0x80000004
    0xdeadbeef 0x00100000

MEMORY (DWORD ALIGNED)
0x00000010 0x00000000
    0x80000001 0x80000004
    0xdeadbeef 0x00100000

MEMORY (DWORD ALIGNED)
0x00000010 0x00000000
    0x80000001 0x80000004
    0xdeadbeef 0x00100000

MEMORY (DWORD ALIGNED)
0x00000010 0x00000000
    0x80000001 0x80000004
    0xdeadbeef 0x00100000

MEMORY (DWORD ALIGNED)
0x00000010 0x00000000
    0x80000001 0x80000004
    0xdeadbeef 0x00100000

MEMORY (DWORD ALIGNED)
Conservative GCs suck!
1      1


REFERENCE
COUNTING
Reference counting sucks!
COPYING
COLLECTOR
FROM-Space



TO-Space
FROM-Space



TO-Space
TO-Space



FROM-Space
Copying collectors are really cool but for a
8GB heap they require 16GB total memory!
MARK &
COMPACT
Young      Survivors      Old
 Generation               Generation




EPHEMERAL GC
THREADING
CONCURRENCY   PARALLELISM
SHARED   ISOLATED
WHERE
are the issues?
ALL VMS ARE
CREATED
EQUAL.
ALL VMS ARE
CREATED
EQUAL. NOT.
JAVASCRIPT


IS NOT
JAVASCRIPT
J   A   V   A


IS NOT
J   A   V   A
PEOPLE MAKE AN
ARGUMENT FOR A
PARTICULAR VM

„Don‘t do this“ IS NOT
ALWAYS TRUE
STARTUP COSTS
ARE PAINFUL
FOR SHORT
RUNNING
APPLICATIONS
TODAYS
ADVICE
IS NOT
TRUE FOR
TOMORROW
BENCHMARKING
IS REALLY HARD.
MICROBENCHMARKS
ARE EVEN MORE
USELESS.
WITH GREAT
POWER
COME GREAT
EXPLOITS
GC DOES
NOT COME
FOR FREE
Is your GC
predictable?
MEMORY
   vs.
 SPEED
Write Code for the Future.
 Don‘t try to outsmart
  todays technology.
Always Remember:
Always Remember:
Math kicks everyones ass!
O(1)
 O(log n)
    O(n)
O(n log n)
   O(n²)
   O(n³)
     ...
   O(x n)
   O(n!)
THANK
                            YOU
                                               Enj oy the party tonight and
FITC Amsterdam 2013 | Joa Ebert | 02/19/2013
                                               b on voyage!

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Virtualization- Cloud Computing
Virtualization- Cloud ComputingVirtualization- Cloud Computing
Virtualization- Cloud Computing
 
Virtualization in cloud computing
Virtualization in cloud computingVirtualization in cloud computing
Virtualization in cloud computing
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Vitualisation
VitualisationVitualisation
Vitualisation
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Introduction to virtualization
Introduction to virtualizationIntroduction to virtualization
Introduction to virtualization
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology Overview
 
Virtual Machine
Virtual MachineVirtual Machine
Virtual Machine
 
VMware Virtualization
VMware Virtualization VMware Virtualization
VMware Virtualization
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
Virtualization in cloud computing ppt
Virtualization in cloud computing pptVirtualization in cloud computing ppt
Virtualization in cloud computing ppt
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
 
Virtualization VMWare technology
Virtualization VMWare technologyVirtualization VMWare technology
Virtualization VMWare technology
 
Virtual machines and containers
Virtual machines and containersVirtual machines and containers
Virtual machines and containers
 
Hypervisor
HypervisorHypervisor
Hypervisor
 
1.Introduction to virtualization
1.Introduction to virtualization1.Introduction to virtualization
1.Introduction to virtualization
 
Virtualization 101
Virtualization 101Virtualization 101
Virtualization 101
 
VMware Overview
VMware OverviewVMware Overview
VMware Overview
 
Lecture5 virtualization
Lecture5 virtualizationLecture5 virtualization
Lecture5 virtualization
 

Semelhante a Virtual Machines

Semelhante a Virtual Machines (20)

FITC '14 Toronto - Technology, a means to an end
FITC '14 Toronto - Technology, a means to an endFITC '14 Toronto - Technology, a means to an end
FITC '14 Toronto - Technology, a means to an end
 
Technology: A Means to an End with Thibault Imbert
Technology: A Means to an End with Thibault ImbertTechnology: A Means to an End with Thibault Imbert
Technology: A Means to an End with Thibault Imbert
 
Programmation fonctionnelle Scala
Programmation fonctionnelle ScalaProgrammation fonctionnelle Scala
Programmation fonctionnelle Scala
 
A miało być tak... bez wycieków
A miało być tak... bez wyciekówA miało być tak... bez wycieków
A miało być tak... bez wycieków
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code Development
 
printf("%s from %c to Z, in %d minutes!\n", "printf", 'A', 45);
printf("%s from %c to Z, in %d minutes!\n", "printf", 'A', 45);printf("%s from %c to Z, in %d minutes!\n", "printf", 'A', 45);
printf("%s from %c to Z, in %d minutes!\n", "printf", 'A', 45);
 
Machine Learning and Go. Go!
Machine Learning and Go. Go!Machine Learning and Go. Go!
Machine Learning and Go. Go!
 
Pycon tati gabru
Pycon tati gabruPycon tati gabru
Pycon tati gabru
 
Introduction to Julia
Introduction to JuliaIntroduction to Julia
Introduction to Julia
 
Learning from 6,000 projects mining specifications in the large
Learning from 6,000 projects   mining specifications in the largeLearning from 6,000 projects   mining specifications in the large
Learning from 6,000 projects mining specifications in the large
 
25 Years of C++ History Flashed in Front of My Eyes
25 Years of C++ History Flashed in Front of My Eyes25 Years of C++ History Flashed in Front of My Eyes
25 Years of C++ History Flashed in Front of My Eyes
 
Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]
 
Programming at King's
Programming at King'sProgramming at King's
Programming at King's
 
ZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in Scala
 
Atmosphere 2016 - Krzysztof Kaczmarek - Don't fear the brackets - Clojure in ...
Atmosphere 2016 - Krzysztof Kaczmarek - Don't fear the brackets - Clojure in ...Atmosphere 2016 - Krzysztof Kaczmarek - Don't fear the brackets - Clojure in ...
Atmosphere 2016 - Krzysztof Kaczmarek - Don't fear the brackets - Clojure in ...
 
Y U NO CRAFTSMAN
Y U NO CRAFTSMANY U NO CRAFTSMAN
Y U NO CRAFTSMAN
 
Y U NO CRAFTSMAN
Y U NO CRAFTSMANY U NO CRAFTSMAN
Y U NO CRAFTSMAN
 
Kotlin Overview (PT-BR)
Kotlin Overview (PT-BR)Kotlin Overview (PT-BR)
Kotlin Overview (PT-BR)
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
What Lies Beneath
What Lies BeneathWhat Lies Beneath
What Lies Beneath
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Virtual Machines