SlideShare ist ein Scribd-Unternehmen logo
1 von 49
Downloaden Sie, um offline zu lesen
Virtual Machines


Guest lecture — Adrian Lienhard
Birds-eye view



    A virtual machine is an abstract computing
    architecture supporting a programming
    language in a hardware-independent fashion




                                                 Z1, 1938
© Adrian Lienhard                                           1.2
Roadmap




>     Introduction
>     The Heap Store
>     Interpreter
>     Automatic Memory Management
>     Threading System
>     Optimizations



© Adrian Lienhard                   3
Implementing a Programming Language




© Adrian Lienhard                     4
How are VMs implemented?




Typically using an efficient and portable language
such as C, C++, or assembly code

Pharo VM platform-independent part written in Slang:
  – subset of Smalltalk, translated to C
  – core: 600 methods or 8k LOC in Slang
  – Slang allows one to simulate VM in Smalltalk




© Adrian Lienhard                                      5
Main Components of a VM




                    The Heap Store
                    Interpreter
                    Automatic Memory Management
                    Threading System


© Adrian Lienhard                                 6
Pros and Cons of the VM Approach


 Pros
 > Platform independence of application code
    “Write once, run anywhere”
 > Simpler programming model
 > Security
 > Optimizations for different hardware architectures


 Cons
 > Execution overhead
 > Not suitable for system programming


© Adrian Lienhard                                       7
Roadmap




>     Introduction
>     The Heap Store
>     Interpreter
>     Automatic Memory Management
>     Threading System
>     Optimizations



© Adrian Lienhard                   8
Object Memory Layout


32-bit direct-pointer scheme




Reality is more complex:
   – 1-word header for instances of compact classes
   – 2-word header for normal objects
   – 3-word header for large objects


© Adrian Lienhard                                     9
Different Object Formats

> fixed pointer fields
> indexable types:
  – indexable pointer fields (e.g., Array)
  – indexable weak pointer fields (e.g., WeakArray)
  – indexable word fields (e.g., Bitmap)
  – indexable byte fields (e.g., ByteString)

Object format (4bit)
   0     no fields
   1     fixed fields only
   2     indexable pointer fields only
   3     both fixed and indexable pointer fields
   4     both fixed and indexable weak fields
   6     indexable word fields only
   8-11 indexable byte fields only
   12-15 ...

© Adrian Lienhard                                    10
Iterating Over All Objects in Memory


     “Answer the first object on the heap”
     anObject someObject

     “Answer the next object on the heap”
                                                 Excludes small
     anObject nextObject                         integers!


                    SystemNavigation>>allObjectsDo: aBlock
                       | object endMarker |
                       object := self someObject.
                       endMarker := Object new.
                       [endMarker == object]
                          whileFalse: [aBlock value: object.
                             object := object nextObject]



© Adrian Lienhard                                                 11
Roadmap




>     Introduction
>     The Heap Store
>     Interpreter
>     Automatic Memory Management
>     Threading System
>     Optimizations



© Adrian Lienhard                   12
Stack vs. Register VMs


               VM provides a virtual processor
               that interprets bytecode instructions


  Stack machines
  – Smalltalk, Java and most other VMs
  – Simple to implement for different hardware architectures

  Register machines
  – only few register VMs, e.g., Parrot VM (Perl6)
  – potentially faster than stack machines

© Adrian Lienhard                                              13
Interpreter State and Loop


Interpreter state
   – instruction pointer (ip): points to current bytecode
   – stack pointer (sp): topmost item in the operand stack
   – current active method or block context
   – current active receiver and method

Interpreter loop
   1. branch to appropriate bytecode routine
   2. fetch next bytecode
   3. increment instruction pointer
   4. execute the bytecode routine
   5. return to 1.

© Adrian Lienhard                                            14
Method Contexts




                    method header:
                    – primitive index
                    – number of args
                    – number of temps
                    – large context flag
                    – number of literals




© Adrian Lienhard                          15
Stack Manipulating Bytecode Routine




       Example: bytecode <70> self

         Interpreter>>pushReceiverBytecode
           self fetchNextBytecode.
           self push: receiver

         Interpreter>>push: anObject
           sp := sp + BytesPerWord.
           self longAt: sp put: anObject


© Adrian Lienhard                            16
Stack Manipulating Bytecode Routine




Example: bytecode <01> pushRcvr: 1

Interpreter>>pushReceiverVariableBytecode
  self fetchNextBytecode.
  self pushReceiverVariable: (currentBytecode bitAnd: 16rF)

Interpreter>>pushReceiverVariable: fieldIndex
  self push: (
    self fetchPointer: fieldIndex ofObject: receiver)

Interpreter>>fetchPointer: fieldIndex ofObject: oop
  ^ self longAt: oop + BaseHeaderSize + (fieldIndex * BytesPerWord)




© Adrian Lienhard                                                 17
Message Sending Bytecode Routine


Example: bytecode <E0> send: foo

1. find selector, receiver and its class
2. lookup message in the classʼ method dictionary
3. if method not found, repeat this lookup in successive
    superclasses; if superclass is nil, instead send
    #doesNotUnderstand:
4. create a new method context and set it up
5. activate the context and start executing the instructions
    in the new method


