Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Virtual Machines: Down the Rabbit Hole
Search
Josep M. Bach (Txus)
June 06, 2013
Technology
1
210
Virtual Machines: Down the Rabbit Hole
Talk given at the Ruby User Group meeting in Berlin.
Josep M. Bach (Txus)
June 06, 2013
Tweet
Share
More Decks by Josep M. Bach (Txus)
See All by Josep M. Bach (Txus)
The Power of Small Abstractions
txus
1
220
Monadic Ruby
txus
1
110
Programming the Future
txus
0
120
C - The Revolution In Systems Programming
txus
3
250
Revolver - programmers are expendable
txus
0
200
Being Matz for a day
txus
1
140
Fuby - Functional Ruby
txus
2
810
Building a Clojure webservice in 10 minutes
txus
7
4.6k
Polyglot Rails Applications in Rubinius
txus
3
530
Other Decks in Technology
See All in Technology
ドメイン名の終活について - JPAAWG 7th -
mikit
31
18k
20241108_CS_LLMMT
shigashiyama
0
250
AI長期記憶システム構築のための LLMマルチエージェントの取り組み / Awarefy-LLM-Multi-Agent
iktakahiro
2
350
データ活用促進のためのデータ分析基盤の進化
takumakouno
2
490
SREの組織類型に応じた リーダシップの考察
kenta_hi
PRO
1
630
Datachain会社紹介資料(2024年11月) / Company Deck
datachain
4
17k
Oracle Cloud World 2024 GoldenGateプラットフォームの戦略について
oracle4engineer
PRO
0
120
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
230
私はこうやってマインドマップでテストすることを出す!
mineo_matsuya
0
220
Microsoft Intune アプリのトラブルシューティング
sophiakunii
1
410
Microsoft MVPになる前、なってから/Fukuoka_Tech_Women_Community_1_baba
nina01
0
180
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
0
1.6k
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
820
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Code Reviewing Like a Champion
maltzj
520
39k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Teambox: Starting and Learning
jrom
133
8.8k
Unsuck your backbone
ammeep
668
57k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Transcript
Virtual Machines DOWN THE RABBIT HOLE Ruby USER GROUP BERLIN
6. JUNE 2013
TXUSTICE
None
POLITICAL SCIENCE DROPOUT
DON'T TRUST A WORDI SAY
BARCELONA / BERLIN =>
PROCESS VIRTUAL MACHINES
WHY oh why
WHY oh why Portability
WHY oh why Portability PERFORMANCE
WHY oh why PELICAN
wat
SOURCE CODE puts "hello world"
SOURCE CODE puts "hello world" AST send self puts hello
world
SOURCE CODE puts "hello world" AST send self puts hello
world BYTECODE PUSH_SELF PUSH "puts" PUSH "hello world" CALL 1
COMPALER
COMPILER
BUT HOW DOES A VM LOOK LIKE?
HUGE-ASS CASE STATEMENT
STACK PUSH 2 PUSH 3 ADD PROGRAM IP 2 *
3
2 STACK PUSH 2 PUSH 3 ADD PROGRAM IP 2
* 3
3 2 STACK PUSH 2 PUSH 3 ADD PROGRAM IP
2 * 3
5 STACK PUSH 2 PUSH 3 ADD PROGRAM IP 2
* 3
STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2 CALL 2
PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
<SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2 CALL
2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
"puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2
CALL 2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
BABY DUCK
"hello world" "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1
PUSH_LIT 2 CALL 2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
42 "hello world" "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT
1 PUSH_LIT 2 CALL 2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
nil STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2 CALL
2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
IT PRINTED "HELLO WORLD" HEH
EVER SEEN A FUNCTION? def greet(name) puts "Hello, ", name
end
STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0 CALL 2
PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
<SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0 CALL
2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
"puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0
CALL 2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
"Hello, " "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1
PUSH_LOCAL 0 CALL 2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
"John" "Hello, " "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT
1 PUSH_LOCAL 0 CALL 2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
nil STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0 CALL
2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
GARBAGE COLLECTION
THE ALLOCATOR
WHAT'S THE OPPOSITE OF AN ALLIGATOR?
REFERENCE COUNTING object.refcount++ WHEN WE PUSH AN OBJECT TO THE
STACK object.refcount-- WHEN WE POP AN OBJECT FROM THE STACK BROUGHT TO YOU BY NAIVETY
COOLER ALGORITHMS GENERATIONAL BAKER'S TREADMILL BROUGHT TO YOU BY COMPUTER
SCIENCE MASTERMINDS REAL-TIME INCREMENTAL NON-MOVING NON-COPYING MOVING COPYING CONCURRENT BITMAP MARKING TRICOLOR STOP-THE-WORLD MARK & SWEEP BACON-FLAVOURED SENTIMENTAL KEBAP
JUST IN TIME
JUST IN TIME COMPILING VM Bytecode MACHINE CODE x86 x86_64
arm
CHECK THIS OUT breaux: even cooler cool IF THIS TOPIC
IS RELEVANT TO YOUR INTERESTS
THANKS! txustice txus QUESTIONS?