© Adrian Lienhard                                              18
Message Sending Bytecode Routine


    Example: bytecode <E0> send: foo
   Interpreter>>sendLiteralSelectorBytecode
     selector := self literal: (currentBytcode bitAnd: 16rF).
     argumentCount := ((currentBytecode >> 4) bitAnd: 3) - 1.
     rcvr := self stackValue: argumentCount.
     class := self fetchClassOf: rcvr.
     self findNewMethod.
     self executeNewMethod.
     self fetchNewBytecode

                                          E0(hex) = 224(dec)
                                             = 1110 0000(bin)
    This routine (bytecodes 208-255)
    can use any of the first 16 literals   E0 AND F = 0
    and pass up to 2 arguments               => literal frame at 0

                                          ((E0 >> 4) AND 3) - 1 = 1
                                             => 1 argument

© Adrian Lienhard                                                     19
Primitives



Primitive methods trigger a VM routine      ProtoObject>>nextObject
and are executed without a new                <primitive: 139>
                                              self primitiveFailed
method context unless they fail

>   Improve performance (arithmetics, at:, at:put:, ...)
>   Do work that can only be done in VM (new object creation,
    process manipulation, become, ...)
>   Interface with outside world (keyboard input, networking, ...)
>   Interact with VM plugins (named primitives)




© Adrian Lienhard                                                     20
Roadmap




>     Introduction
>     The Heap Store
>     Interpreter
>     Automatic Memory Management
>     Threading System
>     Optimizations



© Adrian Lienhard                   21
Automatic Memory Management



                    Tell when an object is no longer used
                    and then recycle the memory




               Challenges                 – Small predictable pauses
               – Fast allocation          – Scalable to large heaps
               – Fast program execution   – Minimal space usage


© Adrian Lienhard                                                      22
Main Approaches




                1. Reference Counting

                2. Mark and Sweep




© Adrian Lienhard                       23
Reference Counting GC


Idea
> For each store operation increment count field in
   header of newly stored object
> Decrement if object is overwritten
> If count is 0, collect object and decrement the counter of
   each object it pointed to

Problems
> Run-time overhead of counting (particularly on stack)
> Inability to detect cycles (need additional GC technique)


© Adrian Lienhard                                              24
Reference Counting GC




© Adrian Lienhard       25
Mark and Sweep GC


Idea
> Suspend current process
> Mark phase: trace each accessible object leaving a
   mark in the object header (start at known root objects)
> Sweep phase: all objects with no mark are collected
> Remove all marks and resume current process


Problems
> Need to “stop the world”
> Slow for large heaps generational collectors
> Fragmentation compacting collectors

© Adrian Lienhard                                            26
Mark and Sweep GC




© Adrian Lienhard   27
Generational Collectors


                    Most new objects live very short lives,
                    most older objects live forever [Ungar 87]

Idea
> Partition objects in generations
> Create objects in young generation
> Tenuring: move live objects from young to old generation
> Incremental GC: frequently collect young generation (very fast)
> Full GC: infrequently collect young+old generation (slow)



Difficulty
> Need to track pointers from old to new space


© Adrian Lienhard                                                   28
Generational Collectors: Remembered Set


 Write barrier: remember objects with old-young pointers:
 > On each store check whether
     storee (object2) is young and       object1.f := object2
     storand (object1) is old
 > If true, add storand to remembered set
 > When marking young generation, use objects in remembered set
     as additional roots




© Adrian Lienhard                                                 29
Compacting Collectors


Idea
> During the sweep phase all live objects are packed to
   the beginning of the heap
> Simplifies allocation since free space is in one
   contiguous block

Challenge
> Adjust all pointers of moved objects
      – object references on the heap
      – pointer variables of the interpreter!


© Adrian Lienhard                                         30
The Pharo GC




        Pharo: mark and sweep compacting collector
        with two generations

        – Cooperative, i.e., not concurrent
        – Single threaded




© Adrian Lienhard                                    31
When Does the GC Run?



     – Incremental GC on allocation count or memory needs
     – Full GC on memory needs
     – Tenure objects if survivor threshold exceeded

           “Incremental GC after this many allocations”
           SmalltalkImage current vmParameterAt: 5           4000

           “Tenure when more than this many objects survive”
           SmalltalkImage current vmParameterAt: 6           2000




© Adrian Lienhard                                                   32
VM Memory Statistics


SmalltalkImage current
   vmStatisticsReportString

       memory               26,798,948 bytes
                    old     22,604,668 bytes (84.3%)
                    young   52,060 bytes (0.2%)
                    used    22,656,728 bytes (84.5%)
                    free    4,142,220 bytes (15.5%)

       GCs                  25,227 (78ms between GCs)
                    full    8 totalling 682ms (0.0% uptime), avg 85.3ms
                    incr    25219 totalling 6,005ms (0.3% uptime), avg 0.2ms
                    tenures 1,564 (avg 16 GCs/tenure)

       Since last view      326 (79ms between GCs)
                uptime      25.7s
                full        1 totalling 106ms (0.4% uptime), avg 106.0ms
                incr        325 totalling 111ms (0.4% uptime), avg 0.3ms
                tenures     2 (avg 162 GCs/tenure)



© Adrian Lienhard                                                              33
Memory System API


 “Force GC”
 Smalltalk garbageCollectMost
 Smalltalk garbageCollect

 “Is object in remembered set, is it young?”
 Smalltalk rootTable includes: anObject
 Smalltalk isYoung: anObject

 “Various settings and statistics”
 SmalltalkImage current getVMParameters

 ”Do an incremental GC after this many allocations"
 SmalltalkImage current vmParameterAt: 5 put: 4000.
 ”Tenure when more than this many objects survive the GC"
 SmalltalkImage current vmParameterAt: 6 put: 2000.
 ”Grow/shrink headroom"
 SmalltalkImage current vmParameterAt: 25 put: 4*1024*1024.
 SmalltalkImage current vmParameterAt: 24 put: 8*1024*1024.


© Adrian Lienhard                                             34
Finding Memory Leaks


I have objects that do not get collected. Whatʼs wrong?

 – maybe object is just not GCed yet (force a full GC!)
 – find the objects and then explore who references them

PointerFinder finds a path
from a root to some object
PointerFinder on:
   AssignmentNode someInstance

PointerExplorer new
   openExplorerFor:
   AssignmentNode someInstance

 © Adrian Lienhard                                        35
Roadmap




>     Introduction
>     The heap store
>     Interpreter
>     Automatic memory management
>     Threading System
>     Optimizations



© Adrian Lienhard                   36
Threading System



Multithreading is the ability to create concurrently
running “processes”

Non-native threads (green threads)
      – Only one native thread used by the VM
      – Simpler to implement and easier to port


Native threads
      – Using the native thread system provided by the OS
      – Potentially higher performance


© Adrian Lienhard                                           37
Pharo: Green Threads




Each process has its own execution stack, ip, sp, ...

There is always one (and only one) running process

Each process behaves as if it owns the entire VM

Each process can be interrupted (context switching)




© Adrian Lienhard                                       38
Representing Processes and Run Queues




© Adrian Lienhard                       39
Context Switching



Interpreter>>transferTo: newProcess
1. store the current ip and sp registers to the current context
2. store the current context in the old processʼ suspendedContext
3. change Processor to point to newProcess
4. load ip and sp registers from new processʼ suspendedContext




                              When you perform a context switch,
                              which process should run next?


 © Adrian Lienhard                                                  40
Process Scheduler


>     Cooperative between processes of the same priority
>     Preemptive between processes of different priorities

Context is switched to the first process with highest priority when:
   – current process waits on a semaphore
   – current process is suspended or terminated
   – Processor yield is sent
Context is switched if the following process has a higher priority:
   – process is resumed or created by another process
   – process is resumed from a signaled semaphore

When a process is interrupted, it moves to the back of its run queue


© Adrian Lienhard                                                      41
Example: Semaphores and Scheduling



           here := false.
           lock := Semaphore forMutualExclusion.
           [lock critical: [here := true]] fork.
           lock critical: [
             self assert: here not.
             Processor yield.
             self assert: here not].
           Processor yield.
           self assert: here               When is the forked
                                            process activated?




© Adrian Lienhard                                                42
Roadmap




>     Introduction
>     The Heap Store
>     Interpreter
>     Automatic Memory Management
>     Threading System
>     Optimizations



© Adrian Lienhard                   43
Many Optimizations...


>     Method cache for faster lookup: receiver's class + method selector
>     Method context cache (as much as 80% of objects created are
      context objects!)

>     Interpreter loop: 256 way case statement to dispatch bytecodes

>     Quick returns: methods that simply return a variable or known
      constant are compiled as a primitive method

>     Small integers are tagged pointers: value is directly encoded in field
      references. Pointer is tagged with low-order bit equal to 1. The
      remaining 31 bit encode the signed integer value.
>     ...

© Adrian Lienhard                                                             44
Optimization: JIT (not in Pharo)


Idea of Just In Time Compilation
> Translate unit (method, loop, ...) into native machine code at runtime
> Store native code in a buffer on the heap

Challenges
> Run-time overhead of compilation
> Machine code takes a lot of space (4-8x compared to bytecode)
> Deoptimization is very tricky



Adaptive compilation: gather statistics to compile only units that
are heavily used (hot spots)


© Adrian Lienhard                                                          45
References


> Virtual Machines, Iain D. Craig, Springer, 2006

> Back to the Future – The Story of Squeak, A Practical Smalltalk
Written in Itself, Ingalls, Kaehler, Maloney, Wallace, Kay, OOPSLA ʻ97
> Smalltalk-80, the Language and Its Implementation (the Blue Book),
Goldberg, Robson, Addison-Wesley, ʻ83
http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf
> The Java Virtual Machine Specification, Second Edition,
http://java.sun.com/docs/books/jvms/
> Stacking them up: a Comparison of Virtual Machines, Gough, IEEEʻ01

> Virtual Machine Showdown: Stack Versus Registers, Shi, Gregg,
Beatty, Ertl, VEEʼ05


© Adrian Lienhard                                                        46
What you should know!



✎   What is the difference between the operand stack and
    the execution stack?
✎   How do bytecode routines and primitives differ?
✎   Why is the object format encoded in a complicated 4bit
    pattern instead of using regular boolean values?
✎   Why is the object address not suitable as a hash value?
✎   What happens if an object is only weakly referenced?
✎   Why is it hard to build a concurrent mark sweep GC?
✎   What does cooperative multithreading mean?
✎   How do you protect code from concurrent execution?

© Adrian Lienhard                                             47
Can you answer these questions?



✎    There is a lot of similarity between VM and OS design.
     What are the common components?
✎    Why is accessing the 16th instance variable of an object
     more efficient than the 17th?
✎    Which disastrous situation could occur if a local C
     pointer variable exists when a new object is allocated?
✎    Why does #allObjectsDo: not include small integers?
✎    What is the largest possible small integer?




© Adrian Lienhard                                               48
License

      http://creativecommons.org/licenses/by-sa/3.0/




                                Attribution-ShareAlike 3.0 Unported
    You are free:
         to Share — to copy, distribute and transmit the work
         to Remix — to adapt the work

    Under the following conditions:
         Attribution. You must attribute the work in the manner specified by the author or
         licensor (but not in any way that suggests that they endorse you or your use of the
         work).
         Share Alike. If you alter, transform, or build upon this work, you may distribute the
         resulting work only under the same, similar or a compatible license.
    For any reuse or distribution, you must make clear to others the license terms of this work.
      The best way to do this is with a link to this web page.
    Any of the above conditions can be waived if you get permission from the copyright holder.
    Nothing in this license impairs or restricts the author's moral rights.

© Adrian Lienhard                                                                                  1.49

Weitere ähnliche Inhalte

Was ist angesagt?

Objective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central DispatchObjective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central DispatchMatteo Battaglio
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4Max Kleiner
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twistedsdsern
 
06 - Qt Communication
06 - Qt Communication06 - Qt Communication
06 - Qt CommunicationAndreas Jakl
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance TuningMinh Hoang
 
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....AboutYouGmbH
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPrashant Rane
 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblatchiportal
 
Inside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGInside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGSylvain Wallez
 
What Makes Objective C Dynamic?
What Makes Objective C Dynamic?What Makes Objective C Dynamic?
What Makes Objective C Dynamic?Kyle Oba
 
Qt Framework Events Signals Threads
Qt Framework Events Signals ThreadsQt Framework Events Signals Threads
Qt Framework Events Signals ThreadsNeera Mital
 
Effective java - concurrency
Effective java - concurrencyEffective java - concurrency
Effective java - concurrencyfeng lee
 
Threading in iOS / Cocoa Touch
Threading in iOS / Cocoa TouchThreading in iOS / Cocoa Touch
Threading in iOS / Cocoa Touchmobiledeveloperpl
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Max Kleiner
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?Doug Hawkins
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisRuslan Shevchenko
 

Was ist angesagt? (20)

Objective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central DispatchObjective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central Dispatch
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twisted
 
Runtime
RuntimeRuntime
Runtime
 
06 - Qt Communication
06 - Qt Communication06 - Qt Communication
06 - Qt Communication
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
 
Cp7 rpc
Cp7 rpcCp7 rpc
Cp7 rpc
 
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
NodeJS: an Introduction
NodeJS: an IntroductionNodeJS: an Introduction
NodeJS: an Introduction
 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblat
 
Inside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGInside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUG
 
What Makes Objective C Dynamic?
What Makes Objective C Dynamic?What Makes Objective C Dynamic?
What Makes Objective C Dynamic?
 
8 - OOP - Syntax & Messages
8 - OOP - Syntax & Messages8 - OOP - Syntax & Messages
8 - OOP - Syntax & Messages
 
Qt Framework Events Signals Threads
Qt Framework Events Signals ThreadsQt Framework Events Signals Threads
Qt Framework Events Signals Threads
 
Effective java - concurrency
Effective java - concurrencyEffective java - concurrency
Effective java - concurrency
 
Threading in iOS / Cocoa Touch
Threading in iOS / Cocoa TouchThreading in iOS / Cocoa Touch
Threading in iOS / Cocoa Touch
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
 

Andere mochten auch

Technologische trends voor journalistiek
Technologische trends voor journalistiekTechnologische trends voor journalistiek
Technologische trends voor journalistiekBart Van Belle
 
201103 emotional impacts on digital media
201103 emotional impacts on digital media201103 emotional impacts on digital media
201103 emotional impacts on digital mediaJavier Gonzalez-Sanchez
 
漫谈php和java
漫谈php和java漫谈php和java
漫谈php和javasulong
 
Lowering barriers to publishing biological data on the web
Lowering barriers to publishing biological data on the webLowering barriers to publishing biological data on the web
Lowering barriers to publishing biological data on the webBrad Chapman
 
Harris & Clark + IceMilk Aprons
Harris & Clark + IceMilk ApronsHarris & Clark + IceMilk Aprons
Harris & Clark + IceMilk ApronsIceMilk Aprons
 
Slides boekpresentatie 'Sociale Media en Journalistiek'
Slides boekpresentatie 'Sociale Media en Journalistiek'Slides boekpresentatie 'Sociale Media en Journalistiek'
Slides boekpresentatie 'Sociale Media en Journalistiek'Bart Van Belle
 
Chapter 12
Chapter 12Chapter 12
Chapter 12dphil002
 
2009 04 москва, совазс
2009 04 москва, совазс2009 04 москва, совазс
2009 04 москва, совазсTelemark
 
Itf ipp ch10_2012_final
Itf ipp ch10_2012_finalItf ipp ch10_2012_final
Itf ipp ch10_2012_finaldphil002
 
Login Seminars Blackboard Directions 2009
Login Seminars Blackboard Directions 2009Login Seminars Blackboard Directions 2009
Login Seminars Blackboard Directions 2009Ohio LETC
 

Andere mochten auch (20)

Monaco 020909
Monaco 020909Monaco 020909
Monaco 020909
 
Technologische trends voor journalistiek
Technologische trends voor journalistiekTechnologische trends voor journalistiek
Technologische trends voor journalistiek
 
007 014 belcaro corrige
007 014 belcaro corrige007 014 belcaro corrige
007 014 belcaro corrige
 
Eprotect
EprotectEprotect
Eprotect
 
201103 emotional impacts on digital media
201103 emotional impacts on digital media201103 emotional impacts on digital media
201103 emotional impacts on digital media
 
201506 CSE340 Lecture 09
201506 CSE340 Lecture 09201506 CSE340 Lecture 09
201506 CSE340 Lecture 09
 
漫谈php和java
漫谈php和java漫谈php和java
漫谈php和java
 
Week9
Week9Week9
Week9
 
201506 CSE340 Lecture 16
201506 CSE340 Lecture 16201506 CSE340 Lecture 16
201506 CSE340 Lecture 16
 
201506 CSE340 Lecture 22
201506 CSE340 Lecture 22201506 CSE340 Lecture 22
201506 CSE340 Lecture 22
 
Lowering barriers to publishing biological data on the web
Lowering barriers to publishing biological data on the webLowering barriers to publishing biological data on the web
Lowering barriers to publishing biological data on the web
 
Eddie Slide Show
Eddie Slide ShowEddie Slide Show
Eddie Slide Show
 
199912 outsight
199912 outsight199912 outsight
199912 outsight
 
Harris & Clark + IceMilk Aprons
Harris & Clark + IceMilk ApronsHarris & Clark + IceMilk Aprons
Harris & Clark + IceMilk Aprons
 
Slides boekpresentatie 'Sociale Media en Journalistiek'
Slides boekpresentatie 'Sociale Media en Journalistiek'Slides boekpresentatie 'Sociale Media en Journalistiek'
Slides boekpresentatie 'Sociale Media en Journalistiek'
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
2009 04 москва, совазс
2009 04 москва, совазс2009 04 москва, совазс
2009 04 москва, совазс
 
201506 CSE340 Lecture 23
201506 CSE340 Lecture 23201506 CSE340 Lecture 23
201506 CSE340 Lecture 23
 
Itf ipp ch10_2012_final
Itf ipp ch10_2012_finalItf ipp ch10_2012_final
Itf ipp ch10_2012_final
 
Login Seminars Blackboard Directions 2009
Login Seminars Blackboard Directions 2009Login Seminars Blackboard Directions 2009
Login Seminars Blackboard Directions 2009
 

Ähnlich wie Virtual Machines Lecture

2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)JiandSon
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UKStorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UKStorageOS
 
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)Maarten Balliauw
 
Docker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use CasesDocker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use CasesPhil Estes
 
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote ShellcodeAj MaChInE
 
2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...
2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...
2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...chen yuki
 
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)Laurent Leturgez
 
Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...Black Duck by Synopsys
 
Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...Tim Mackey
 
How to write clean & testable code without losing your mind
How to write clean & testable code without losing your mindHow to write clean & testable code without losing your mind
How to write clean & testable code without losing your mindAndreas Czakaj
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013dotCloud
 
LXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryLXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryDocker, Inc.
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012DefCamp
 
Advanced Windows Debugging
Advanced Windows DebuggingAdvanced Windows Debugging
Advanced Windows DebuggingBala Subra
 
Android asynchronous programming
Android asynchronous programmingAndroid asynchronous programming
Android asynchronous programmingNhan Cao
 
Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012Joe Arnold
 
Object Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypassObject Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypassSam Thomas
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortStefan Marr
 

Ähnlich wie Virtual Machines Lecture (20)

12 virtualmachine
12 virtualmachine12 virtualmachine
12 virtualmachine
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UKStorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
 
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
 
Docker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use CasesDocker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use Cases
 
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
 
2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...
2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...
2013 syscan360 yuki_chen_syscan360_exploit your java native vulnerabilities o...
 
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
 
Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...
 
Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...Using hypervisor and container technology to increase datacenter security pos...
Using hypervisor and container technology to increase datacenter security pos...
 
How to write clean & testable code without losing your mind
How to write clean & testable code without losing your mindHow to write clean & testable code without losing your mind
How to write clean & testable code without losing your mind
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013
 
LXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryLXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software Delivery
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
 
Advanced Windows Debugging
Advanced Windows DebuggingAdvanced Windows Debugging
Advanced Windows Debugging
 
Android asynchronous programming
Android asynchronous programmingAndroid asynchronous programming
Android asynchronous programming
 
Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012
 
Object Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypassObject Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypass
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 

Mehr von lienhard

Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptlienhard
 
Flow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time DebuggingFlow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time Debugginglienhard
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysislienhard
 
Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)lienhard
 
Rapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using MondrianRapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using Mondrianlienhard
 
Tracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature DependenciesTracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature Dependencieslienhard
 
Practical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time DebuggingPractical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time Debugginglienhard
 
Test Blueprints
Test BlueprintsTest Blueprints
Test Blueprintslienhard
 
Object Flow Analysis
Object Flow AnalysisObject Flow Analysis
Object Flow Analysislienhard
 
Identifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept AnalysisIdentifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept Analysislienhard
 

Mehr von lienhard (11)

Chicken
ChickenChicken
Chicken
 
Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScript
 
Flow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time DebuggingFlow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time Debugging
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)
 
Rapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using MondrianRapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using Mondrian
 
Tracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature DependenciesTracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature Dependencies
 
Practical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time DebuggingPractical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time Debugging
 
Test Blueprints
Test BlueprintsTest Blueprints
Test Blueprints
 
Object Flow Analysis
Object Flow AnalysisObject Flow Analysis
Object Flow Analysis
 
Identifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept AnalysisIdentifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept Analysis
 

Kürzlich hochgeladen

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Kürzlich hochgeladen (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Virtual Machines Lecture

  • 1. Virtual Machines Guest lecture — Adrian Lienhard
  • 2. Birds-eye view A virtual machine is an abstract computing architecture supporting a programming language in a hardware-independent fashion Z1, 1938 © Adrian Lienhard 1.2
  • 3. Roadmap > Introduction > The Heap Store > Interpreter > Automatic Memory Management > Threading System > Optimizations © Adrian Lienhard 3
  • 4. Implementing a Programming Language © Adrian Lienhard 4
  • 5. How are VMs implemented? Typically using an efficient and portable language such as C, C++, or assembly code Pharo VM platform-independent part written in Slang: – subset of Smalltalk, translated to C – core: 600 methods or 8k LOC in Slang – Slang allows one to simulate VM in Smalltalk © Adrian Lienhard 5
  • 6. Main Components of a VM The Heap Store Interpreter Automatic Memory Management Threading System © Adrian Lienhard 6
  • 7. Pros and Cons of the VM Approach Pros > Platform independence of application code “Write once, run anywhere” > Simpler programming model > Security > Optimizations for different hardware architectures Cons > Execution overhead > Not suitable for system programming © Adrian Lienhard 7
  • 8. Roadmap > Introduction > The Heap Store > Interpreter > Automatic Memory Management > Threading System > Optimizations © Adrian Lienhard 8
  • 9. Object Memory Layout 32-bit direct-pointer scheme Reality is more complex: – 1-word header for instances of compact classes – 2-word header for normal objects – 3-word header for large objects © Adrian Lienhard 9
  • 10. Different Object Formats > fixed pointer fields > indexable types: – indexable pointer fields (e.g., Array) – indexable weak pointer fields (e.g., WeakArray) – indexable word fields (e.g., Bitmap) – indexable byte fields (e.g., ByteString) Object format (4bit) 0 no fields 1 fixed fields only 2 indexable pointer fields only 3 both fixed and indexable pointer fields 4 both fixed and indexable weak fields 6 indexable word fields only 8-11 indexable byte fields only 12-15 ... © Adrian Lienhard 10
  • 11. Iterating Over All Objects in Memory “Answer the first object on the heap” anObject someObject “Answer the next object on the heap” Excludes small anObject nextObject integers! SystemNavigation>>allObjectsDo: aBlock | object endMarker | object := self someObject. endMarker := Object new. [endMarker == object] whileFalse: [aBlock value: object. object := object nextObject] © Adrian Lienhard 11
  • 12. Roadmap > Introduction > The Heap Store > Interpreter > Automatic Memory Management > Threading System > Optimizations © Adrian Lienhard 12
  • 13. Stack vs. Register VMs VM provides a virtual processor that interprets bytecode instructions Stack machines – Smalltalk, Java and most other VMs – Simple to implement for different hardware architectures Register machines – only few register VMs, e.g., Parrot VM (Perl6) – potentially faster than stack machines © Adrian Lienhard 13
  • 14. Interpreter State and Loop Interpreter state – instruction pointer (ip): points to current bytecode – stack pointer (sp): topmost item in the operand stack – current active method or block context – current active receiver and method Interpreter loop 1. branch to appropriate bytecode routine 2. fetch next bytecode 3. increment instruction pointer 4. execute the bytecode routine 5. return to 1. © Adrian Lienhard 14
  • 15. Method Contexts method header: – primitive index – number of args – number of temps – large context flag – number of literals © Adrian Lienhard 15
  • 16. Stack Manipulating Bytecode Routine Example: bytecode <70> self Interpreter>>pushReceiverBytecode self fetchNextBytecode. self push: receiver Interpreter>>push: anObject sp := sp + BytesPerWord. self longAt: sp put: anObject © Adrian Lienhard 16
  • 17. Stack Manipulating Bytecode Routine Example: bytecode <01> pushRcvr: 1 Interpreter>>pushReceiverVariableBytecode self fetchNextBytecode. self pushReceiverVariable: (currentBytecode bitAnd: 16rF) Interpreter>>pushReceiverVariable: fieldIndex self push: ( self fetchPointer: fieldIndex ofObject: receiver) Interpreter>>fetchPointer: fieldIndex ofObject: oop ^ self longAt: oop + BaseHeaderSize + (fieldIndex * BytesPerWord) © Adrian Lienhard 17
  • 18. Message Sending Bytecode Routine Example: bytecode <E0> send: foo 1. find selector, receiver and its class 2. lookup message in the classʼ method dictionary 3. if method not found, repeat this lookup in successive superclasses; if superclass is nil, instead send #doesNotUnderstand: 4. create a new method context and set it up 5. activate the context and start executing the instructions in the new method © Adrian Lienhard 18
  • 19. Message Sending Bytecode Routine Example: bytecode <E0> send: foo Interpreter>>sendLiteralSelectorBytecode selector := self literal: (currentBytcode bitAnd: 16rF). argumentCount := ((currentBytecode >> 4) bitAnd: 3) - 1. rcvr := self stackValue: argumentCount. class := self fetchClassOf: rcvr. self findNewMethod. self executeNewMethod. self fetchNewBytecode E0(hex) = 224(dec) = 1110 0000(bin) This routine (bytecodes 208-255) can use any of the first 16 literals E0 AND F = 0 and pass up to 2 arguments => literal frame at 0 ((E0 >> 4) AND 3) - 1 = 1 => 1 argument © Adrian Lienhard 19
  • 20. Primitives Primitive methods trigger a VM routine ProtoObject>>nextObject and are executed without a new <primitive: 139> self primitiveFailed method context unless they fail > Improve performance (arithmetics, at:, at:put:, ...) > Do work that can only be done in VM (new object creation, process manipulation, become, ...) > Interface with outside world (keyboard input, networking, ...) > Interact with VM plugins (named primitives) © Adrian Lienhard 20
  • 21. Roadmap > Introduction > The Heap Store > Interpreter > Automatic Memory Management > Threading System > Optimizations © Adrian Lienhard 21
  • 22. Automatic Memory Management Tell when an object is no longer used and then recycle the memory Challenges – Small predictable pauses – Fast allocation – Scalable to large heaps – Fast program execution – Minimal space usage © Adrian Lienhard 22
  • 23. Main Approaches 1. Reference Counting 2. Mark and Sweep © Adrian Lienhard 23
  • 24. Reference Counting GC Idea > For each store operation increment count field in header of newly stored object > Decrement if object is overwritten > If count is 0, collect object and decrement the counter of each object it pointed to Problems > Run-time overhead of counting (particularly on stack) > Inability to detect cycles (need additional GC technique) © Adrian Lienhard 24
  • 25. Reference Counting GC © Adrian Lienhard 25
  • 26. Mark and Sweep GC Idea > Suspend current process > Mark phase: trace each accessible object leaving a mark in the object header (start at known root objects) > Sweep phase: all objects with no mark are collected > Remove all marks and resume current process Problems > Need to “stop the world” > Slow for large heaps generational collectors > Fragmentation compacting collectors © Adrian Lienhard 26
  • 27. Mark and Sweep GC © Adrian Lienhard 27
  • 28. Generational Collectors Most new objects live very short lives, most older objects live forever [Ungar 87] Idea > Partition objects in generations > Create objects in young generation > Tenuring: move live objects from young to old generation > Incremental GC: frequently collect young generation (very fast) > Full GC: infrequently collect young+old generation (slow) Difficulty > Need to track pointers from old to new space © Adrian Lienhard 28
  • 29. Generational Collectors: Remembered Set Write barrier: remember objects with old-young pointers: > On each store check whether storee (object2) is young and object1.f := object2 storand (object1) is old > If true, add storand to remembered set > When marking young generation, use objects in remembered set as additional roots © Adrian Lienhard 29
  • 30. Compacting Collectors Idea > During the sweep phase all live objects are packed to the beginning of the heap > Simplifies allocation since free space is in one contiguous block Challenge > Adjust all pointers of moved objects – object references on the heap – pointer variables of the interpreter! © Adrian Lienhard 30
  • 31. The Pharo GC Pharo: mark and sweep compacting collector with two generations – Cooperative, i.e., not concurrent – Single threaded © Adrian Lienhard 31
  • 32. When Does the GC Run? – Incremental GC on allocation count or memory needs – Full GC on memory needs – Tenure objects if survivor threshold exceeded “Incremental GC after this many allocations” SmalltalkImage current vmParameterAt: 5 4000 “Tenure when more than this many objects survive” SmalltalkImage current vmParameterAt: 6 2000 © Adrian Lienhard 32
  • 33. VM Memory Statistics SmalltalkImage current vmStatisticsReportString memory 26,798,948 bytes old 22,604,668 bytes (84.3%) young 52,060 bytes (0.2%) used 22,656,728 bytes (84.5%) free 4,142,220 bytes (15.5%) GCs 25,227 (78ms between GCs) full 8 totalling 682ms (0.0% uptime), avg 85.3ms incr 25219 totalling 6,005ms (0.3% uptime), avg 0.2ms tenures 1,564 (avg 16 GCs/tenure) Since last view 326 (79ms between GCs) uptime 25.7s full 1 totalling 106ms (0.4% uptime), avg 106.0ms incr 325 totalling 111ms (0.4% uptime), avg 0.3ms tenures 2 (avg 162 GCs/tenure) © Adrian Lienhard 33
  • 34. Memory System API “Force GC” Smalltalk garbageCollectMost Smalltalk garbageCollect “Is object in remembered set, is it young?” Smalltalk rootTable includes: anObject Smalltalk isYoung: anObject “Various settings and statistics” SmalltalkImage current getVMParameters ”Do an incremental GC after this many allocations" SmalltalkImage current vmParameterAt: 5 put: 4000. ”Tenure when more than this many objects survive the GC" SmalltalkImage current vmParameterAt: 6 put: 2000. ”Grow/shrink headroom" SmalltalkImage current vmParameterAt: 25 put: 4*1024*1024. SmalltalkImage current vmParameterAt: 24 put: 8*1024*1024. © Adrian Lienhard 34
  • 35. Finding Memory Leaks I have objects that do not get collected. Whatʼs wrong? – maybe object is just not GCed yet (force a full GC!) – find the objects and then explore who references them PointerFinder finds a path from a root to some object PointerFinder on: AssignmentNode someInstance PointerExplorer new openExplorerFor: AssignmentNode someInstance © Adrian Lienhard 35
  • 36. Roadmap > Introduction > The heap store > Interpreter > Automatic memory management > Threading System > Optimizations © Adrian Lienhard 36
  • 37. Threading System Multithreading is the ability to create concurrently running “processes” Non-native threads (green threads) – Only one native thread used by the VM – Simpler to implement and easier to port Native threads – Using the native thread system provided by the OS – Potentially higher performance © Adrian Lienhard 37
  • 38. Pharo: Green Threads Each process has its own execution stack, ip, sp, ... There is always one (and only one) running process Each process behaves as if it owns the entire VM Each process can be interrupted (context switching) © Adrian Lienhard 38
  • 39. Representing Processes and Run Queues © Adrian Lienhard 39
  • 40. Context Switching Interpreter>>transferTo: newProcess 1. store the current ip and sp registers to the current context 2. store the current context in the old processʼ suspendedContext 3. change Processor to point to newProcess 4. load ip and sp registers from new processʼ suspendedContext When you perform a context switch, which process should run next? © Adrian Lienhard 40
  • 41. Process Scheduler > Cooperative between processes of the same priority > Preemptive between processes of different priorities Context is switched to the first process with highest priority when: – current process waits on a semaphore – current process is suspended or terminated – Processor yield is sent Context is switched if the following process has a higher priority: – process is resumed or created by another process – process is resumed from a signaled semaphore When a process is interrupted, it moves to the back of its run queue © Adrian Lienhard 41
  • 42. Example: Semaphores and Scheduling here := false. lock := Semaphore forMutualExclusion. [lock critical: [here := true]] fork. lock critical: [ self assert: here not. Processor yield. self assert: here not]. Processor yield. self assert: here When is the forked process activated? © Adrian Lienhard 42
  • 43. Roadmap > Introduction > The Heap Store > Interpreter > Automatic Memory Management > Threading System > Optimizations © Adrian Lienhard 43
  • 44. Many Optimizations... > Method cache for faster lookup: receiver's class + method selector > Method context cache (as much as 80% of objects created are context objects!) > Interpreter loop: 256 way case statement to dispatch bytecodes > Quick returns: methods that simply return a variable or known constant are compiled as a primitive method > Small integers are tagged pointers: value is directly encoded in field references. Pointer is tagged with low-order bit equal to 1. The remaining 31 bit encode the signed integer value. > ... © Adrian Lienhard 44
  • 45. Optimization: JIT (not in Pharo) Idea of Just In Time Compilation > Translate unit (method, loop, ...) into native machine code at runtime > Store native code in a buffer on the heap Challenges > Run-time overhead of compilation > Machine code takes a lot of space (4-8x compared to bytecode) > Deoptimization is very tricky Adaptive compilation: gather statistics to compile only units that are heavily used (hot spots) © Adrian Lienhard 45
  • 46. References > Virtual Machines, Iain D. Craig, Springer, 2006 > Back to the Future – The Story of Squeak, A Practical Smalltalk Written in Itself, Ingalls, Kaehler, Maloney, Wallace, Kay, OOPSLA ʻ97 > Smalltalk-80, the Language and Its Implementation (the Blue Book), Goldberg, Robson, Addison-Wesley, ʻ83 http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf > The Java Virtual Machine Specification, Second Edition, http://java.sun.com/docs/books/jvms/ > Stacking them up: a Comparison of Virtual Machines, Gough, IEEEʻ01 > Virtual Machine Showdown: Stack Versus Registers, Shi, Gregg, Beatty, Ertl, VEEʼ05 © Adrian Lienhard 46
  • 47. What you should know! ✎ What is the difference between the operand stack and the execution stack? ✎ How do bytecode routines and primitives differ? ✎ Why is the object format encoded in a complicated 4bit pattern instead of using regular boolean values? ✎ Why is the object address not suitable as a hash value? ✎ What happens if an object is only weakly referenced? ✎ Why is it hard to build a concurrent mark sweep GC? ✎ What does cooperative multithreading mean? ✎ How do you protect code from concurrent execution? © Adrian Lienhard 47
  • 48. Can you answer these questions? ✎ There is a lot of similarity between VM and OS design. What are the common components? ✎ Why is accessing the 16th instance variable of an object more efficient than the 17th? ✎ Which disastrous situation could occur if a local C pointer variable exists when a new object is allocated? ✎ Why does #allObjectsDo: not include small integers? ✎ What is the largest possible small integer? © Adrian Lienhard 48
  • 49. License http://creativecommons.org/licenses/by-sa/3.0/ Attribution-ShareAlike 3.0 Unported You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this license impairs or restricts the author's moral rights. © Adrian Lienhard 1.49